[Intel-gfx] [PATCH] backlight: Avoid double fbcon backlight handling

2016-08-04 Thread Chris Wilson
On Thu, Aug 04, 2016 at 11:50:27AM +0200, Daniel Vetter wrote: > On Thu, Aug 04, 2016 at 12:02:23PM +0300, Jani Nikula wrote: > > On Tue, 12 Jul 2016, Daniel Vetter wrote: > > > On Thu, Jun 30, 2016 at 12:30:56PM +0100, Chris Wilson wrote: > > >> Backlights

[PATCH v5 4/5] Documentation: add doc for sync_file_get_fence()

2016-08-05 Thread Chris Wilson
unction return a struct fence pointer referencing the fence(s) in the > Sync > +File. + The returned reference is owned by the caller and must be disposed of afterwards using fence_put(). In case of error, a NULL is returned instead. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH v5 5/5] dma-buf/sync_file: only enable fence signalling on poll()

2016-08-05 Thread Chris Wilson
k() > > v4: use user bit from fence flags (comment from Chris Wilson) > > Signed-off-by: Gustavo Padovan > --- > + if (!test_and_set_bit(POLL_ENABLED, _file->fence->flags)) { > + if (fence_add_callback(sync_file->fence, _fil

[PATCH v5 5/5] dma-buf/sync_file: only enable fence signalling on poll()

2016-08-05 Thread Chris Wilson
On Fri, Aug 05, 2016 at 08:28:15AM +0100, Chris Wilson wrote: > On Thu, Aug 04, 2016 at 11:24:14PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Signalling doesn't need to be enabled at sync_file creation, it is only > > required if userspace waiting

[PATCH 3/3 v3] drm: bridge/dw-hdmi: Move edid reading to .detect() callback

2016-08-05 Thread Chris Wilson
atus (as tracked by probe helpers) > - anything in the edid changes (when setting it > drm_mode_connector_update_edid_property) > - other changes (like sink state changes in dpcd or whatever) > > That way userspace would be able to reliably spot such changes and do a > new modeset. Yes, please. I have had similar wishes for state changes and overall modeset counters. -Chris -- Chris Wilson, Intel Open Source Technology Centre

problem with 731c7d3, "main drm pull request for 4.8"

2016-08-05 Thread Chris Wilson
_helper] > [1.356038] [] ? drm_modeset_unlock_all+0x66/0xc0 [drm] > [1.356038] [] cirrus_fbdev_init+0xa0/0xb0 [cirrus] > [1.356038] [] cirrus_modeset_init+0x18b/0x1e0 [cirrus] > [1.356038] [] cirrus_driver_load+0xbc/0x100 [cirrus] > [1.356038] [] drm_dev_register+0xa9/0xd0 [drm]

[Intel-gfx] [PATCH] drm: avoid "possible bad bitmask?" warning

2016-08-09 Thread Chris Wilson
m/i915_drm.h > +++ b/include/drm/i915_drm.h > @@ -93,6 +93,6 @@ extern bool i915_gpu_turbo_disable(void); > #defineI845_TSEG_SIZE_1M (3 << 1) > > #define INTEL_BSM 0x5c > -#define INTEL_BSM_MASK (0x << 20) > +#define INTEL_BSM_MASK (-(1u << 20)) Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH 1/5] drm/amdgpu: Remove call to reservation_object_test_signaled_rcu before wait

2016-08-11 Thread Chris Wilson
check and potentially blocking wait. Signed-off-by: Chris Wilson Cc: Alex Deucher Cc: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 2/5] drm: Remove manual call to reservation_object_test_signaled_rcu before wait

2016-08-11 Thread Chris Wilson
check and potentially blocking wait. Signed-off-by: Chris Wilson Cc: Lucas Stach Cc: Russell King <linux+etnaviv at armlinux.org.uk> Cc: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff

[PATCH 4/5] drm/nouveau: Remove call to reservation_object_test_signaled_rcu before wait

2016-08-11 Thread Chris Wilson
check and potentially blocking wait. Signed-off-by: Chris Wilson Cc: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_gem.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index

[PATCH 3/5] drm/msm: Remove call to reservation_object_test_signaled_rcu before wait

2016-08-11 Thread Chris Wilson
check and potentially blocking wait. Signed-off-by: Chris Wilson Cc: Rob Clark --- drivers/gpu/drm/msm/msm_gem.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index 6cd4af443139

[PATCH 5/5] drm/vmwgfx: Remove call to reservation_object_test_signaled_rcu before wait

2016-08-11 Thread Chris Wilson
check and potentially blocking wait. Signed-off-by: Chris Wilson Cc: Sinclair Yeh Cc: Thomas Hellstrom --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx

[PATCH] dma-buf: Restart reservation_object_get_fences_rcu() after writes

2016-08-11 Thread Chris Wilson
fence_get_rcu() that ensure that as long as the seqlock is stable we hold the right references to the fences. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Christian König Cc: Alex Deucher Cc: Sumit Semwal --- drivers/dma-buf/reservation.c | 73

[PATCH 2/3] drm/i915: Track pinned VMA

2016-08-11 Thread Chris Wilson
and then searching for the relevant pin later. v2: Joonas' stylistic nitpicks. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c| 2 +- drivers/gpu/drm/i915/i915_drv.h| 60 ++-- drivers/gpu/drm/i915/i915_gem.c| 225 +++-- drivers

[PATCH 3/3] drm/i915: Introduce i915_ggtt_offset()

2016-08-11 Thread Chris Wilson
where we are discarding the full VMA offset. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_debugfs.c| 6 +++--- drivers/gpu/drm/i915/i915_drv.h| 2 +- drivers/gpu/drm/i915/i915_gem.c| 6 +++--- drivers/gpu/drm/i915/i915_gem_context.c| 6

[PATCH 2/3] dma-buf: Restart reservation_object_wait_timeout_rcu() after writes

2016-08-11 Thread Chris Wilson
section does not prevent this reallocation, instead we have to inspect the reservation's seqlock to double check if the fences have been reassigned as we were acquiring our reference. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Christian König Cc: Alex Deucher Cc

[PATCH 3/3] dma-buf: Restart reservation_object_test_signaled_rcu() after writes

2016-08-11 Thread Chris Wilson
section does not prevent this reallocation, instead we have to inspect the reservation's seqlock to double check if the fences have been reassigned as we were acquiring our reference. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Christian König Cc: Alex Deucher Cc

[PATCH 2/3] drm/i915: Track pinned VMA

2016-08-11 Thread Chris Wilson
Apologies, please ignore these 2. Didn't pass the right start point to git-send-email. -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH 3/5] drm/msm: Remove call to reservation_object_test_signaled_rcu before wait

2016-08-11 Thread Chris Wilson
On Thu, Aug 11, 2016 at 11:19:50PM +0530, Sumit Semwal wrote: > Hi Chris, > > On 11 August 2016 at 20:16, Chris Wilson wrote: > > Since fence_wait_timeout_reservation_object_wait_timeout_rcu() with a > > timeout of 0 becomes reservation_object_test_signaled_rcu(), we do n

[PATCH] dma-buf: Introduce fence_get_rcu_safe()

2016-08-11 Thread Chris Wilson
-by: Chris Wilson Cc: Daniel Vetter Cc: Sumit Semwal --- include/linux/fence.h | 51 ++- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/include/linux/fence.h b/include/linux/fence.h index 5f50ab273c38..e93f7e70d0fe 100644 --- a/include

[PATCH 1/2] drm: Introduce DRM_DEV_* log messages

2016-08-12 Thread Chris Wilson
sages would have better conformity, especially between our messages and those printed by subsystems on our behalf (using our struct device). -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH v2 1/2] drm: Introduce DRM_DEV_* log messages

