drm_debugfs_cleanup() now removes all minor->debugfs_list entries
automatically, so no need to call drm_debugfs_remove_files().
Also remove empty drm_driver.debugfs_cleanup callback.
From the description of the "DMA-BUF/GEM Object references
and lifetime overview" it is not clear when exactly
dma_buf gets destroyed and memory freed: only driver
.release function mentioned which makes confusion on the
real buffer's lifetime.
Add more description so all the paths are covered.
Cc: Rob Clark <robdclark@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
[danvet: Minor spelling fixes, and some clarification of the 2nd
paragraph.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1485500665-27690-1-git-send-email-andr2000@gmail.com
Michel Dänzer [Wed, 25 Jan 2017 08:21:31 +0000 (17:21 +0900)]
drm/ttm: Make sure BOs being swapped out are cacheable
The current caching state may not be tt_cached, even though the
placement contains TTM_PL_FLAG_CACHED, because placement can contain
multiple caching flags. Trying to swap out such a BO would trip up the
BUG_ON(ttm->caching_state != tt_cached);
in ttm_tt_swapout.
Cc: stable@vger.kernel.org Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Christian König <christian.koenig@amd.com>. Reviewed-by: Sinclair Yeh <syeh@vmware.com> Signed-off-by: Christian König <christian.koenig@amd.com>
Noralf Trønnes [Thu, 26 Jan 2017 22:56:03 +0000 (23:56 +0100)]
drm: debugfs: Remove all files automatically on cleanup
Instead of having the drivers call drm_debugfs_remove_files() in
their drm_driver->debugfs_cleanup hook, do it automatically by
traversing minor->debugfs_list.
Also use debugfs_remove_recursive() so drivers who add their own
debugfs files don't have to keep track of them for removal.
Philipp Zabel [Thu, 26 Jan 2017 15:32:17 +0000 (16:32 +0100)]
drm/fourcc: add vivante tiled layout format modifiers
Vivante GC hardware uses simple 4x4 tiled and nested 64x64 supertiled
formats as well as so-called split-tiled variants for dual-pipe
hardware, where even and odd tiles start at different base addresses.
Ville Syrjälä [Wed, 11 Jan 2017 12:57:25 +0000 (14:57 +0200)]
drm/edid: Set YQ bits in the AVI infoframe according to CEA-861-F
CEA-861-F tells us:
"When transmitting any RGB colorimetry, the Source should set the
YQ-field to match the RGB Quantization Range being transmitted
(e.g., when Limited Range RGB, set YQ=0 or when Full Range RGB,
set YQ=1) and the Sink shall ignore the YQ-field."
So let's go ahead and do that. Perhaps there are sinks that don't
ignore the YQ as they should for RGB?
I wasn't able to find similar text in CEA-861-E, so it would seem
to be a fairly "recent" addition.
Ville Syrjälä [Wed, 11 Jan 2017 12:57:24 +0000 (14:57 +0200)]
drm/edid: Set AVI infoframe Q even when QS=0
HDMI 2.0 recommends that we set the Q bits in the AVI infoframe
even when the sink does not support quantization range selection (QS=0).
According to CEA-861 we can do that as long as the Q we send matches
the default quantization range for the mode.
Previously I think I had misread the spec as saying that you can't
send a non-zero Q at all when QS=0. But that's not what the spec
actually says.
Pull the logic to populate the quantization range information
in the AVI infoframe into a small helper. We'll be adding a bit
more logic to it, and having it in a central place seems like a
good idea since it's based on the CEA-861 spec.
Chris Wilson [Thu, 26 Jan 2017 11:44:09 +0000 (11:44 +0000)]
drm: Silence the compiler for drm_mode_get_hv_timings()
Since moving drm_crtc_get_hv_timings() into drm_modes.c, the compiler
has been able to get smarter and spots that drm_mode_copy() is trying to
preserve garbage from the stack.
Fixes: 196cd5d3758c ("drm: s/drm_crtc_get_hv_timings/drm_mode_get_hv_timings/") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170126114409.9115-1-chris@chris-wilson.co.uk
Daniel Vetter [Wed, 25 Jan 2017 06:26:52 +0000 (07:26 +0100)]
drm: remove device_is_agp callback
With that the drm_pci_device_is_agp function becomes trivial, so
inline that too. And while at it, move the drm_pci_agp_destroy
declaration into drm-internal.h, since it's not used by drivers.
Daniel Vetter [Wed, 25 Jan 2017 06:26:57 +0000 (07:26 +0100)]
drm: Update kerneldoc for drm_crtc.[hc]
After going through all the trouble of splitting out parts from
drm_crtc.[hc] and then properly documenting each I've entirely
forgotten to show the same TLC for CRTCs themselves!
Let's make amends asap.
v2: Review from Eric.
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Daniel Vetter [Wed, 25 Jan 2017 06:26:45 +0000 (07:26 +0100)]
drm/kms-core: Use recommened kerneldoc for struct member refs
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).
Also some minor drive-by polish where it makes sense, I read a lot
of docs ...
Daniel Vetter [Wed, 25 Jan 2017 06:26:47 +0000 (07:26 +0100)]
drm/core: Use recommened kerneldoc for struct member refs
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).
Also some minor drive-by polish where it makes sense, I read a lot
of docs ...
Daniel Vetter [Wed, 25 Jan 2017 06:26:46 +0000 (07:26 +0100)]
drm/gem|prime|mm: Use recommened kerneldoc for struct member refs
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).
Also some minor drive-by polish where it makes sense, I read a lot
of docs ...
Daniel Vetter [Wed, 25 Jan 2017 06:26:43 +0000 (07:26 +0100)]
drm/kms-helpers: Use recommened kerneldoc for struct member refs
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).
Also some minor drive-by polish where it makes sense, I read a lot
of docs ...
struct drm_dp_mst_topology_mgr currently stores a pointer to struct dev.
Changing this to instead hold a pointer to drm_device is more useful as it
gives access to DRM structures. This also makes it consistent with other
DRM structures like drm_crtc, drm_connector etc.
Chris Wilson [Sat, 21 Jan 2017 18:19:44 +0000 (18:19 +0000)]
drm: Update drm_cache.c to pull in the new drm_cache.h
The prototypes were moved to a new header, but the function definitions
were not updated to pull in the declarations.
drivers/gpu/drm/drm_cache.c:79:1: warning: no previous prototype for ‘drm_clflush_pages’ [-Wmissing-prototypes]
drivers/gpu/drm/drm_cache.c:120:1: warning: no previous prototype for ‘drm_clflush_sg’ [-Wmissing-prototypes]
drivers/gpu/drm/drm_cache.c:152:1: warning: no previous prototype for ‘drm_clflush_virt_range’ [-Wmissing-prototypes]
Fixes: f9a87bd7d5b6 ("drm: Move drm_clflush prototypes to drm_cache header file") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170121181944.24672-1-chris@chris-wilson.co.uk
Arnd Bergmann [Mon, 23 Jan 2017 12:20:38 +0000 (13:20 +0100)]
drm: bridge: dw-hdmi: fix building without CONFIG_OF
The of_node member in struct drm_bridge is hidden when CONFIG_OF
is disabled, causing a build error:
drivers/gpu/drm/bridge/dw-hdmi.c: In function '__dw_hdmi_probe':
drivers/gpu/drm/bridge/dw-hdmi.c:2063:14: error: 'struct drm_bridge' has no member named 'of_node'
We could fix this either using a Kconfig dependency on CONFIG_OF
or making the one line conditional. The latter gives us better
compile test coverage, so this is what I'm doing here.
Chris Wilson [Thu, 19 Jan 2017 09:05:13 +0000 (09:05 +0000)]
drm: Show leaked connectors upon unload
After warning that the connector list is not empty on device
unregistration (i.e. module unload) also print out which connectors are
still hanging around to aide finding the leak.
Chris Wilson [Fri, 13 Jan 2017 23:51:19 +0000 (23:51 +0000)]
lib/prime_numbers: Suppress warn on kmalloc failure
The allocation for the bitmap may become very large, larger than
MAX_ORDER, for large requests. We fail gracefully by falling back to
trail-division, so disable the warning from kmalloc:
This avoids using the deprecated drm_get_pci_dev() and load() hook
interfaces in the qxl driver.
The only tricky part is to ensure TTM debugfs initialization happens
after the debugfs root node is created, which is done by moving that
code into the debufs_init() hook.
Tested on qemu with igt and running a WM on top of X.
Changes since v1:
- Drop verification for primary minor in qxl_debugsfs_init.
Changes since V2:
- Put new header together with other debugfs headers.
John Stultz [Tue, 17 Jan 2017 00:52:52 +0000 (16:52 -0800)]
drm/bridge: adv7511: Re-write the i2c address before EDID probing
I've found that by just turning the chip on and off via the
POWER_DOWN register, I end up getting i2c_transfer errors on
HiKey.
Investigating further, it turns out that some of the register
state in hardware is getting lost, as the device registers are
reset when the chip is powered down.
Thus this patch simply re-writes the i2c address to the
ADV7511_REG_EDID_I2C_ADDR register to ensure its properly set
before we try to read the EDID data.
John Stultz [Tue, 17 Jan 2017 00:52:51 +0000 (16:52 -0800)]
drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID
Thus this patch changes the EDID probing logic so that we
re-use the __adv7511_power_on/off() calls instead of duplciating
logic.
This does change behavior slightly as it adds the HPD signal
pulse to the EDID probe path, but Archit has had a patch to
add HPD signal pulse to the EDID probe path before, so this
should address the cases where that helped. Another difference
is that regcache_mark_dirty() is also called in the power off
path once EDID is probed.
Archit Taneja [Tue, 17 Jan 2017 00:52:49 +0000 (16:52 -0800)]
drm/bridge: adv7511: Enable HPD interrupts to support hotplug and improve monitor detection
On some adv7511 implementations, we can get some spurious
disconnect signals which can cause monitor probing to fail.
This patch enables HPD (hot plug detect) interrupt support
which allows the monitor to be properly re-initialized when
the spurious disconnect signal goes away.
John Stultz [Tue, 17 Jan 2017 00:52:48 +0000 (16:52 -0800)]
drm/bridge: adv7511: Switch to using drm_kms_helper_hotplug_event()
In chasing down a previous issue with EDID probing from calling
drm_helper_hpd_irq_event() from irq context, Laurent noticed
that the DRM documentation suggests that
drm_kms_helper_hotplug_event() should be used instead.
Thus this patch replaces drm_helper_hpd_irq_event() with
drm_kms_helper_hotplug_event(), which requires we update the
connector.status entry and only call _hotplug_event() when the
status changes.
John Stultz [Tue, 17 Jan 2017 00:52:47 +0000 (16:52 -0800)]
drm/bridge: adv7511: Use work_struct to defer hotplug handing to out of irq context
I was recently seeing issues with EDID probing, where
the logic to wait for the EDID read bit to be set by the
IRQ wasn't happening and the code would time out and fail.
Digging deeper, I found this was due to the fact that
IRQs were disabled as we were running in IRQ context from
the HPD signal.
Thus this patch changes the logic to handle the HPD signal
via a work_struct so we can be out of irq context.
With this patch, the EDID probing on hotplug does not time
out.
Laurent Pinchart [Tue, 17 Jan 2017 08:29:10 +0000 (10:29 +0200)]
dt-bindings: display: dw-hdmi: Clean up DT bindings documentation
Make it clear that the core bridge/dw_hdmi.txt document isn't a device
tree binding by itself but is meant to be referenced by platform device
tree bindings, and update the Rockchip and Freescale DWC HDMI TX
bindings to reference it.
Laurent Pinchart [Tue, 17 Jan 2017 08:29:09 +0000 (10:29 +0200)]
drm: bridge: dw-hdmi: Assert SVSRET before resetting the PHY
According to the PHY IP core vendor, the SVSRET signal must be asserted
before resetting the PHY. Tests on RK3288 and R-Car Gen3 showed no
regression, the change should thus be safe.
Laurent Pinchart [Tue, 17 Jan 2017 08:29:08 +0000 (10:29 +0200)]
drm: bridge: dw-hdmi: Fix the name of the PHY reset macros
The PHY reset signal is controlled by bit PHYRSTZ in the MC_PHYRSTZ
register. The signal is active low on Gen1 PHYs and active high on Gen2
PHYs. The driver toggles the signal high then low, which is correct for
all currently supported platforms, but the register values macros are
incorrectly named. Replace them with a single macro named after the bit,
and add a comment to the source code to explain the behaviour.
The driver's behaviour isn't changed by this rename, the code will still
need to be fixed to support Gen1 PHYs.
Laurent Pinchart [Tue, 17 Jan 2017 08:29:05 +0000 (10:29 +0200)]
drm: bridge: dw-hdmi: Handle overflow workaround based on device version
Use the device version queried at runtime instead of the device type
provided through platform data to handle the overflow workaround. This
will make support of other SoCs integrating the same HDMI TX controller
version easier.
Among the supported platforms only i.MX6DL and i.MX6Q have been
identified as needing the workaround. Disabling it on Rockchip RK3288
(which integrates a v2.00a controller) didn't produce any error or
artifact.
Laurent Pinchart [Tue, 17 Jan 2017 08:29:04 +0000 (10:29 +0200)]
drm: bridge: dw-hdmi: Detect AHB audio DMA using correct register
Bit 0 in CONFIG1_ID tells whether the IP core uses an AHB slave
interface for control. The correct way to identify AHB audio DMA support
is through bit 1 in CONFIG3_ID.
Laurent Pinchart [Tue, 17 Jan 2017 08:29:03 +0000 (10:29 +0200)]
drm: bridge: dw-hdmi: Reject invalid product IDs
The DWC HDMI TX can be recognized by the two product identification
registers. If the registers don't read as expect the IP will be very
different than what the driver has been designed for, or will be
misconfigured in a way that makes it non-operational (invalid memory
address, incorrect clocks, ...). We should reject this situation with an
error.
While this isn't critical for proper operation with supported IPs at the
moment, the driver will soon gain automatic device-specific handling
based on runtime device identification. This change makes it easier to
implement that without having to default to a random guess in case the
device can't be identified.
While at it print a readable version number in the device identification
message instead of raw register values.
The current code hard codes the call of hdmi_phy_configure() to be 8bpp
and provides extraneous error checking to verify that this hardcoded
value is correct. Simplify the implementation by removing the argument.
As an option for drivers not based on the component framework, register
the bridge with the DRM core with the DRM bridge API. Existing drivers
based on dw_hdmi_bind() and dw_hdmi_unbind() are not affected as those
functions are preserved with their current behaviour.
Laurent Pinchart [Tue, 17 Jan 2017 08:28:59 +0000 (10:28 +0200)]
drm: bridge: dw-hdmi: Create connector in the bridge attach operation
The DRM device is not guaranteed by the bridge API to be available
before the attach callback. The driver performs properly at the moment
as it doesn't use the drm_bridge_add() registration method. As this will
be changed later, move connector creation to attach time to ensure
compatibility with the API.
Laurent Pinchart [Tue, 17 Jan 2017 08:28:58 +0000 (10:28 +0200)]
drm: bridge: dw-hdmi: Reorder functions to prepare for next commit
The next commit will reference structures and functions in a way that
currently requires forward declarations. Reorder the functions to avoid
that. No functional change to the code is performed.
Laurent Pinchart [Tue, 17 Jan 2017 08:28:57 +0000 (10:28 +0200)]
drm: bridge: dw-hdmi: Move IRQ and IO resource allocation to common code
There's no need to duplicate identical code in multiple drivers (two at
the moment, one more to come soon). Move it to the dw-hdmi core where it
can be shared. If resource allocation ever becomes device-specific later
we'll always have the option of splitting it out again.
While it at pass the platform device to the bind function to avoid
having to cast struct device to struct platform_device.
Laurent Pinchart [Tue, 17 Jan 2017 08:28:56 +0000 (10:28 +0200)]
drm: bridge: dw-hdmi: Don't forward HPD events to DRM core before attach
Hotplug events should only be forwarded to the DRM core by the interrupt
handler when the bridge has been attached, otherwise the DRM device
pointer will be NULL, resulting in a crash.
Kieran Bingham [Tue, 17 Jan 2017 08:28:53 +0000 (10:28 +0200)]
drm: bridge: dw-hdmi: Remove unused function parameter
The 'prep' parameter passed to hdmi_phy_configure() is useless. It is
hardcoded as 0, and if set, simply prevents the configure function from
executing.
Laurent Pinchart [Tue, 17 Jan 2017 08:28:52 +0000 (10:28 +0200)]
drm: bridge: dw-hdmi: Remove unneeded arguments to bind/unbind functions
The master argument isn't used. The data argument, a void pointer, is
used by the bind function only where it's cast to a drm_device pointer,
which can easily be obtained from the encoder argument instead. Remove
them.
Laurent Pinchart [Tue, 17 Jan 2017 08:28:51 +0000 (10:28 +0200)]
drm: bridge: dw-hdmi: Merge __hdmi_phy_i2c_write and hdmi_phy_i2c_write
The latter is just an int wrapper around the former void function that
unconditionally returns 0. As the return value is never checked, merge
the two functions into one.
drm: qxl: Let DRM core handle connector registering
Registering the connector explicitly right after creation is not
necessary for modesetting drivers, because drm_dev_register already takes
care of this on the core side, by calling drm_modeset_register_all.
In addition, performing the initialization too early will get in the way
of the load() hook removal, because the connector interface cannot be
published prior to registering the minors.
Daniel Vetter [Tue, 27 Dec 2016 10:49:25 +0000 (11:49 +0100)]
drm/tegra: Stop using drm_framebuffer_unregister_private
This is the deprecated function for when you embedded the framebuffer
somewhere else (which breaks refcounting). But Tegra is using
drm_framebuffer_remove and a free-standing FB, so this is redundant.
One caveat here is that the failure path in the init code still
manually cleaned up the fb. I presume that was an oversight and
changed it over to drm_framebuffer_remove too.
Daniel Vetter [Tue, 27 Dec 2016 10:49:22 +0000 (11:49 +0100)]
drm/cma-helper: Stop using drm_framebuffer_unregister_private
This is the deprecated function for when you embedded the framebuffer
somewhere else (which breaks refcounting). But cma helpers are using
drm_framebuffer_remove and a free-standing fb, so this is rendundant.
Daniel Vetter [Tue, 27 Dec 2016 10:49:24 +0000 (11:49 +0100)]
drm/omap: Stop using drm_framebuffer_unregister_private
This is the deprecated function for when you embedded the framebuffer
somewhere else (which breaks refcounting). But omapdrm is using
drm_framebuffer_remove and a free-standing fb, so this is rendundant.
Daniel Vetter [Tue, 27 Dec 2016 10:49:21 +0000 (11:49 +0100)]
drm/msm: Stop using drm_framebuffer_unregister_private
This is the deprecated function for when you embedded the framebuffer
somewhere else (which breaks refcounting). But msm is using
drm_framebuffer_remove and a free-standing fb, so this is rendundant.
Arnd Bergmann [Wed, 11 Jan 2017 13:33:35 +0000 (14:33 +0100)]
drm: add more MMU dependencies
Many DRM drivers only work with an MMU, and after the patch to enable
core DRM support without MMU, we already had one fixup for many of them.
The etnaviv, armada and msm drivers were missed and have the same problem:
warning: (DRM_ETNAVIV) selects IOMMU_SUPPORT which has unmet direct dependencies (MMU)
warning: (DRM_I915 && DRM_MSM && DRM_ETNAVIV) selects SHMEM which has unmet direct dependencies (MMU)
drivers/gpu/drm/armada/armada_gem.o: In function `armada_gem_vm_fault':
armada_gem.c:(.text.armada_gem_vm_fault+0x14): undefined reference to `vm_insert_pfn'
arch/arm/mm/dma-mapping.c: In function '__iommu_alloc_remap':
arch/arm/mm/dma-mapping.c:1390:4: error: 'VM_ARM_DMA_CONSISTENT' undeclared (first use in this function)
arch/arm/mm/dma-mapping.c:1456:31: error: 'atomic_pool' undeclared (first use in this function); did you mean 'atomic_xor'?
Fixes: 011cda589938 ("drm: fix compilations issues introduced by "drm: allow to use mmuless SoC"") Fixes: 62a0d98a188c ("drm: allow to use mmuless SoC") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170111133357.3664191-2-arnd@arndb.de
The list_del() inside the error handling in the eviction loop is
overkill. We have to undo the eviction scan to return the drm_mm back to
a recoverable state, so have to iterate over the full list, but we only
want to report the error once and once we have an error we can return
early.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: 560b32842912 ("drm: kselftest for drm_mm and eviction") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170110144031.7609-1-chris@chris-wilson.co.uk
Declare exynos_drm_crtc_ops structures as const as they are only passed
as an argument to the function exynos_drm_crtc_create. This argument is
of type const struct exynos_drm_crtc_ops *, so exynos_drm_crtc_ops
structures having this property can be declared const.
Done using Coccinelle:
Notice that this uncovers an issue with the kernel-doc handling of array
arguments, causing the first parameter of drm_clflush_pages() to not
show up in the rst-generated page. A proposed fix is under review in
linux-doc: <http://www.spinics.net/lists/linux-doc/msg42544.html>
Changes since v1:
- Add section to drm-mm.rst.
- Fix kernel-doc style issues.
- s/memory/kernel memory/.
Dave Airlie [Mon, 9 Jan 2017 22:06:56 +0000 (08:06 +1000)]
Merge tag 'drm-misc-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-misc into drm-next
Back to regular -misc pulls with reasonable sizes:
- dma_fence error clarification (Chris)
- drm_crtc_from_index helper (Shawn), pile more patches on the m-l to roll
this out to drivers
- mmu-less support for fbdev helpers from Benjamin
- piles of kerneldoc work
- some polish for crc support from Tomeu and Benjamin
- odd misc stuff all over
* tag 'drm-misc-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-misc: (48 commits)
dma-fence: Introduce drm_fence_set_error() helper
dma-fence: Wrap querying the fence->status
dma-fence: Clear fence->status during dma_fence_init()
drm: fix compilations issues introduced by "drm: allow to use mmuless SoC"
drm: Change the return type of the unload hook to void
drm: add more document for drm_crtc_from_index()
drm: remove useless parameters from drm_pick_cmdline_mode function
drm: crc: Call wake_up_interruptible() each time there is a new CRC entry
drm: allow to use mmuless SoC
drm: compile drm_vm.c only when needed
fbmem: add a default get_fb_unmapped_area function
drm: crc: Wait for a frame before returning from open()
drm: Move locking into drm_debugfs_crtc_crc_add
drm/imx: imx-tve: Remove unused variable
Revert "drm: nouveau: fix build when LEDS_CLASS=m"
drm: Add kernel-doc for drm_crtc_commit_get/put
drm/atomic: Fix outdated comment.
drm: reference count event->completion
gpu: drm: mgag200: mgag200_main:- Handle error from pci_iomap
drm: Document deprecated load/unload hook
...
Dave Airlie [Mon, 9 Jan 2017 22:02:09 +0000 (08:02 +1000)]
Merge tag 'drm-intel-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-intel into drm-next
More 4.11 stuff, holidays edition (i.e. not much):
- docs and cleanups for shared dpll code (Ander)
- some kerneldoc work (Chris)
- fbc by default on gen9+ too, yeah! (Paulo)
- fixes, polish and other small things all over gem code (Chris)
- and a few small things on top
Plus a backmerge, because Dave was enjoying time off too.
* tag 'drm-intel-next-2017-01-09' of git://anongit.freedesktop.org/git/drm-intel: (275 commits)
drm/i915: Update DRIVER_DATE to 20170109
drm/i915: Drain freed objects for mmap space exhaustion
drm/i915: Purge loose pages if we run out of DMA remap space
drm/i915: Fix phys pwrite for struct_mutex-less operation
drm/i915: Simplify testing for am-I-the-kernel-context?
drm/i915: Use range_overflows()
drm/i915: Use fixed-sized types for stolen
drm/i915: Use phys_addr_t for the address of stolen memory
drm/i915: Consolidate checks for memcpy-from-wc support
drm/i915: Only skip requests once a context is banned
drm/i915: Move a few more utility macros to i915_utils.h
drm/i915: Clear ret before unbinding in i915_gem_evict_something()
drm/i915/guc: Exclude the upper end of the Global GTT for the GuC
drm/i915: Move a few utility macros into a separate header
drm/i915/execlists: Reorder execlists register enabling
drm/i915: Assert that we do create the deferred context
drm/i915: Assert all timeline requests are gone before fini
drm/i915: Revoke fenced GTT mmapings across GPU reset
drm/i915: enable FBC on gen9+ too
drm/i915: actually drive the BDW reserved IDs
...
Chris Wilson [Wed, 4 Jan 2017 14:12:22 +0000 (14:12 +0000)]
dma-fence: Introduce drm_fence_set_error() helper
The dma_fence.error field (formerly known as dma_fence.status) is an
optional field that may be set by drivers before calling
dma_fence_signal(). The field can be used to indicate that the fence was
completed in err rather than with success, and is visible to other
consumers of the fence and to userspace via sync_file.
This patch renames the field from status to error so that its meaning is
hopefully more clear (and distinct from dma_fence_get_status() which is
a composite between the error state and signal state) and adds a helper
that validates the preconditions of when it is suitable to adjust the
error field.
Chris Wilson [Wed, 4 Jan 2017 14:12:21 +0000 (14:12 +0000)]
dma-fence: Wrap querying the fence->status
The fence->status is an optional field that is only valid once the fence
has been signaled. (Driver may fill the fence->status with an error code
prior to calling dma_fence_signal().) Given the restriction upon its
validity, wrap querying of the fence->status into a helper
dma_fence_get_status().
Chris Wilson [Wed, 4 Jan 2017 14:12:20 +0000 (14:12 +0000)]
dma-fence: Clear fence->status during dma_fence_init()
As the fence->status is an optional field that may be set before
dma_fence_signal() is called to convey that the fence completed with an
error, we have to ensure that it is always set to zero on initialisation
so that the typical use (i.e. unset) always flags a successful completion.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Link: http://patchwork.freedesktop.org/patch/msgid/20170104141222.6992-1-chris@chris-wilson.co.uk
Shawn Guo [Sat, 7 Jan 2017 08:52:11 +0000 (16:52 +0800)]
drm: add more document for drm_crtc_from_index()
Add a bit more document for function drm_crtc_from_index() to cross
link it with drm_crtc_from_index(), and explain that the function is
useful in vblank code.
While at it, add cross link comment for drm_plane_from_index() as well.