summaryrefslogtreecommitdiffstats
path: root/include/drm
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'drm-next-3.15-wip' of ↵Dave Airlie2014-04-191-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~deathsimple/linux into drm-next Some i2c fixes over DisplayPort. * 'drm-next-3.15-wip' of git://people.freedesktop.org/~deathsimple/linux: drm/radeon: Improve vramlimit module param documentation drm/radeon: fix audio pin counts for DCE6+ (v2) drm/radeon/dp: switch to the common i2c over aux code drm/dp/i2c: Update comments about common i2c over dp assumptions (v3) drm/dp/i2c: send bare addresses to properly reset i2c connections (v4) drm/radeon/dp: handle zero sized i2c over aux transactions (v2) drm/i915: support address only i2c-over-aux transactions drm/tegra: dp: Support address-only I2C-over-AUX transactions
| * drm/dp/i2c: Update comments about common i2c over dp assumptions (v3)Alex Deucher2014-04-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you are using the common dp over i2c functionality, it is asumed that the aux transfer function does not modify the any of the msg structure other than the reply field. Doing so breaks the logic in the common code. v2: update struct drm_dp_aux comments about assumptions v3 (chk): rebased on upstream changes Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Thierry Reding <treding@nvidia.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Christian König <christian.koenig@amd.com>
* | drm: Split out drm_probe_helper.c from drm_crtc_helper.cDaniel Vetter2014-04-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is leftover stuff from my previous doc round which I kinda wanted to do but didn't yet due to rebase hell. The modeset helpers and the probing helpers a independent and e.g. i915 uses the probing stuff but has its own modeset infrastructure. It hence makes to split this up. While at it add a DOC: comment for the probing libraray. It would be rather neat to pull some of the DocBook documenting these two helpers into in-line DOC: comments. But unfortunately kerneldoc doesn't support markdown or something similar to make nice-looking documentation, so the current state is better. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge branch 'x86-platform-for-linus' of ↵Linus Torvalds2014-04-111-0/+20
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pullx86 core platform updates from Peter Anvin: "This is the x86/platform branch with the objectionable IOSF patches removed. What is left is proper memory handling for Intel GPUs, and a change to the Calgary IOMMU code which will be required to make kexec work sanely on those platforms after some upcoming kexec changes" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, calgary: Use 8M TCE table size by default x86/gpu: Print the Intel graphics stolen memory range x86/gpu: Add Intel graphics stolen memory quirk for gen2 platforms x86/gpu: Add vfunc for Intel graphics stolen memory base address
| * | x86/gpu: Add Intel graphics stolen memory quirk for gen2 platformsVille Syrjälä2014-02-091-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There isn't an explicit stolen memory base register on gen2. Some old comment in the i915 code suggests we should get it via max_low_pfn_mapped, but that's clearly a bad idea on my MGM. The e820 map in said machine looks like this: BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved BIOS-e820: [mem 0x00000000000ce000-0x00000000000cffff] reserved BIOS-e820: [mem 0x00000000000dc000-0x00000000000fffff] reserved BIOS-e820: [mem 0x0000000000100000-0x000000001f6effff] usable BIOS-e820: [mem 0x000000001f6f0000-0x000000001f6f7fff] ACPI data BIOS-e820: [mem 0x000000001f6f8000-0x000000001f6fffff] ACPI NVS BIOS-e820: [mem 0x000000001f700000-0x000000001fffffff] reserved BIOS-e820: [mem 0x00000000fec10000-0x00000000fec1ffff] reserved BIOS-e820: [mem 0x00000000ffb00000-0x00000000ffbfffff] reserved BIOS-e820: [mem 0x00000000fff00000-0x00000000ffffffff] reserved That makes max_low_pfn_mapped = 1f6f0000, so assuming our stolen memory would start there would place it on top of some ACPI memory regions. So not a good idea as already stated. The 9MB region after the ACPI regions at 0x1f700000 however looks promising given that the macine reports the stolen memory size to be 8MB. Looking at the PGTBL_CTL register, the GTT entries are at offset 0x1fee00000, and given that the GTT entries occupy 128KB, it looks like the stolen memory could start at 0x1f700000 and the GTT entries would occupy the last 128KB of the stolen memory. After some more digging through chipset documentation, I've determined the BIOS first allocates space for something called TSEG (something to do with SMM) from the top of memory, and then it allocates the graphics stolen memory below that. Accordind to the chipset documentation TSEG has a fixed size of 1MB on 855. So that explains the top 1MB in the e820 region. And it also confirms that the GTT entries are in fact at the end of the the stolen memory region. Derive the stolen memory base address on gen2 the same as the BIOS does (TOM-TSEG_SIZE-stolen_size). There are a few differences between the registers on various gen2 chipsets, so a few different codepaths are required. 865G is again bit more special since it seems to support enough memory to hit 4GB address space issues. This means the PCI allocations will also affect the location of the stolen memory. Fortunately there appears to be the TOUD register which may give us the correct answer directly. But the chipset docs are a bit unclear, so I'm not 100% sure that the graphics stolen memory is always the last thing the BIOS steals. Someone would need to verify it on a real system. I tested this on the my 830 and 855 machines, and so far everything looks peachy. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Link: http://lkml.kernel.org/r/1391628540-23072-3-git-send-email-ville.syrjala@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
* | | Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds2014-04-0816-430/+820
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull drm updates from Dave Airlie: "Highlights: - drm: Generic display port aux features, primary plane support, drm master management fixes, logging cleanups, enforced locking checks (instead of docs), documentation improvements, minor number handling cleanup, pseudofs for shared inodes. - ttm: add ability to allocate from both ends - i915: broadwell features, power domain and runtime pm, per-process address space infrastructure (not enabled) - msm: power management, hdmi audio support - nouveau: ongoing GPU fault recovery, initial maxwell support, random fixes - exynos: refactored driver to clean up a lot of abstraction, DP support moved into drm, LVDS bridge support added, parallel panel support - gma500: SGX MMU support, SGX irq handling, asle irq work fixes - radeon: video engine bringup, ring handling fixes, use dp aux helpers - vmwgfx: add rendernode support" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (849 commits) DRM: armada: fix corruption while loading cursors drm/dp_helper: don't return EPROTO for defers (v2) drm/bridge: export ptn3460_init function drm/exynos: remove MODULE_DEVICE_TABLE definitions ARM: dts: exynos4412-trats2: enable exynos/fimd node ARM: dts: exynos4210-trats: enable exynos/fimd node ARM: dts: exynos4412-trats2: add panel node ARM: dts: exynos4210-trats: add panel node ARM: dts: exynos4: add MIPI DSI Master node drm/panel: add S6E8AA0 driver ARM: dts: exynos4210-universal_c210: add proper panel node drm/panel: add ld9040 driver panel/ld9040: add DT bindings panel/s6e8aa0: add DT bindings drm/exynos: add DSIM driver exynos/dsim: add DT bindings drm/exynos: disallow fbdev initialization if no device is connected drm/mipi_dsi: create dsi devices only for nodes with reg property drm/mipi_dsi: add flags to DSI messages Skip intel_crt_init for Dell XPS 8700 ...
| * | Merge branch 'exynos-drm-next' of ↵Dave Airlie2014-04-051-0/+6
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Summaries: - Add MIPI-DSI Driver, and dt bindigs - Add S6E8AA0 MIPI-DSI based panel drivers, and dt bindings - Add LD9040 parallel panel driver . this driver is placed in drivers/gpu/drm/panel, and it seems to be used for exynos drm as of now, - Some fixups Changelog v2: - Remove super device support, and relevant dt bindings for more reviews. - Fix module build errors you pointed out. - Re-based it to drm-next again. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/bridge: export ptn3460_init function drm/exynos: remove MODULE_DEVICE_TABLE definitions ARM: dts: exynos4412-trats2: enable exynos/fimd node ARM: dts: exynos4210-trats: enable exynos/fimd node ARM: dts: exynos4412-trats2: add panel node ARM: dts: exynos4210-trats: add panel node ARM: dts: exynos4: add MIPI DSI Master node drm/panel: add S6E8AA0 driver ARM: dts: exynos4210-universal_c210: add proper panel node drm/panel: add ld9040 driver panel/ld9040: add DT bindings panel/s6e8aa0: add DT bindings drm/exynos: add DSIM driver exynos/dsim: add DT bindings drm/exynos: disallow fbdev initialization if no device is connected drm/mipi_dsi: create dsi devices only for nodes with reg property drm/mipi_dsi: add flags to DSI messages
| | * | drm/mipi_dsi: add flags to DSI messagesAndrzej Hajda2014-04-041-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds flags field to mipi_dsi_msg structure and two flags: - MIPI_DSI_MSG_REQ_ACK - request ACK from peripheral for given message, - MIPI_DSI_MSG_USE_LPM - use Low Power Mode to transmit message. The first flag is usually helpful during DSI diagnostic, the second flag is required by some peripherals during configuration phase. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | | Merge tag 'ttm-next-2014-04-04' of ↵Dave Airlie2014-04-051-18/+29
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~thomash/linux into drm-next Pull request of 2014-04-04 Currently only a single patch fixing up mixed use of the ttm_bo_reserve and ww_mutex APIs * tag 'ttm-next-2014-04-04' of git://people.freedesktop.org/~thomash/linux: drm/ttm: Hide the implementation details of reservation
| | * | | drm/ttm: Hide the implementation details of reservationThomas Hellstrom2014-04-041-18/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
| * | | | drm/cma: include <drm/drmP.h> as neededShawn Guo2014-04-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following error and warnings will be seen when compiling a C file which includes <drm/drm_gem_cma_helper.h> but without <drm/drmP.h> being included before. include/drm/drm_gem_cma_helper.h:5:24: error: field ‘base’ has incomplete type include/drm/drm_gem_cma_helper.h: In function ‘to_drm_gem_cma_obj’: include/drm/drm_gem_cma_helper.h:16:9: warning: initialization from incompatible pointer type [enabled by default] include/drm/drm_gem_cma_helper.h: At top level: include/drm/drm_gem_cma_helper.h:24:34: warning: ‘struct drm_mode_create_dumb’ declared inside parameter list [enabled by default] include/drm/drm_gem_cma_helper.h:24:34: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] include/drm/drm_gem_cma_helper.h:24:34: warning: ‘struct drm_device’ declared inside parameter list [enabled by default] include/drm/drm_gem_cma_helper.h:24:34: warning: ‘struct drm_file’ declared inside parameter list [enabled by default] include/drm/drm_gem_cma_helper.h:28:10: warning: ‘struct drm_device’ declared inside parameter list [enabled by default] include/drm/drm_gem_cma_helper.h:28:10: warning: ‘struct drm_file’ declared inside parameter list [enabled by default] include/drm/drm_gem_cma_helper.h:35:3: warning: ‘struct drm_device’ declared inside parameter list [enabled by default] include/drm/drm_gem_cma_helper.h:46:14: warning: ‘struct drm_device’ declared inside parameter list [enabled by default] Fix them by including <drm/drmP.h> in drm_gem_cma_helper.h. Signed-off-by: Shawn Guo <shawn.guo@freescale.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | | drm: Add support for two-ended allocation, v3Lauri Kasanen2014-04-042-4/+31
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clients like i915 need to segregate cache domains within the GTT which can lead to small amounts of fragmentation. By allocating the uncached buffers from the bottom and the cacheable buffers from the top, we can reduce the amount of wasted space and also optimize allocation of the mappable portion of the GTT to only those buffers that require CPU access through the GTT. For other drivers, allocating small bos from one end and large ones from the other helps improve the quality of fragmentation. Based on drm_mm work by Chris Wilson. v3: Changed to use a TTM placement flag v2: Updated kerneldoc Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ben Widawsky <ben@bwidawsk.net> Cc: Christian König <deathsimple@vodafone.de> Signed-off-by: Lauri Kasanen <cand@gmx.com> Signed-off-by: David Airlie <airlied@redhat.com>
| * | | Merge tag 'drm-intel-next-2014-03-21' of ↵Dave Airlie2014-04-031-0/+4
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/drm-intel into drm-next - Inherit/reuse firmwar framebuffers (for real this time) from Jesse, less flicker for fastbooting. - More flexible cloning for hdmi (Ville). - Some PPGTT fixes from Ben. - Ring init fixes from Naresh Kumar. - set_cache_level regression fixes for the vma conversion from Ville&Chris. - Conversion to the new dp aux helpers (Jani). - Unification of runtime pm with pc8 support from Paulo, prep work for runtime pm on other platforms than HSW. - Larger cursor sizes (Sagar Kamble). - Piles of improvements and fixes all over, as usual. * tag 'drm-intel-next-2014-03-21' of git://anongit.freedesktop.org/drm-intel: (75 commits) drm/i915: Include a note about the dangers of I915_READ64/I915_WRITE64 drm/i915/sdvo: fix questionable return value check drm/i915: Fix unsafe loop iteration over vma whilst unbinding them drm/i915: Enabling 128x128 and 256x256 ARGB Cursor Support drm/i915: Print how many objects are shared in per-process stats drm/i915: Per-process stats work better when evaluated per-process drm/i915: remove rps local variables drm/i915: Remove extraneous MMIO for RPS drm/i915: Rename and comment all the RPS *stuff* drm/i915: Store the HW min frequency as min_freq drm/i915: Fix coding style for RPS drm/i915: Reorganize the overclock code drm/i915: init pm.suspended earlier drm/i915: update the PC8 and runtime PM documentation drm/i915: rename __hsw_do_{en, dis}able_pc8 drm/i915: kill struct i915_package_c8 drm/i915: move pc8.irqs_disabled to pm.irqs_disabled drm/i915: remove dev_priv->pc8.enabled drm/i915: don't get/put PC8 when getting/putting power wells drm/i915: make intel_aux_display_runtime_get get runtime PM, not PC8 ... Conflicts: drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_dp.c
| | * | drm/dp: let drivers specify the name of the I2C-over-AUX adapterJani Nikula2014-03-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let the drivers specify the name of the I2C-over-AUX adapter to maintain backwards compatibility in the sysfs when converting to the new I2C-over-AUX helper infrastructure. The i915 driver currently uses DPDDC-A to DPDDC-D as names for the DP i2c adapters. These names show up in the i2c sysfs name attribute. We'd like to be able to maintain that when switching over to the new helpers. Due to i2c device and connector cleanup ordering issues we also recently made the drm device (instead of connector) the parent of the i2c adapters: commit 80f65de3c9b8101c1613fa82df500ba6a099a11c Author: Imre Deak <imre.deak@intel.com> Date: Tue Feb 11 17:12:49 2014 +0200 drm/i915: dp: fix order of dp aux i2c device cleanup With the name picked up from the adapter parent using dev_name(), it would be the same for all i2c adapters with the current I2C-over-AUX helpers. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Acked-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * | | drm: Allow userspace to ask for universal plane list (v2)Matt Roper2014-04-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Userspace clients which wish to receive all DRM planes (primary and cursor planes in addition to the traditional overlay planes) may set the DRM_CLIENT_CAP_UNIVERSAL_PLANES capability. v2: Hide behind drm.universal_planes module option [suggested by Daniel Vetter] Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
| * | | drm: Remove unused drm_crtc->fbMatt Roper2014-04-011-3/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
| * | | drm: Add drm_crtc_init_with_planes() (v2)Matt Roper2014-04-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new drm_crtc_init_with_planes() to allow drivers to provide specific primary and cursor planes at CRTC initialization. The existing drm_crtc_init() interface remains to avoid driver churn in existing drivers; it will initialize the CRTC with a plane helper-created primary plane and no cursor plane. v2: - Move drm_crtc_init() to plane helper file so that nothing in the DRM core depends on helpers. [suggested by Daniel Vetter] - Keep cursor parameter to drm_crtc_init_with_planes() a void* until we actually add cursor support. [suggested by Daniel Vetter] Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
| * | | drm: Add plane type property (v2)Rob Clark2014-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a plane type property to allow userspace to distinguish plane types. v2: Driver-specific churn eliminated now that drm_plane_init() and drm_universal_plane_init() were separated out in a previous patch. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
| * | | drm: Add drm_universal_plane_init()Matt Roper2014-04-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new plane initialization interface for universal plane support that allows a specific plane type (primary, cursor, or overlay) to be specified. drm_plane_init() remains as a compatibility API to reduce churn in existing drivers. The 'bool priv' parameter has been changed to 'bool is_primary' under the assumption that all existing uses of private planes were representing primary planes. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
| * | | drm: Add primary plane helpers (v3)Matt Roper2014-04-011-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we expose non-overlay planes to userspace, they will become accessible via standard userspace plane API's. We should be able to handle the standard plane operations against primary planes in a generic way via the modeset handler. Drivers that can program primary planes more efficiently, that want to use their own primary plane structure to track additional information, or that don't have the limitations assumed by the helpers are free to provide their own implementation of some or all of these handlers. v3: Tweak kerneldoc formatting slightly to avoid ugliness v2: - Move plane helpers to a new file (drm_plane_helper.c) - Tighten checks on update handler (check for scaling, CRTC coverage, subpixel positioning) - Pass proper panning parameters to modeset interface - Disallow disabling primary plane (and thus CRTC) if other planes are still active on the CRTC. - Use a minimal format list that should work on all hardware/drivers. Drivers may call this function with a more accurate plane list to enable additional formats they can support. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
| * | | drm: Make drm_crtc_check_viewport non-staticMatt Roper2014-04-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function will be used by the universal plane helpers and may also be useful for individual drivers. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
| * | | drm: Add support for multiple plane types (v2)Matt Roper2014-04-011-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DRM core currently only tracks "overlay"-style planes. Start refactoring the plane handling to allow other plane types (primary and cursor) to also be placed on the DRM plane list. v2: Add drm_for_each_legacy_plane() iterator to smooth transition of drivers with plane loops. Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
| * | | drm/ttm: Add a ttm_ref_object_exists functionThomas Hellstrom2014-03-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A function to be used to check whether a caller has put a ref object (opened) a struct ttm_base_object Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
| * | | drm: Add a function to get the ioctl flagsThomas Hellstrom2014-03-281-0/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
| * | | drm: Protect the master management with a drm_device::master_mutex v3Thomas Hellstrom2014-03-281-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The master management was previously protected by the drm_device::struct_mutex. In order to avoid locking order violations in a reworked dropped master security check in the vmwgfx driver, break it out into a separate master_mutex. Locking order is master_mutex -> struct_mutex. Also remove drm_master::blocked since it's not used. v2: Add an inline comment about what drm_device::master_mutex is protecting. v3: Remove unneeded struct_mutex locks. Fix error returns in drm_setmaster_ioctl(). Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Acked-by: Daniel Vetter <daniel@ffwll.ch>
| * | | drm: Remove the minor master listThomas Hellstrom2014-03-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't appear to be used anywhere. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
| * | | drm: Improve on minor type helpers v3Thomas Hellstrom2014-03-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a drm_is_legacy() helper, constify argument to drm_is_render_client(), and use / change helpers where appropriate. v2: s/drm_is_legacy/drm_is_legacy_client/ and adapt to new code context. v3: s/legacy_client/primary_client/ Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
| * | | drm: Make control nodes master-less v3Thomas Hellstrom2014-03-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like for render-nodes, there is no point in maintaining the master concept for control nodes, so set the struct drm_file::master pointer to NULL. At the same time, make sure DRM_MASTER | DRM_CONTROL_ALLOW ioctls are always allowed when called through the control node. Previously the caller also needed to be master. v2: Adapt to refactoring of ioctl permission check. v3: Formatting of logical expression. Use drm_is_control_client() instead of drm_is_control(). Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
| * | | drm: Remove the prefix argument of drm_ut_debug_printk()Lespiau, Damien2014-03-281-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is always DRM_NAME, so we can just make it part of the format string instead of asking prink to do it for us. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm: Pull the test on drm_debug in the logging macrosLespiau, Damien2014-03-281-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the logging code, we are currently checking is we need to output in drm_ut_debug_printk(). This is too late. The problem is that when we write something like: DRM_DEBUG_DRIVER("ELD on [CONNECTOR:%d:%s], [ENCODER:%d:%s]\n", connector->base.id, drm_get_connector_name(connector), connector->encoder->base.id, drm_get_encoder_name(connector->encoder)); We start by evaluating the arguments (so call drm_get_connector_name() and drm_get_connector_name()) before ending up in drm_ut_debug_printk() which will then does nothing. This means we execute a lot of instructions (drm_get_connector_name(), in turn, calls snprintf() for example) to happily discard them in the normal case, drm.debug=0. So, let's put the test on drm_debug earlier, in the macros themselves. Sprinkle an unlikely() as well for good measure. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm: Remove the now unused DRM_LOG* macrosLespiau, Damien2014-03-281-19/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm: Remove the unused (and unusable) DRM_LOG_MODE()Lespiau, Damien2014-03-281-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This macro was trying to use the non existing DRM_UT_MODE debug category and looks like it should be covered by DRM_LOG_KMS(). Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm: Refresh the explanation of debug categoriesLespiau, Damien2014-03-281-30/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That comment wasn't super-readable, so I tried to improve it: - Put the comment before the values it's documenting - Add a mention to PRIME - Reword things a bit to be a lighter read - Add a note about the option to set the debug value at run-time Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm/bridge/ptn3460: fix modular buildDave Airlie2014-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This failed to build =m, quick fix. Signed-off-by: Dave Airlie <airlied@redhat.com>
| * | | drm/bridge: Add PTN3460 bridge driverSean Paul2014-03-241-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS bridge chip. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
| * | | Merge branch 'gma500-next' of git://github.com/patjak/drm-gma500 into drm-nextDave Airlie2014-03-211-68/+2
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of what's included: - SGX MMU support - SGX IRQ handling (Page faults and blitter fences) - Minor Cedarview and Poulsbo unification - Work queue for ASLE interrupt work - Various cleanups, style fixes and removal of dead code * 'gma500-next' of git://github.com/patjak/drm-gma500: drm/gma500: remove stub .open/postclose drm/gma500: Code cleanup - inline documentation drm/gma500: Code cleanup - style fixes drm/gma500: Code cleanup - removal of centralized exiting of function drm/gma500/cdv: Cedarview display cleanups drm/gma500: Unify encoder mode fixup drm/gma500: Unify _get_core_freq for cdv and psb drm/gma500: Move asle interrupt work into a work task drm/gma500: Remove dead code drm/gma500: Add backing type and base align to psb_gem_create() drm/gma500: Remove unused ioctls drm/gma500: Always trap MMU page faults drm/gma500: Hook up the MMU drm/gma500: Add first piece of blitter code drm/gma500: Give MMU code it's own header file drm/gma500: Add support for SGX interrupts drm/gma500: Make SGX MMU driver actually do something
| | * | drm/gma500: Remove unused ioctlsPatrik Jakobsson2014-03-171-68/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All of these ioctls are unused and most of them just duplicate what drm already provides. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
| * | | Merge branch 'drm-next' of git://people.freedesktop.org/~dvdhrm/linux into ↵Dave Airlie2014-03-183-4/+6
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-next This is the 3rd respin of the drm-anon patches. They allow module unloading, use the pin_fs_* helpers recommended by Al and are rebased on top of drm-next. Note that there are minor conflicts with the "drm-minor" branch. * 'drm-next' of git://people.freedesktop.org/~dvdhrm/linux: drm: init TTM dev_mapping in ttm_bo_device_init() drm: use anon-inode instead of relying on cdevs drm: add pseudo filesystem for shared inodes
| | * \ \ Merge branch 'drm-minor' into drm-nextDavid Herrmann2014-03-161-15/+26
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix minor conflicts with drm-anon: - allocation/free order - drm_device header cleanups
| | * | | | drm: init TTM dev_mapping in ttm_bo_device_init()David Herrmann2014-03-162-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With dev->anon_inode we have a global address_space ready for operation right from the beginning. Therefore, there is no need to do a delayed setup with TTM. Instead, set dev_mapping during initialization in ttm_bo_device_init() and remove any "if (dev_mapping)" conditions. Cc: Dave Airlie <airlied@redhat.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
| | * | | | drm: use anon-inode instead of relying on cdevsDavid Herrmann2014-03-161-1/+1
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DRM drivers share a common address_space across all character-devices of a single DRM device. This allows simple buffer eviction and mapping-control. However, DRM core currently waits for the first ->open() on any char-dev to mark the underlying inode as backing inode of the device. This delayed initialization causes ugly conditions all over the place: if (dev->dev_mapping) do_sth(); To avoid delayed initialization and to stop reusing the inode of the char-dev, we allocate an anonymous inode for each DRM device and reset filp->f_mapping to it on ->open(). Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
| * | | | Merge branch 'drm-docs' of ssh://people.freedesktop.org/~danvet/drm into ↵Dave Airlie2014-03-185-228/+372
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-next Here's my drm documentation update and driver api polish pull request. Alex reviewed the entire pile, I've applied a little bit of spelling polish in a few places since then and otherwise the Usual Suspects (David, Rob, ...) don't seem up to have another look at it (I've poked them on irc). So I think it's as good as it gets ;-) Note that I've dropped the final imx breaker patch since that's blocked on imx getting sane. Once that's landed I'll ping you to pick up that straggler. * 'drm-docs' of ssh://people.freedesktop.org/~danvet/drm: (34 commits) drm/imx: remove drm_mode_connector_detach_encoder harder drm: kerneldoc polish for drm_crtc.c drm: kerneldoc polish for drm_crtc_helper.c drm: drop error code for drm_helper_resume_force_mode drm/crtc-helper: remove LOCKING from kerneldoc drm: remove return value from drm_helper_mode_fill_fb_struct drm/doc: Fix misplaced </para> drm: remove drm_display_mode->private_size drm: polish function kerneldoc for drm_modes.[hc] drm/modes: drop maxPitch from drm_mode_validate_size drm/modes: drop return value from drm_display_mode_from_videomode drm/modes: remove drm_mode_height/width drm: extract drm_modes.h for drm_crtc.h functions drm: move drm_mode related functions into drm_modes.c drm/doc: Repleace LOCKING kerneldoc sections in drm_modes.c drm/doc: Integrate drm_modes.c kerneldoc drm/kms: rip out drm_mode_connector_detach_encoder drm/doc: Add function reference documentation for drm_mm.c drm/doc: Overview documentation for drm_mm.c drm/mm: Remove MM_UNUSED_TARGET ...
| | * | | drm: drop error code for drm_helper_resume_force_modeDaniel Vetter2014-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No driver cares, and it should generally work. Add a big comment when drivers can't use this for recompense. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| | * | | drm: remove return value from drm_helper_mode_fill_fb_structDaniel Vetter2014-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rightfully no driver ever checked this - it can't fail. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| | * | | drm: remove drm_display_mode->private_sizeDaniel Vetter2014-03-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It' unused and there's also not really any way to make it work with the current code. So better rip it out. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| | * | | drm: polish function kerneldoc for drm_modes.[hc]Daniel Vetter2014-03-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Tune down yelling RETURNS. - OCD align all the parameters the same. - Add missing kerneldoc, which also means that we need to include the kerneldoc from the drm_modes.h header now. - Add missing Returns: sections. - General polish and clarification - especially the kerneldoc for the mode creation helpers seems to have been some good specimen of copypasta gone wrong. All actual code changes have all been extracted into prep patches since there was simply too much to polish. v2: More polish for the command line modeline functions. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| | * | | drm/modes: drop maxPitch from drm_mode_validate_sizeDaniel Vetter2014-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Totally unused and actually redundant with maxX for display mode validation. The fb helper otoh needs to check pitch limits, but that is delegated into drivers instead. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| | * | | drm/modes: drop return value from drm_display_mode_from_videomodeDaniel Vetter2014-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It never fails and no one ever checked anyway. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| | * | | drm/modes: remove drm_mode_height/widthDaniel Vetter2014-03-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a neat FIXME asking whether this is really need. I'd say really no. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| | * | | drm: extract drm_modes.h for drm_crtc.h functionsDaniel Vetter2014-03-133-194/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I want to also include kerneldoc from the header (for static inline functions and structs), but fishing the right pieces out of a giant header is a real pain. So split things out. Note that it's not a really clean header with sane include orders, but given's drm historical knack for giant headers detangling this is a major task. v2: Also extract struct drm_cmdline_mode. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
OpenPOWER on IntegriCloud