2016-08-12 Thread Chris Wilson
; > Signed-off-by: Sean Paul > --- > > Changes in v2: > - Use dev_printk for the dev variant (Chris Wilson) > > > drivers/gpu/drm/drm_drv.c | 31 +-- > include/drm/drmP.h| 133 > -- >

[PATCH v2 1/2] drm: Introduce DRM_DEV_* log messages

2016-08-12 Thread Chris Wilson
On Fri, Aug 12, 2016 at 09:26:32PM +0200, Lukas Wunner wrote: > On Fri, Aug 12, 2016 at 07:39:38PM +0100, Chris Wilson wrote: > > On Fri, Aug 12, 2016 at 01:30:00PM -0400, Sean Paul wrote: > > > This patch consolidates all the various log functions/macros into > > >

[PATCH v3 1/2] drm: Introduce DRM_DEV_* log messages

2016-08-12 Thread Chris Wilson
iple devices of the same type. > > Signed-off-by: Sean Paul > --- > > Changes in v2: > - Use dev_printk for the dev variant (Chris Wilson) > > Changes in v3: > - Rename drm_log to drm_dev_printk (Chris Wilson) > - Break out drm_printk from drm_dev_p

[PATCH v3 01/11] drm/i915: Add i915 perf infrastructure

2016-08-15 Thread Chris Wilson
loff_t *ppos) > +{ > + struct i915_perf_read_state state = { count, 0, buf }; > + int ret = stream->ops->read(stream, ); > + > + /* If we've successfully copied any data then reporting that > + * takes precedence over any internal error status, so the > + * data isn't lost > + */ > + return state.read ? state.read : (ret ? ret : -EAGAIN); return state.read ?: ret ?: -EAGAIN; Alternatively you could follow the standard pattern for read. Dare I ask what is going to go into state that needs the obfuscation? -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH v3 03/11] drm/i915: return EACCES for check_cmd() failures

2016-08-15 Thread Chris Wilson
d is invalid. > > The distinction makes the difference between allowing the buffer to be > executed as an unprivileged batch buffer or returning an EINVAL error to > userspace without executing anything. Ah, but you choose to actually execute it instead. We can't allow that either. -Chris --

[PATCH v2] dma-buf: Wait on the reservation object when sync'ing before CPU access

2016-08-15 Thread Chris Wilson
igt/prime_vgem Testcase: igt/gem_concurrent_blit # *vgem* Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Daniel Vetter Cc: Eric Anholt Cc: linux-media at vger.kernel.org Cc: dri-devel at lists.freedesktop.org Cc: linaro-mm-sig at lists.linaro.org Cc: linux-kernel at vger.kernel.org --- driv

[PATCH v2] drm/i915: Use common RPS scheme for Cherryview

2016-08-15 Thread Chris Wilson
tune them appropriately to benefit everyone. Signed-off-by: Chris Wilson Cc: fritsch at kodi.tv Cc: Deepak S Cc: Ville Syrjälä Cc: Rodrigo Vivi Cc: Daniel Vetter --- drivers/gpu/drm/i915/intel_pm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/in

[PATCH v2] drm/i915: Use common RPS scheme for Cherryview

2016-08-15 Thread Chris Wilson
Apolgies, I changed trees between resending after the first git-send-email bounced off the wrong address. -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH v2] dma-buf: Wait on the reservation object when sync'ing before CPU access

2016-08-15 Thread Chris Wilson
igt/prime_vgem Testcase: igt/gem_concurrent_blit # *vgem* Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Daniel Vetter Cc: Eric Anholt Cc: linux-media at vger.kernel.org Cc: dri-devel at lists.freedesktop.org Cc: linaro-mm-sig at lists.linaro.org Cc: linux-kernel at vger.kernel.org --- driv

[PATCH v3 06/11] drm/i915: Enable i915 perf stream for Haswell OA unit

2016-08-15 Thread Chris Wilson
;ggtt_alignment, > + 0); > + if (ret) > + return ret; > + > + i915_oa_legacy_context_pin_notify(dev_priv, ctx); > + > + return 0; > +} I am still not all at all happy with this. I hope the recent changes to do the vma tracking make it clear. -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH v3 01/11] drm/i915: Add i915 perf infrastructure

2016-08-16 Thread Chris Wilson
On Tue, Aug 16, 2016 at 03:59:24PM +0100, Robert Bragg wrote: >On Mon, Aug 15, 2016 at 3:57 PM, Chris Wilson > Alternatively you could follow the standard pattern for read. Dare I ask > what is going to go into state that needs the obfuscation? > >I had dug arou

[PATCH 1/2] drm: Allow drivers to modify plane_state in prepare_fb/cleanup_fb

2016-08-18 Thread Chris Wilson
The drivers have to modify the atomic plane state during the prepare_fb callback so they track allocations, reservations and dependencies for this atomic operation involving this fb. In particular, how else do we set the plane->fence from the framebuffer! Signed-off-by: Chris Wilson Cc: Dan

[PATCH 2/2] drm/i915: Replace intel_plane->wait_req with plane->fence

2016-08-18 Thread Chris Wilson
Now that we subclass our request from struct fence, we start using the common primitives more freely and so avoid hand-rolling routines already provided for by the helpers. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_atomic_plane.c | 3 -- drivers/gpu/drm/i915/intel_display.c

[PATCH] drm: Avoid calling dev_printk(.dev = NULL)

2016-08-19 Thread Chris Wilson
Since dev_printk likes to print "(NULL device *):" when passed in a NULL pointer, we have to manually call printk() ourselves. Fixes: c4e68a583202 ("drm: Introduce DRM_DEV_* log messages") Signed-off-by: Chris Wilson Cc: Eric Engestrom Cc: Sean Paul --- drivers/g

[PATCH v4 07/11] drm/i915: advertise available metrics via sysfs

2016-08-19 Thread Chris Wilson
mutex_lock(_priv->perf.lock); > + > + dev_priv->perf.metrics_kobj = > + kobject_create_and_add("metrics", > + _priv->drm.primary->kdev->kobj); > + if (!dev_priv->perf.metrics_kobj) > + goto exit; > + > + if (i915_perf_init_sysfs_hsw(dev_priv)) { If you say hsw only, I expect to see a local check or comment saying we are on Haswell. -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH] drm: Reject page_flip for !DRIVER_MODESET

2016-08-20 Thread Chris Wilson
gt; > Reported-by: Alexander Potapenko > Cc: Alexander Potapenko > Cc: stable at vger.kernel.org > Signed-off-by: Daniel Vetter That explains the oops. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH] drm: Wrap direct calls to driver->gem_free_object from CMA

2016-05-31 Thread Chris Wilson
upport BO freeing without dev->struct_mutex). Reported-by: Robert Foss Fixes: 9f0ba539d13ae (drm/gem: support BO freeing without dev->struct_mutex) Signed-off-by: Chris Wilson Cc: Robert Foss Cc: Daniel Vetter Cc: Eric Anholt Cc: Alex Deucher Cc: Lucas Stach Cc: stable at vge

[PATCH] drm: Restore double clflush on the last partial cacheline

2016-05-01 Thread Chris Wilson
This effectively reverts commit afcd950cafea6e27b739fe7772cbbeed37d05b8b Author: Chris Wilson Date: Wed Jun 10 15:58:01 2015 +0100 drm: Avoid the double clflush on the last cache line in drm_clflush_virt_range() as we have observed issues with serialisation of the clflush operations

[PATCH v8 11/12] drm/i915: Add more Haswell OA metric sets

2016-11-01 Thread Chris Wilson
ompute_basic); > + > + return 0; > int > i915_perf_register_sysfs_hsw(struct drm_i915_private *dev_priv) > { > @@ -178,9 +685,49 @@ i915_perf_register_sysfs_hsw(struct drm_i915_private > *dev_priv) > if (ret) > goto error_render_basic; > } > + if (get_compute_basic_mux_config(dev_priv, _len)) { Why not use the derived state in dev_priv->perf.oa.mux_regs? Then we only expose what is initialised. -Chris -- Chris Wilson, Intel Open Source Technology Centre

[Intel-gfx] [PATCH 1/2] drm/i915: Remove redundant reprobe in i915_drm_resume

2016-11-03 Thread Chris Wilson
ually reseting the connector->status to unknown in drm_mode_config_reset(), Daniel! -Chris -- Chris Wilson, Intel Open Source Technology Centre

[Intel-gfx] [PATCH 1/2] drm/i915: Remove redundant reprobe in i915_drm_resume

2016-11-03 Thread Chris Wilson
On Thu, Nov 03, 2016 at 12:11:55PM -0400, Lyude Paul wrote: > On Thu, 2016-11-03 at 12:11 -0400, Lyude Paul wrote: > > On Thu, 2016-11-03 at 16:02 +0000, Chris Wilson wrote: > > > > > > On Thu, Nov 03, 2016 at 11:42:37AM -0400, Lyude wrote: > > > >

[PATCH] dma-buf/fence-array: enable_signaling from wq

2016-11-03 Thread Chris Wilson
if (is_signaled(array->fences[i]) && !--num_pending) { atomic_set(>num_pending, 0); return false; } dma_fence_get(>base); queue_work(system_unbound_wq, >enable_signaling_worker); } -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH] dma-buf/fence-array: enable_signaling from wq

2016-11-04 Thread Chris Wilson
On Thu, Nov 03, 2016 at 07:34:02PM -0400, Rob Clark wrote: > On Thu, Nov 3, 2016 at 5:41 PM, Chris Wilson > wrote: > > static bool dma_fence_array_enable_signaling(struct dma_fence *fence) > > { > > struct dma_fence_array *array = to_dma_fence_array(fence); >

redraw issues on i915 since 4.9-rc

2016-11-04 Thread Chris Wilson
m-intel/ #drm-intel-nightly contains one interesting patch wrt to the partial vma->pages https://cgit.freedesktop.org/drm-intel/commit/?h=drm-intel-next-queued=d2a84a76a3b970fa32e6eda3d85e7782f831379e Do you mind testing -nightly to see if I'm barking up the wrong tree? -Chris -- Chris Wilson, Intel Open Source Technology Centre

redraw issues on i915 since 4.9-rc

2016-11-04 Thread Chris Wilson
/drm-intel/commit/?h=drm-intel-next-queued=d2a84a76a3b970fa32e6eda3d85e7782f831379e > > Do you want me to test this patch only on top of master? (If it applies!!!) It won't apply directly, but you could try testing that commit and its parent to see if my hunch was correct. Thanks, -Chris

redraw issues on i915 since 4.9-rc

2016-11-05 Thread Chris Wilson
e highest version). Since my guess was wrong, any clues you can find to point me in the direction will be very useful. -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH v7 0/3] drm: add explict fencing

2016-11-08 Thread Chris Wilson
t these operations, they are not included in the explicit fence they provide, at which point we can't trust their fence to the exclusion of the implicit fences... -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH v7 0/3] drm: add explict fencing

2016-11-08 Thread Chris Wilson
On Tue, Nov 08, 2016 at 12:32:56PM +0100, Daniel Vetter wrote: > On Tue, Nov 08, 2016 at 10:35:08AM +0000, Chris Wilson wrote: > > On Tue, Nov 08, 2016 at 03:54:47PM +0900, Gustavo Padovan wrote: > > > From: Gustavo Padovan > > > > > > Hi, > > >

[PATCH] drm: Add stackdepot include for DRM_DEBUG_MM

2016-11-08 Thread Chris Wilson
0day found that stackdepot.h doesn't get automatically included on all architectures, so remember to add our #include. Reported-by: kbuild test robot Fixes: 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown") Signed-off-by: Chris Wilson Cc: Daniel Vetter --- d

[PATCH v7 0/3] drm: add explict fencing

2016-11-08 Thread Chris Wilson
On Tue, Nov 08, 2016 at 01:43:40PM +0100, Daniel Vetter wrote: > On Tue, Nov 08, 2016 at 11:45:51AM +0000, Chris Wilson wrote: > > On Tue, Nov 08, 2016 at 12:32:56PM +0100, Daniel Vetter wrote: > > > On Tue, Nov 08, 2016 at 10:35:08AM +, Chris Wilson wrote: > > > &

[PATCH] drm: Add stackdepot include for DRM_DEBUG_MM

2016-11-08 Thread Chris Wilson
On Tue, Nov 08, 2016 at 01:46:15PM +0100, Daniel Vetter wrote: > On Tue, Nov 08, 2016 at 11:56:01AM +0000, Chris Wilson wrote: > > 0day found that stackdepot.h doesn't get automatically included on all > > architectures, so remember to add our #include. > > > > Rep

[PATCH 1/2] drm/i915: Restrict DRM_DEBUG_MM automatic selection

2016-11-08 Thread Chris Wilson
DRM_DEBUG_MM is only valid if the DRM.ko is builtin as currently depot_save_stack is not exported. Fixes: 5c7fcf2db027 ("drm/i915: Enable drm_mm debug when enabling DRM_I915_DEBUG") Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/Kconfig.debug | 2 +- 1 file changed, 1 inser

[PATCH 2/2] drm: Restrict stackdepot usage to builtin drm.ko

2016-11-08 Thread Chris Wilson
Fixes: 5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown") Signed-off-by: Chris Wilson --- drivers/gpu/drm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 25e8e3793d29..d6ee0592b

[PATCH] drm/i915: avoid harmless empty-body warning

2016-11-08 Thread Chris Wilson
f9 ("drm/i915: Queue the idling context switch after all > other timelines") > Signed-off-by: Arnd Bergmann Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[drm-intel:topic/drm-misc 1/2] backtracetest.c:undefined reference to `save_stack_trace'

2016-11-09 Thread Chris Wilson
fined reference to `save_stack_trace' Anyone got an idea for this one? m68k is missing save_stack_trace(). There's no arch CONFIG_HAS_SAVE_STACK_TRACE, it looks like an oversight in arch/m68k. -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH] drm: Make DRM_DEBUG_MM depend on STACKTRACE_SUPPORT

2016-11-09 Thread Chris Wilson
0day continues to complain about trying to save a stacktrace for the users of the drm_mm range allocator. This time, it is that m68k has no save_stack_trace(), which is apparently guarded by STACKTRACE_SUPPORT. Make it depend so! Reported-by: kbuild test robot Signed-off-by: Chris Wilson Cc

4.9-rc1 lockdep warning suggesting a deadlock between nouveau and i915 with prime video outputs active

2016-11-09 Thread Chris Wilson
/** \name Locks */ /*@{ */ + struct lock_class_key struct_mutex_class; struct mutex struct_mutex; /**< For others */ struct mutex master_mutex; /**< For drm_minor::master and drm_file::is_master */ /*@} */ to test for a false positive

[PATCH v2] drm: Add missing mutex_destroy in drm_dev_init/release

2016-11-10 Thread Chris Wilson
On Thu, Nov 10, 2016 at 03:50:35PM +0200, Joonas Lahtinen wrote: > Add 3 missing mutex_destroy to drm_dev_init teardown and > drm_dev_release. > > v2: > - Also include drm_dev_release > > Signed-off-by: Joonas Lahtinen Reviewed-by: Chris Wilson -Chris -- Chris Wils

[PATCH 2/2] drm/i915: Update i915_driver_load kerneldoc

2016-11-11 Thread Chris Wilson
On Thu, Nov 10, 2016 at 03:36:34PM +0200, Joonas Lahtinen wrote: > Update i915_driver_load kerneldoc to match code. > > Cc: Chris Wilson > Signed-off-by: Joonas Lahtinen Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH] dma-buf: Replace reservation shared fence array with a compressed radix tree

2016-11-14 Thread Chris Wilson
ocation. Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Lucas Stach Cc: Russell King <linux+etnaviv at armlinux.org.uk> Cc: Christian Gmeiner Cc: Daniel Vetter Cc: Jani Nikula Cc: Rob Clark Cc: Ben Skeggs Cc: Chunm

[PATCH] dma-buf: Use fence_get_rcu_safe() for retrieving the exclusive fence

2016-11-14 Thread Chris Wilson
urning it back to the caller. (Note the fix only requires using dma_fence_get_rcu() and correct handling, but we may as well use the helper rather than inline equivalent code.) Signed-off-by: Chris Wilson Cc: Sumit Semwal seq); + + if (!rcu_access_pointer(obj->fence_excl)) + re

[PATCH] dma-buf: Use fence_get_rcu_safe() for retrieving the exclusive fence

2016-11-14 Thread Chris Wilson
On Mon, Nov 14, 2016 at 11:55:40AM +, Chris Wilson wrote: > The current code is subject to a race where we may try to acquire a > reference on a stale fence: >From i915.ko pov, this Fixes: d07f0e59b2c7 ("drm/i915: Move GEM activity tracking into a common struct reservation_o

[PATCH v11 2/3] drm/fence: add fence timeline to drm_crtc

2016-11-15 Thread Chris Wilson
nitializing fences. > + */ > +extern const struct dma_fence_ops drm_crtc_fence_ops; > + > +static inline struct drm_crtc *fence_to_crtc(struct dma_fence *fence) > +{ > + BUG_ON(fence->ops != _crtc_fence_ops); > + return container_of(fence->lock, struct drm_crtc, fence_lock); > +} If you are planning to export this for use by drivers, you are missing the EXPORT_SYMBOL(drm_crtc_fence_ops). -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH v11 2/3] drm/fence: add fence timeline to drm_crtc

2016-11-15 Thread Chris Wilson
On Tue, Nov 15, 2016 at 08:25:55AM +, Chris Wilson wrote: > On Tue, Nov 15, 2016 at 10:57:35AM +0900, Gustavo Padovan wrote: > > /** > > + * dma_crtc_fence_ops - fence ops for the drm_crtc timeline > > + * > > + * It contains the dma_fence_ops that should

[PATCH v11 2/3] drm/fence: add fence timeline to drm_crtc

2016-11-15 Thread Chris Wilson
On Tue, Nov 15, 2016 at 05:42:35PM +0900, Gustavo Padovan wrote: > 2016-11-15 Chris Wilson : > > > On Tue, Nov 15, 2016 at 10:57:35AM +0900, Gustavo Padovan wrote: > > > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h > > > index 11780a9..0870de1

[Intel-gfx] [PATCH 04/10] drm: Extract drm_drv.h

2016-11-15 Thread Chris Wilson
/* Debugfs support */ > #if defined(CONFIG_DEBUG_FS) > extern int drm_debugfs_create_files(const struct drm_info_list *files, > @@ -1064,18 +779,6 @@ extern void drm_pci_free(struct drm_device *dev, struct > drm_dma_handle * dmah); > extern void drm_sysfs_hotplug_event(struct drm_device *dev); > > > -struct drm_device *drm_dev_alloc(struct drm_driver *driver, > - struct device *parent); > -int drm_dev_init(struct drm_device *dev, > - struct drm_driver *driver, > - struct device *parent); > -void drm_dev_ref(struct drm_device *dev); > -void drm_dev_unref(struct drm_device *dev); > -int drm_dev_register(struct drm_device *dev, unsigned long flags); > -void drm_dev_unregister(struct drm_device *dev); > - > -struct drm_minor *drm_minor_acquire(unsigned int minor_id); > -void drm_minor_release(struct drm_minor *minor); > > /*@}*/ > > diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h > new file mode 100644 > index ..98f930a76e6d > --- /dev/null > +++ b/include/drm/drm_drv.h > @@ -0,0 +1,337 @@ > +/* > + * Copyright 2016 Intel Corp. Careful, it's a mix of some new and lots old. To be on the safe side, it should retain all the copyright statements of the original. Otherwise, pretty sure it was mechanical, Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[Intel-gfx] [PATCH 06/10] drm: Consolidate dumb buffer docs

2016-11-15 Thread Chris Wilson
On Mon, Nov 14, 2016 at 12:58:21PM +0100, Daniel Vetter wrote: > Put the callback docs into struct drm_driver, and the small overview > into a DOC comment. > > Signed-off-by: Daniel Vetter Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[Intel-gfx] [PATCH 08/10] drm: Extract drm_mode_config.[hc]

2016-11-15 Thread Chris Wilson
> + > /* drm_dumb_buffers.c */ > +int drm_modeset_register_all(struct drm_device *dev); > +void drm_modeset_unregister_all(struct drm_device *dev); > I was worried for a moment. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH 10/10] drm: Drop externs from drm_crtc.h

2016-11-15 Thread Chris Wilson
On Mon, Nov 14, 2016 at 12:58:25PM +0100, Daniel Vetter wrote: > Just noise. > > Signed-off-by: Daniel Vetter Sometimes it is interesting. Practice across the kernel is mixed, but convergence on not putting extern. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Op

[Intel-gfx] [PATCH 05/10] drm: Clean up kerneldoc for struct drm_driver

2016-11-15 Thread Chris Wilson
On Mon, Nov 14, 2016 at 12:58:20PM +0100, Daniel Vetter wrote: > Just cleans up what's there, still plenty missing. > > Signed-off-by: Daniel Vetter I read it, seems to match my limited understanding of kerneldoc. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source T

[Intel-gfx] [PATCH 07/10] drm/print: Move kerneldoc next to definition

2016-11-15 Thread Chris Wilson
gt; Fixes: d8187177b0b1 ("drm: add helper for printing to log or seq_file") > Cc: Rob Clark > Cc: Sean Paul > Signed-off-by: Daniel Vetter Oh well, I liked the practice of having interface descriptions in the headers. If they are in the body, I may as well just read the code.

[PATCH 09/10] drm: Move tile group code into drm_connector.c

2016-11-15 Thread Chris Wilson
up and entirely > documented. > > Signed-off-by: Daniel Vetter Code motion looks ok, placement inside the rst I'll take you at your word. Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[Intel-gfx] [PATCH 01/10] drm: Extract drm_dumb_buffers.c

2016-11-15 Thread Chris Wilson
uct drm_device *dev, > +void *data, struct drm_file *file_priv); > +int drm_mode_mmap_dumb_ioctl(struct drm_device *dev, > + void *data, struct drm_file *file_priv); > +int drm_mode_destroy_dumb_ioctl(struct drm_device *dev, > + void *data, struct drm_file *file_priv); > + > /* drm_color_mgmt.c */ > > /* IOCTLs */ > diff --git a/drivers/gpu/drm/drm_dumb_buffers.c > b/drivers/gpu/drm/drm_dumb_buffers.c > new file mode 100644 > index ..4b4364b61c8d > --- /dev/null > +++ b/drivers/gpu/drm/drm_dumb_buffers.c > @@ -0,0 +1,135 @@ > +/* > + * Copyright (c) 2016 Intel Corporation I've mentioned this elsewhere, but we should also retain the original copyright statements for the code we are copying. Otherwise, Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH 02/10] drm/i915: Fixup kerneldoc includes

2016-11-15 Thread Chris Wilson
GNORE_DOCBOOKS=1 SPHINXOPTS=-W htmldocs" is that outdated? I don't often run it since it is too slow when checking hundreds of patches. Any chance of an incremental patch checker? > Fixes: b42fe9ca0a1e ("drm/i915: Split out i915_vma.c") > Cc: Tvrtko Ursulin > Cc: Chris Wilson

[PATCH 03/10] doc/dma-buf: Fix up include directives

2016-11-15 Thread Chris Wilson
d1867005c ("dma-buf: Rename struct fence to dma_fence") > Cc: Chris Wilson > Cc: Gustavo Padovan > Cc: Sumit Semwal > Cc: Christian König > Signed-off-by: Daniel Vetter Weird, I caught some of the stale Documents/, obviously that didn't trigger a warning that I needed

[Intel-gfx] [PATCH 01/10] drm: Extract drm_dumb_buffers.c

2016-11-15 Thread Chris Wilson
On Tue, Nov 15, 2016 at 12:47:31PM +0100, Daniel Vetter wrote: > On Tue, Nov 15, 2016 at 10:42:08AM +0000, Chris Wilson wrote: > > On Mon, Nov 14, 2016 at 12:58:16PM +0100, Daniel Vetter wrote: > > > diff --git a/drivers/gpu/drm/drm_dumb_buffers.c > > > b/drivers

[PATCH] dma-buf: Provide wrappers for reservation's lock

2016-11-15 Thread Chris Wilson
Joonas complained that writing ww_mutex_lock(>lock, ctx) was too intrusive compared to reservation_object_lock(resv, ctx); Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Joonas Lahtinen --- include/linux/reservation.h | 34 ++ 1 file changed, 34 inserti

[PATCH v12 3/3] drm/fence: add out-fences support

2016-11-16 Thread Chris Wilson
e->base.fence = fence; > - > return e; > } > > @@ -1793,6 +1809,165 @@ void drm_atomic_clean_old_fb(struct drm_device *dev, > } > EXPORT_SYMBOL(drm_atomic_clean_old_fb); > > +static struct dma_fence *get_crtc_fence(struct drm_crtc *crtc) > +{ return drm_crtc_fence_create(crtc); (or possibly, drm_crtc_fence_get(), drm_crtc_timeline_advance() or somesuch if we need finer control over fence_seqno) Or if you want to embed it, struct our_fence *fence; fence = kzalloc(sizeof(*fence), GFP_KERNEL); if (!fence) return NULL; drm_crtc_fence_init(crtc, >base); return >base; Looks tidier than dumping all the fence construction here > + dma_fence_init(fence, _crtc_fence_ops, >fence_lock, > +crtc->fence_context, ++crtc->fence_seqno); -- Chris Wilson, Intel Open Source Technology Centre

[PATCH v2 1/4] drm: Define drm_mm_for_each_node_in_range()

2016-11-17 Thread Chris Wilson
Some clients would like to iterate over every node within a certain range. Make a nice little macro for them to hide the mixing of the rbtree search and linear walk. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: dri-devel at lists.freedesktop.org --- drivers/gpu/drm/drm_mm.c | 11

[PATCH] drm: Define drm_mm_for_each_node_in_range()

2016-11-17 Thread Chris Wilson
Some clients would like to iterate over every node within a certain range. Make a nice little macro for them to hide the mixing of the rbtree search and linear walk. v2: Blurb Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: dri-devel at lists.freedesktop.org --- drivers/gpu/drm/drm_mm.c

[Intel-gfx] [PATCH 3/3] drm/dp/mst: Track available time slots in DP Multi-Stream Transport Packet

2016-11-18 Thread Chris Wilson
ret = -ENOSPC; > + goto out; > + } You are not atomically reducing the mgr->avail_slots, leading to possible overallocation of multiple streams? -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH] drm/vgem: Allow root to inject hanging fences onto dmabufs

2016-11-18 Thread Chris Wilson
On Wed, Jul 20, 2016 at 08:39:43PM +0100, Chris Wilson wrote: > When performing driver testing, one factor we want to test is how we > handle a foreign fence that is never signaled. We can wait on that fence > indefinitely, in which case the driver appears hung, or we can take some &

[PATCH v2] Revert "dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)"

2016-11-18 Thread Chris Wilson
; For now we will revert the change and enable signaling everytime time > poll is called with timeout=0 as well. > > Cc: Chris Wilson > Signed-off-by: Gustavo Padovan Acked-by: Chris Wilson I have some patches to use a bit on fence_array->flags to indicate where we can use this shortcu

[Intel-gfx] [PATCH] drm/vgem: Allow root to inject hanging fences onto dmabufs

2016-11-18 Thread Chris Wilson
On Fri, Nov 18, 2016 at 10:40:02AM +0100, Daniel Vetter wrote: > On Fri, Nov 18, 2016 at 08:49:37AM +0000, Chris Wilson wrote: > > On Wed, Jul 20, 2016 at 08:39:43PM +0100, Chris Wilson wrote: > > > When performing driver testing, one factor we want to test is how we > >

[Intel-gfx] v4.9-rc3: graphical artefacts in X

2016-11-18 Thread Chris Wilson
ks it, > depending in how fast I switch. (Yes, strange). The fix should have landed in v4.9-rc5 -Chris -- Chris Wilson, Intel Open Source Technology Centre

[PATCH 2/5] drm: Set DRM connector link status property

2016-11-19 Thread Chris Wilson
plaining why link_status is duplicated on the connector and in its property (i.e. that is near impossible to retrieve the value from the property). > + connector->link_status = link_status; > + drm_object_property_set_value(>base, > + dev->mode_config.link_status_property, > + link_status); > +} > +EXPORT_SYMBOL(drm_mode_connector_set_link_status_property); -- Chris Wilson, Intel Open Source Technology Centre

[Intel-gfx] [PATCH 3/5] drm/i915: Update CRTC state if connector link status property changed

2016-11-21 Thread Chris Wilson
finitely need to document this properly in the property docs, no > > > > matter > > > > what we decide. > > > > > > Hmm. I think I kinda like this idea of userspace clear the state back > > > to good explicitly, if it happens with the same prop. So it's like > > > Maarten's retrain_link prop idea, but without having to add the second > > > prop to the mix. > > > > > > It would also save me from pointing out (for the nth time) that the > > > link status should really be cleared to good during the commit state > > > swap and not at some random point during the commit ;) > > > > > > > Okay, so change 1 is to make the userspace clear the state back to Good for > > the property.. > > Then Change 2 is to set connector_changed flag in crtc_state to true if > > this property changed > > from BAD to GOOD. I am not quite how and where to change this to state > > connector_changed to true. > > Without this the full modeset will not happen and the whole design of > > retrianing is lost. > > To make this work we need a few more bits: > > - link-status needs to become a full-blown atomic property. This means we > need to move link_status into drm_connector_state, mark the property as > type ATOMIC and wire up the get/set stuff. > > - once that's done it's also pretty easy to set crtc->connectors_changed > from the atomic helpers. You can just compare old and new link_status in > drm_connector_state, similar to how we compare old/new CRTC in > drm_connector_state->crtc already. > > - Another fallout is that legacy clients will no longer see the > link-status property. And they won't be able to set it through the > SETCRTC ioctl, which would kinda defaut the point. I think the best > solution would be to check for link_status == BAD in > drm_atomic_helper_set_config, and reset it to good automatically for > legacy clients. Then how do they know that the kernel demands the modeset? Both a legacy and atomic property? -Chris -- Chris Wilson, Intel Open Source Technology Centre

[Intel-gfx] [PATCH 3/5] drm/i915: Update CRTC state if connector link status property changed

2016-11-21 Thread Chris Wilson
On Mon, Nov 21, 2016 at 11:00:52AM -0800, Manasi Navare wrote: > On Mon, Nov 21, 2016 at 04:48:07PM +0100, Daniel Vetter wrote: > > On Mon, Nov 21, 2016 at 11:10:45AM +0100, Daniel Vetter wrote: > > > On Mon, Nov 21, 2016 at 09:42:57AM +, Chris Wilson wrote: > > > &

[Intel-gfx] [PATCH 07/12] lib/igt_kms: Add support for the OUT_FENCE_PTR property

2016-11-22 Thread Chris Wilson
@@ -110,6 +110,7 @@ enum igt_atomic_crtc_properties { > > IGT_CRTC_GAMMA_LUT, > > IGT_CRTC_MODE_ID, > > IGT_CRTC_ACTIVE, > >+ IGT_CRTC_OUT_FENCE_PTR, > > IGT_NUM_CRTC_PROPS > >}; > > > >@@ -298,6 +299,7 @@ struct igt_pipe { > > > > uint64_t mode_blob; > > bool mode_changed; > >+uint64_t out_fence_ptr; > > IMO this should be: > > int64_t *out_fence_ptr; In userspace, fences are *fd*, a plain int. It is only the uabi that we pass pointers as u64 to the kernel, and indeed that should be limited to the uabi wrapper. -Chris -- Chris Wilson, Intel Open Source Technology Centre

[Intel-gfx] [PATCH 07/12] lib/igt_kms: Add support for the OUT_FENCE_PTR property

2016-11-22 Thread Chris Wilson
On Tue, Nov 22, 2016 at 11:54:57AM +, Brian Starkey wrote: > On Tue, Nov 22, 2016 at 11:06:00AM +0000, Chris Wilson wrote: > >On Tue, Nov 22, 2016 at 10:53:51AM +, Brian Starkey wrote: > >>Hi Gustavo, > >> > >>A little late to the party her

[PATCH 1/3] drm: Hold mode_config.lock to prevent hotplug whilst setting up crtcs

2016-11-23 Thread Chris Wilson
off-by: Chris Wilson --- drivers/gpu/drm/drm_fb_helper.c | 73 ++--- 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 14547817566d..d13c85682891 100644 --- a/drivers/gpu/

[PATCH 2/3] drm: Pull together probe + setup for drm_fb_helper

2016-11-23 Thread Chris Wilson
drm_fb_helper_probe_connector_modes() is always called before drm_setup_crtcs(), so just move the call into drm_setup_crtcs for a small bit of code compaction. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_fb_helper.c | 37 +++-- 1 file changed, 11

[PATCH 3/3] drm: Protect fb_helper list manipulation with a mutex

2016-11-23 Thread Chris Wilson
Though we only walk the kernel_fb_helper_list inside a panic (or single thread debugging), we still need to protect the list manipulation on creating/removing a framebuffer device in order to prevent list corruption. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_fb_helper.c | 5 + 1

[PATCH 1/5] drm: Define drm_mm_for_each_node_in_range()

2016-11-23 Thread Chris Wilson
Some clients would like to iterate over every node within a certain range. Make a nice little macro for them to hide the mixing of the rbtree search and linear walk. v2: Blurb Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: dri-devel at lists.freedesktop.org Reviewed-by: Joonas Lahtinen

[PATCH 2/5] drm: Check against color expansion in drm_mm_reserve_node()

2016-11-23 Thread Chris Wilson
Use the color_adjust callback when reserving a node to check if inserting a node into this hole requires any additional space, and so if that space then conflicts with an existing allocation. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: dri-devel at lists.freedesktop.org Reviewed

[PATCH] drm: Fixup kernel doc for driver->gem_create_object

2016-11-25 Thread Chris Wilson
Silences ./include/drm/drm_drv.h:295: warning: Incorrect use of kernel-doc format Signed-off-by: Chris Wilson --- include/drm/drm_drv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index aad8bbacd1f0..52bf44e2b5cc 100644 --- a/include/drm

[PATCH 1/3] drm/i915: Use helper for setting plane->state->fb

2016-11-25 Thread Chris Wilson
We are told not to set plane_state->fb directly, but use drm_atomic_set_fb_for_plane() instead. Using the helper, means one less piece of code that needs fixing should the interface change... Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_display.c | 6 +- 1 file changed

[PATCH 3/3] drm: Track framebuffer references at the point of assignment

2016-11-25 Thread Chris Wilson
it to the reference handling to prevent invalid use. Signed-off-by: Chris Wilson --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/armada/armada_crtc.c| 9 + drivers/gpu/drm/bochs/bochs_kms.c | 2 +- drivers/gpu/drm/drm_atomic.c| 44

[PATCH 2/3] drm: Introduce drm_framebuffer_assign()

2016-11-25 Thread Chris Wilson
In a couple of places currently, and with the intent to add more, we update a pointer to a framebuffer to hold a new fb reference (evicting the old). Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_atomic.c | 8 ++-- include/drm/drm_framebuffer.h | 18 ++ 2 files

<    4   5   6   7   8   9   10   11   12   13   >