[PATCH 1/2] drm/syncobj: Convert syncobj_idr to XArray

2019-08-02 Thread Chris Wilson
Prior to making the syncobj lookup lockless, update the idr to the new XArray API. Based on a patch by Matthew Wilcox Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_syncobj.c | 64 ++- include/drm/drm_file.h| 7 ++-- 2 files changed, 21 insertions

Re: [Intel-gfx] [PATCH] drm/i915: Don't select BROKEN

2019-11-05 Thread Chris Wilson
Quoting Daniel Vetter (2019-11-05 19:38:29) > It's broken. So is the code that depends on it. Which is the entire point. Don't select it then. -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listin

Re: [Intel-gfx] [PATCH] drm/i915: Don't select BROKEN

2019-11-05 Thread Chris Wilson
Quoting Daniel Vetter (2019-11-05 19:38:29) > It's broken. > > Reported-by: Stephen Rothwell > References: > https://lists.freedesktop.org/archives/dri-devel/2019-November/242625.html > Signed-off-by: Daniel Vetter > --- > Note: Probably best to apply this directly onto drm-next to avoid > havi

Re: [Intel-gfx] [PATCH] drm/i915: Don't select BROKEN

2019-11-05 Thread Chris Wilson
Quoting Daniel Vetter (2019-11-05 20:58:25) > On Tue, Nov 5, 2019 at 9:38 PM Chris Wilson wrote: > > > > Quoting Daniel Vetter (2019-11-05 19:38:29) > > > It's broken. > > > > > > Reported-by: Stephen Rothwell > > > References: >

Re: [Intel-gfx] [PATCH] drm/i915: Don't select BROKEN

2019-11-05 Thread Chris Wilson
Quoting Daniel Vetter (2019-11-05 20:58:25) > On Tue, Nov 5, 2019 at 9:38 PM Chris Wilson wrote: > > > > Quoting Daniel Vetter (2019-11-05 19:38:29) > > > It's broken. > > > > > > Reported-by: Stephen Rothwell > > > References: >

[PATCH 3/3] drm/prime: Use anon_drm_getfile() for an internal drm struct file

2019-11-06 Thread Chris Wilson
Currently the drm_prime mmap fallback uses a mock struct file to provide the file pointer into the backend mmap routine. Now that we can create fully fledged anonymous struct file around the drm device, put it to use. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_prime.c | 26

[PATCH 2/3] drm/i915/selftests: Wrap vm_mmap() around GEM objects

2019-11-06 Thread Chris Wilson
Provide a utility function to create a vma corresponding to an mmap() of our device. And use it to exercise the equivalent of userspace performing a GTT mmap of our objects. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915

[PATCH 1/3] drm: Expose a method for creating anonymous struct file around drm_minor

2019-11-06 Thread Chris Wilson
Sometimes we need to create a struct file to wrap a drm_device, as it the user were to have opened /dev/dri/card0 but to do so anonymously (i.e. for internal use). Provide a utility method to create a struct file with the drm_device->driver.fops, that wrap the drm_device. Signed-off-by: Ch

Re: [Intel-gfx] [PATCH 1/3] drm: Expose a method for creating anonymous struct file around drm_minor

2019-11-06 Thread Chris Wilson
Quoting Daniel Vetter (2019-11-06 10:19:50) > On Wed, Nov 06, 2019 at 10:07:14AM +0000, Chris Wilson wrote: > > Sometimes we need to create a struct file to wrap a drm_device, as it > > the user were to have opened /dev/dri/card0 but to do so anonymously > > (i.e. for int

Re: [Intel-gfx] [PATCH 1/3] drm: Expose a method for creating anonymous struct file around drm_minor

2019-11-06 Thread Chris Wilson
Quoting Chris Wilson (2019-11-06 10:26:48) > Quoting Daniel Vetter (2019-11-06 10:19:50) > > On Wed, Nov 06, 2019 at 10:07:14AM +0000, Chris Wilson wrote: > > > Sometimes we need to create a struct file to wrap a drm_device, as it > > > the user were to have opened

Re: [PATCH 3/3] drm/prime: Use anon_drm_getfile() for an internal drm struct file

2019-11-06 Thread Chris Wilson
Quoting Daniel Vetter (2019-11-06 10:21:57) > On Wed, Nov 06, 2019 at 10:07:16AM +0000, Chris Wilson wrote: > > Currently the drm_prime mmap fallback uses a mock struct file to provide > > the file pointer into the backend mmap routine. Now that we can create > > fully fle

Re: [PATCH 3/3] drm/prime: Use anon_drm_getfile() for an internal drm struct file

2019-11-06 Thread Chris Wilson
Quoting Daniel Vetter (2019-11-06 13:06:26) > On Wed, Nov 6, 2019 at 11:45 AM Chris Wilson wrote: > > > > Quoting Daniel Vetter (2019-11-06 10:21:57) > > > On Wed, Nov 06, 2019 at 10:07:16AM +, Chris Wilson wrote: > > > > Currently the drm_prime mmap

Re: [PATCH v6 8/9] drm: Add macro to export functions only when CONFIG_DRM_DEBUG_SELFTEST is enabled

2019-11-06 Thread Chris Wilson
Quoting Alexandru-Cosmin Gheorghe (2018-10-29 17:14:43) > If we want to be able to write drmselftests for non-static core > functions that are not intended to be used by drivers we need this > functions to be exported. > > This adds a macro that is tied of CONFIG_DRM_DEBUG_SELFTEST, and uses > tha

[PATCH v2 2/4] drm/i915/selftests: Replace mock_file hackery with drm's true fake

2019-11-06 Thread Chris Wilson
As drm now exports a method to create an anonymous struct file around a drm_device for internal use, make use of it to avoid our horrible hacks. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/Kconfig.debug| 2 + .../gpu/drm/i915/gem/selftests/huge_pages.c | 2 +- .../drm

[PATCH v2 1/4] drm: Expose a method for creating anonymous struct file around drm_minor

2019-11-06 Thread Chris Wilson
to selftests Signed-off-by: Chris Wilson Cc: Daniel Vetter --- drivers/gpu/drm/Kconfig| 4 drivers/gpu/drm/drm_file.c | 42 ++ include/drm/drm_file.h | 3 +++ 3 files changed, 49 insertions(+) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/

[PATCH v2 4/4] drm/i915/selftests: Verify mmap_gtt revocation on unbinding

2019-11-06 Thread Chris Wilson
. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue --- .../drm/i915/gem/selftests/i915_gem_mman.c| 107 ++ 1 file changed, 107 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c index

[PATCH v2 3/4] drm/i915/selftests: Wrap vm_mmap() around GEM objects

2019-11-06 Thread Chris Wilson
Provide a utility function to create a vma corresponding to an mmap() of our device. And use it to exercise the equivalent of userspace performing a GTT mmap of our objects. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915

[PATCH v3 1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig

2019-11-06 Thread Chris Wilson
rmine whether or not the EXPORT_SYMBOL_FOR_TESTS_ONLY() takes effect. Signed-off-by: Chris Wilson Cc: Daniel Vetter --- drivers/gpu/drm/Kconfig | 4 include/drm/drm_util.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig

[PATCH v3 2/5] drm: Expose a method for creating anonymous struct file around drm_minor

2019-11-06 Thread Chris Wilson
to selftests Signed-off-by: Chris Wilson Cc: Daniel Vetter --- drivers/gpu/drm/drm_file.c | 42 ++ include/drm/drm_file.h | 3 +++ 2 files changed, 45 insertions(+) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index ea34bc991

[PATCH v3 3/5] drm/i915/selftests: Replace mock_file hackery with drm's true fake

2019-11-06 Thread Chris Wilson
As drm now exports a method to create an anonymous struct file around a drm_device for internal use, make use of it to avoid our horrible hacks. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/Kconfig.debug| 2 + .../gpu/drm/i915/gem/selftests/huge_pages.c | 2 +- .../drm

mock_drm_getfile(), take three

2019-11-06 Thread Chris Wilson
Like v2, but with more Kconfig hackery so that i915.ko can request builtin-drm (and drm-selftests) export the symbols it requires for its selftests. -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/

[PATCH v3 5/5] drm/i915/selftests: Verify mmap_gtt revocation on unbinding

2019-11-06 Thread Chris Wilson
. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue --- .../drm/i915/gem/selftests/i915_gem_mman.c| 107 ++ 1 file changed, 107 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c index

[PATCH v3 4/5] drm/i915/selftests: Wrap vm_mmap() around GEM objects

2019-11-06 Thread Chris Wilson
Provide a utility function to create a vma corresponding to an mmap() of our device. And use it to exercise the equivalent of userspace performing a GTT mmap of our objects. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915

Re: [Intel-gfx] [PATCH v3 3/5] drm/i915/selftests: Replace mock_file hackery with drm's true fake

2019-11-07 Thread Chris Wilson
Quoting Daniel Vetter (2019-11-07 08:39:24) > On Wed, Nov 06, 2019 at 02:24:30PM +0000, Chris Wilson wrote: > > As drm now exports a method to create an anonymous struct file around a > > drm_device for internal use, make use of it to avoid our horrible hacks. > > > >

Re: [PATCH 2/2] drm/i915: make more headers self-contained

2019-11-08 Thread Chris Wilson
Quoting Masahiro Yamada (2019-11-08 05:42:33) > On Fri, Nov 8, 2019 at 2:15 PM Masahiro Yamada > wrote: > > > > The headers in the gem/selftests/, gt/selftests, gvt/, selftests/ > > directories have never been compile-tested, but it would be possible > > to make them self-contained. > > > > This c

Re: [PATCH 1/2] drm/i915: change to_mock() to an inline function

2019-11-08 Thread Chris Wilson
Quoting Masahiro Yamada (2019-11-08 05:13:55) > Since this function is defined in a header file, it should be > 'static inline' instead of 'static'. > > Signed-off-by: Masahiro Yamada Reviewed-by: Chris Wilson -Chris __

Re: [PATCH v2] drm/i915: make more headers self-contained

2019-11-08 Thread Chris Wilson
truct declarations. > > Signed-off-by: Masahiro Yamada Thanks a lot for doing this, Reviewed-by: Chris Wilson -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/amdgpu/dm: Do not throw an error for a display with no audio

2019-11-14 Thread Chris Wilson
D block is found") Signed-off-by: Chris Wilson Cc: Harry Wentland Cc: Jean Delvare Cc: Alex Deucher --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/

Re: [PATCH 06/15] drm/i915: Drop dma_buf->k(un)map

2019-11-18 Thread Chris Wilson
Quoting Daniel Vetter (2019-11-18 10:35:27) > No in-tree users left. Fair enough then, Reviewed-by: Chris Wilson > Aside, I think mock_dmabuf would be a nice addition to drm > mock/selftest helpers (we have some already), with an > EXPORT_SYMBOL_FOR_TESTS_ONLY. We've als

Re: [PATCH 03/15] drm/i915: Remove dma_buf_kmap selftest

2019-11-18 Thread Chris Wilson
_only_ have a whole-object-at-a-time interface as we may have to deal with objects larger than the aperture, or even larger than system memory. I feel we have a bridge to cross in future... Reviewed-by: Chris Wilson -Chris ___ dri-devel mai

re: drm/i915: Use the i915_device name for identifying our, request fences

2019-12-12 Thread Chris Wilson
Quoting Colin Ian King (2019-12-12 19:53:33) > Hi, > > Static analysis with Coverity has picked up an issue with the following > commit: > > commit 65c29dbb19b2451990c5c477fef7ada3b8218f05 > Author: Chris Wilson > Date: Wed Dec 11 15:02:04 2019 + > >

Re: [Intel-gfx] [RFC v2 02/12] drm/i915/svm: Runtime (RT) allocator support

2019-12-14 Thread Chris Wilson
Quoting Jason Ekstrand (2019-12-14 00:36:19) > On Fri, Dec 13, 2019 at 5:24 PM Niranjan Vishwanathapura < > niranjana.vishwanathap...@intel.com> wrote: > > On Fri, Dec 13, 2019 at 04:58:42PM -0600, Jason Ekstrand wrote: > > > >     +/** > >     + * struct drm_i915_gem_vm_bind >

Re: [Intel-gfx] [RFC v2 02/12] drm/i915/svm: Runtime (RT) allocator support

2019-12-14 Thread Chris Wilson
Quoting Niranjana Vishwanathapura (2019-12-13 21:56:04) > Shared Virtual Memory (SVM) runtime allocator support allows > binding a shared virtual address to a buffer object (BO) in the > device page table through an ioctl call. > > Cc: Joonas Lahtinen > Cc: Jon Bloomfield > Cc: Daniel Vetter >

Re: [Intel-gfx] [RFC v2 03/12] drm/i915/svm: Implicitly migrate BOs upon CPU access

2019-12-14 Thread Chris Wilson
Quoting Niranjana Vishwanathapura (2019-12-13 21:56:05) > +int i915_gem_object_migrate_region(struct drm_i915_gem_object *obj, > + u32 *regions, int size) > +{ > + struct drm_i915_private *dev_priv = to_i915(obj->base.dev); > + struct intel_context *ce =

Re: [PATCH][next] drm/i915: fix uninitialized pointer reads on pointers to and from

2019-12-19 Thread Chris Wilson
gt; are null. Fix this by ensuring to and from are initialized to NULL. > > Addresses-Coverity: ("Uninitialised pointer read)" > Fixes: da42104f589d ("drm/i915: Hold reference to intel_frontbuffer as we > track activity") > Signed-off-by: Coli

[PATCH] drm/of: Add missing static inline to get_dual_link_pixel_order stub

2019-12-20 Thread Chris Wilson
Mark up the stub drm_of_lvds_get_dual_link_pixel_order() as being a static inline to avoid a double definition. Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order") Signed-off-by: Chris Wilson Cc: Fabrizio Castro Cc: Laurent Pinchart --- include/drm/drm_of.h |

Re: [PATCH] drm: of: Fix linking when CONFIG_OF is not set

2019-12-20 Thread Chris Wilson
tions of the function to be linked when the CONFIG_OF > option isn't set. Fix it by making the stub static inline. > > Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order") > Reported-by: kbuild test robot > Signed-off-by: Laurent P

Re: [PULL] drm-intel-fixes

2019-12-23 Thread Chris Wilson
Quoting Joonas Lahtinen (2019-12-19 12:46:35) > Hi Dave & Daniel, > > Another -rc, another CI fire due to regressions elsewhere. > > Our CI needed the following patches to get machines boot with -rc2: > > Revert "devtmpfs: use do_mount() instead of ksys_mount()" > (commit 5e787db

Re: [PATCH] drm/bridge: Fix a NULL pointer dereference in drm_atomic_bridge_chain_check()

2020-01-07 Thread Chris Wilson
ing the bridge pointer when that happens. > > > > Reported-by: Chris Wilson > > Fixes: b86d895524ab ("drm/bridge: Add an ->atomic_check() hook") > > Signed-off-by: Boris Brezillon > > Reviewed-by: Laurent Pinchar

Re: [PATCH -next] drm/i915: Add missing include file

2020-01-07 Thread Chris Wilson
Quoting YueHaibing (2020-01-07 13:50:14) > Fix build error: > ./drivers/gpu/drm/i915/selftests/i915_random.h: In function > i915_prandom_u32_max_state: > ./drivers/gpu/drm/i915/selftests/i915_random.h:48:23: error: > implicit declaration of function mul_u32_u32; did you mean mul_u64_u32_div? > [

Re: [PATCH -next] drm/i915: Add missing include file

2020-01-07 Thread Chris Wilson
mul_u64_u32_div? > [-Werror=implicit-function-declaration] > return upper_32_bits(mul_u32_u32(prandom_u32_state(state), ep_ro)); > > Reported-by: Hulk Robot > Fixes: 7ce5b6850b47 ("drm/i915/selftests: Use mul_u32_u32() for 32b x 32b -> > 64b result") > Signed-off-

Re: [Intel-gfx] [PATCH 1/5] drm/i915: convert to using the drm_dbg_kms() macro.

2020-01-08 Thread Chris Wilson
Quoting Jani Nikula (2020-01-08 09:40:40) > On Wed, 08 Jan 2020, Joonas Lahtinen wrote: > > Quoting Wambui Karuga (2020-01-07 17:13:29) > >> Convert the use of the DRM_DEBUG_KMS() logging macro to the new struct > >> drm_device based drm_dbg_kms() logging macro in i915/intel_pch.c. > >> > >> Sign

Re: [Intel-gfx] [PATCH 1/5] drm/i915: convert to using the drm_dbg_kms() macro.

2020-01-08 Thread Chris Wilson
Quoting Jani Nikula (2020-01-08 14:44:38) > On Wed, 08 Jan 2020, Chris Wilson wrote: > > Quoting Jani Nikula (2020-01-08 09:40:40) > >> On Wed, 08 Jan 2020, Joonas Lahtinen > >> wrote: > >> > Quoting Wambui Karuga (2020-01-07 17:13:29) > >> &

[PATCH 4/5] drm/mm: Convert drm_mm_node booleans to bitops

2019-10-03 Thread Chris Wilson
A straightforward conversion of assignment and checking of the boolean state flags (allocated, scanned) into non-atomic bitops. The caller remains responsible for all locking around the drm_mm and its nodes. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_mm.c | 18

[PATCH 5/5] drm/mm: Use clear_bit_unlock() for releasing the drm_mm_node()

2019-10-03 Thread Chris Wilson
with removal or eviction scanning. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_mm.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index a9cab5e53731..2a6e34663146 100644 --- a/drivers/gpu/drm/drm_mm.c

[PATCH 1/5] drm/i915/execlists: Skip redundant resubmission

2019-10-03 Thread Chris Wilson
If we unwind the active requests, and on resubmission discover that we intend to preempt the active context with itself, simply skip the ELSP submission. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_lrc.c | 17 - 1 file changed, 16 insertions(+), 1 deletion

[PATCH 2/5] dma-fence: Serialise signal enabling (dma_fence_enable_sw_signaling)

2019-10-03 Thread Chris Wilson
(by signaling) on retirement before freeing the fence, it can do so in a race-free manner. See also 0fc89b6802ba ("dma-fence: Simply wrap dma_fence_signal_locked with dma_fence_signal"). v2: Refactor all 3 enable_signaling paths to use a common function. Signed-off-by: Chris Wilson --- dr

[PATCH 3/5] drm/mm: Use helpers for drm_mm_node booleans

2019-10-03 Thread Chris Wilson
In preparation for rearranging the booleans into a flags field, ensure all the current users are using the inline helpers and not directly accessing the members. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_mm.c | 19 --- .../gpu/drm/i915/gem

[PATCH] dma-fence: Serialise signal enabling (dma_fence_enable_sw_signaling)

2019-10-04 Thread Chris Wilson
tracepoint in the existing spot. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- drivers/dma-buf/dma-fence.c | 78 + 1 file changed, 35 insertions(+), 43 deletions(-) diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c index 2c136aee3e79..0

Re: [Intel-gfx] [PATCH 5/5] drm/mm: Use clear_bit_unlock() for releasing the drm_mm_node()

2019-10-04 Thread Chris Wilson
Quoting Tvrtko Ursulin (2019-10-04 10:15:20) > > On 03/10/2019 22:01, Chris Wilson wrote: > > A few callers need to serialise the destruction of their drm_mm_node and > > ensure it is removed from the drm_mm before freeing. However, to be > > completely sure that any acces

Re: [Intel-gfx] [PATCH 5/5] drm/mm: Use clear_bit_unlock() for releasing the drm_mm_node()

2019-10-04 Thread Chris Wilson
Quoting Chris Wilson (2019-10-04 12:07:10) > Quoting Tvrtko Ursulin (2019-10-04 10:15:20) > > > > On 03/10/2019 22:01, Chris Wilson wrote: > > > A few callers need to serialise the destruction of their drm_mm_node and > > > ensure it is removed from the drm_

Re: [PATCH] drm/drm_syncobj: Dead code removal

2019-10-04 Thread Chris Wilson
Quoting Zbigniew Kempczyński (2019-10-04 13:16:52) > Remove dead code, likely overseened during review process. Hint: It's not dead. -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-deve

Re: [PATCH] drm/i810: Prevent underflow in ioctl

2019-10-04 Thread Chris Wilson
as passed to the GPU instruction, negative used is invalid. Then it is used as an offset into a memblock, where a negative offset would be very bad. Reviewed-by: Chris Wilson -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/i810: Prevent underflow in ioctl

2019-10-04 Thread Chris Wilson
Quoting Chris Wilson (2019-10-04 15:08:57) > Quoting Dan Carpenter (2019-10-04 11:22:51) > > The "used" variables here come from the user in the ioctl and it can be > > negative. It could result in an out of bounds write. > > > > Signed-off-by: Dan Carpent

Re: [PATCH] drm/i915: make array hw_engine_mask static, makes object smaller

2019-10-07 Thread Chris Wilson
340044388 320 387129738 gpu/drm/i915/gt/intel_reset.o > > After: >textdata bss dec hex filename > 335284548 320 3839695fc gpu/drm/i915/gt/intel_reset.o > > (gcc version 9.2.1, amd64) > > Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson -Chris

Re: [PATCH] drm/i915: make array hw_engine_mask static, makes object smaller

2019-10-07 Thread Chris Wilson
Quoting Chris Wilson (2019-10-07 17:22:52) > Quoting Colin King (2019-10-07 16:41:51) > > From: Colin Ian King > > > > Don't populate the array hw_engine_mask on the stack but instead make it > > static. Makes the object code smaller by 316 bytes. > > &

Re: [PATCH][next] drm/i915: remove redundant variable err

2019-10-09 Thread Chris Wilson
Quoting Colin King (2019-10-09 10:39:35) > From: Colin Ian King > > An earlier commit removed any error assignments to err and we > are now left with a zero assignment to err and a check that is > always false. Clean this up by removing the redundant variable > err and the error check. Oh, we ad

Re: [PATCH][next] drm/i915/selftests: fix null pointer dereference on pointer data

2019-10-09 Thread Chris Wilson
void the null pointer > dereference. > > Addresses-Coverity: ("Dereference after null check") > Fixes: 50d16d44cce4 ("drm/i915/selftests: Exercise context switching in > parallel") > Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson -Chris

Re: [Intel-gfx] [PATCH] drm/i915: Don't disable interrupts independently of the lock

2019-10-10 Thread Chris Wilson
Quoting Sebastian Andrzej Siewior (2019-10-10 17:06:40) > The locks (active.lock and rq->lock) need to be taken with disabled > interrupts. This is done in i915_request_retire() by disabling the > interrupts independently of the locks itself. > While local_irq_disable()+spin_lock() equals spin_lock

Re: [Intel-gfx] [PATCH] drm/i915: Don't disable interrupts independently of the lock

2019-10-10 Thread Chris Wilson
Quoting Sebastian Andrzej Siewior (2019-10-10 19:26:10) > On 2019-10-10 19:11:27 [+0100], Chris Wilson wrote: > > > --- a/drivers/gpu/drm/i915/i915_request.c > > > +++ b/drivers/gpu/drm/i915/i915_request.c > > > @@ -251,15 +251,13 @@ static boo

Re: [PATCH v2] drm/i915: Don't disable interrupts independently of the lock

2019-10-17 Thread Chris Wilson
n_lock() equals spin_lock_irq() on vanilla > it does not on PREEMPT_RT. > Chris Wilson confirmed that local_irq_disable() was just introduced as > an optimisation to avoid enabling/disabling interrupts during > lock/unlock combo. > > Enable/disable interrupts as part of the locking i

[PATCH 2/3] dma-buf: Report signaled links inside dma-fence-chain

2019-10-20 Thread Chris Wilson
in a dma-fence-chain. Report a NULL fence and success if the seqno has already been signaled. Signed-off-by: Chris Wilson --- drivers/dma-buf/dma-fence-chain.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c index

[PATCH 1/3] dma-buf: Prettify typecasts for dma-fence-chain

2019-10-20 Thread Chris Wilson
Inside dma-fence-chain, we use a cmpxchg on an RCU-protected pointer. To avoid the sparse warning for using the RCU pointer directly, we have to cast away the __rcu annotation. However, we don't need to use void* everywhere and can stick to the dma_fence*. Signed-off-by: Chris W

[PATCH 3/3] dma-buf: Exercise dma-fence-chain under selftests

2019-10-20 Thread Chris Wilson
A few very simple testcases to exercise the dma-fence-chain API. Signed-off-by: Chris Wilson --- drivers/dma-buf/Makefile | 3 +- drivers/dma-buf/selftests.h | 1 + drivers/dma-buf/st-dma-fence-chain.c | 713 +++ 3 files changed, 716 insertions

[PATCH] drm/mm: Break long searches in fragmented address spaces

2020-02-07 Thread Chris Wilson
need to trade off having to perform the search again after ERESTARTSYS, which again may form a trap of making no forward progress.) Reported-by: Zbigniew Kempczyński Signed-off-by: Chris Wilson Cc: Zbigniew Kempczyński Cc: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 8 +++- 1 file

Re: [PATCH 5/5] drm: Nerf drm_global_mutex BKL for good drivers

2020-02-10 Thread Chris Wilson
here was making > dev->open_count atomic, which was done in > > commit 7e13ad896484a0165a68197a2e64091ea28c9602 > Author: Chris Wilson > Date: Fri Jan 24 13:01:07 2020 + > > drm: Avoid drm_global_mutex for simple inc/dec of dev->open_count > > v2: >

Re: [PATCH 4/5] drm: Push drm_global_mutex locking in drm_open

2020-02-10 Thread Chris Wilson
ually push this stuff correctly, don't unlock twice (Chris) > - Fix typo on commit message, plus explain why BKL = drm_global_mutex > (Sam) > > Cc: Sam Ravnborg > Cc: Chris Wilson > Signed-off-by: Daniel Vetter Reviewed-by: Chris Wilson -Chris

Re: [Intel-gfx] [PATCH] drm/mm: Break long searches in fragmented address spaces

2020-02-13 Thread Chris Wilson
Quoting Andi Shyti (2020-02-11 22:56:44) > Hi Chris, > > On Fri, Feb 07, 2020 at 03:17:20PM +0000, Chris Wilson wrote: > > We try hard to select a suitable hole in the drm_mm first time. But if > > that is unsuccessful, we then have to look at neighbouring nodes, and > &g

Re: [PATCH] drm/i915: Cast remain to unsigned long in eb_relocate_vma

2020-02-14 Thread Chris Wilson
Quoting Jani Nikula (2020-02-14 06:36:15) > On Thu, 13 Feb 2020, Nathan Chancellor wrote: > > A recent commit in clang added -Wtautological-compare to -Wall, which is > > enabled for i915 after -Wtautological-compare is disabled for the rest > > of the kernel so we see the following warning on x86

Re: drm_dp_mst_topology.c and old compilers

2020-02-19 Thread Chris Wilson
Quoting Alex Deucher (2020-02-20 02:52:32) > On Wed, Feb 19, 2020 at 7:42 PM Paul E. McKenney wrote: > > > > Hello! > > > > A box with GCC 4.8.3 compiler didn't like drm_dp_mst_topology.c. The > > following (lightly tested) patch makes it happy and seems OK for newer > > compilers as well. > > >

[PATCH] dma-buf: Precheck for a valid dma_fence before acquiring the reference

2020-02-21 Thread Chris Wilson
. This should help us to more quickly and clearly identify lost races. Signed-off-by: Chris Wilson Cc: Daniel Vetter --- include/linux/dma-fence.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index 3347c54f3a87..2805edd74738 100644

Re: [PATCH v4 1/2] drm/i915: Add mechanism to submit a context WA on ring submission

2020-02-21 Thread Chris Wilson
t;f21613797bae98773" > > v3-v4: none > > Signed-off-by: Mika Kuoppala > Signed-off-by: Prathap Kumar Valsan > Signed-off-by: Akeem G Abodunrin > Cc: Chris Wilson > Cc: Balestrieri Francesco > Cc: Bloomfield Jon > Cc: Dutt Sudeep Reviewed-by: Chris

Re: [PATCH v4 2/2] drm/i915/gen7: Clear all EU/L3 residual contexts

2020-02-21 Thread Chris Wilson
desc_count); > + > + for (i = 0; i < bv->max_primitives; i++) > + gen7_emit_media_object(&cmds, i); > + > + batch_add(&cmds, MI_BATCH_BUFFER_END); > +} I can't comment on t

Re: [PATCH] dma-buf: Precheck for a valid dma_fence before acquiring the reference

2020-02-21 Thread Chris Wilson
Quoting Daniel Vetter (2020-02-21 15:17:24) > On Fri, Feb 21, 2020 at 3:38 PM Chris Wilson wrote: > > dma_fence_get_rcu() is used to acquire a reference to under a dma-fence > > under racey conditions -- a perfect recipe for a disaster. As we know > > the caller may be handl

Re: [PATCH] dma-buf: Precheck for a valid dma_fence before acquiring the reference

2020-02-21 Thread Chris Wilson
Quoting Chris Wilson (2020-02-21 15:23:38) > Quoting Daniel Vetter (2020-02-21 15:17:24) > > On Fri, Feb 21, 2020 at 3:38 PM Chris Wilson > > wrote: > > > dma_fence_get_rcu() is used to acquire a reference to under a dma-fence > > > under racey conditions -- a

Re: [PATCH 02/51] drm/i915: Don't clear drvdata in ->release

2020-02-21 Thread Chris Wilson
Quoting Daniel Vetter (2020-02-21 21:02:30) > For two reasons: > > - The driver core clears this already for us after we're unloaded in > __device_release_driver(). Even if we abort before loading? History notes that i915_pci_remove was called with a stale pointer on error. -Chris

Re: [PATCH] drm/i915/gt: remove redundant assignment to variable dw

2020-02-22 Thread Chris Wilson
> Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2 1/2] drm/client: Dual licence the file in GPL-2 and MIT

2020-02-24 Thread Chris Wilson
Quoting Jani Nikula (2020-02-15 18:33:09) > On Sat, 15 Feb 2020, Emmanuel Vadot wrote: > > From: Emmanuel Vadot > > > > Contributors for this file are : > > Chris Wilson > > Denis Efremov > > Jani Nikula > > Maxime Ripard > > Nora

Re: [Intel-gfx][PATCH 01/10] drm/i915: Add i915 device based MISSING_CASE macro

2020-02-25 Thread Chris Wilson
Quoting Pankaj Bharadiya (2020-02-25 13:47:00) > Now that we have struct drm_device based drm_WARN, introduce struct > drm_i915_private based i915_MISSING_CASE macro which uses drm_WARN so > that device specific information will also get printed in backtrace. > > i915_MISSING_CASE macro should be

Re: [PATCH][next] drm: Replace zero-length array with flexible-array member

2020-02-25 Thread Chris Wilson
Quoting Gustavo A. R. Silva (2020-02-25 14:03:47) > The current codebase makes use of the zero-length array language > extension to the C90 standard, but the preferred mechanism to declare > variable-length types such as these ones is a flexible array member[1][2], > introduced in C99: I remember

[PATCH 2/2] RFC drm/i915: Export per-client debug tracing

2020-03-01 Thread Chris Wilson
Rather than put sensitive, and often voluminous, user details into a global dmesg, report the error and debug messages directly back to the user via the kernel tracing mechanism. Signed-off-by: Chris Wilson Cc: Steven Rostedt (VMware) --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 104

[PATCH 1/2] trace: Export anonymous tracing

2020-03-01 Thread Chris Wilson
encapsulating the trace ringbuffer into a struct file that can be opened via the tracefs, and so with a couple of minor tweaks can provide the same access via an anonymous inode. Signed-off-by: Chris Wilson Cc: Steven Rostedt (VMware) --- include/linux/trace.h | 4 ++ kernel/trace/trace.c | 142

Re: [Intel-gfx] [PATCH 2/2] RFC drm/i915: Export per-client debug tracing

2020-03-01 Thread Chris Wilson
Quoting Lionel Landwerlin (2020-03-01 16:27:24) > On 01/03/2020 17:52, Chris Wilson wrote: > > Rather than put sensitive, and often voluminous, user details into a > > global dmesg, report the error and debug messages directly back to the > > user via the kernel tracing mech

Re: [PATCH 1/2] trace: Export anonymous tracing

2020-03-01 Thread Chris Wilson
Quoting Steven Rostedt (2020-03-01 18:18:16) > On Sun, 1 Mar 2020 15:52:47 + > Chris Wilson wrote: > > > To facilitate construction of per-client event ringbuffers, in > > particular for a per-client debug and error report log, it would be > > extremely useful

Re: [PATCH] drm: unbreak the DRM menu, broken by DRM_EXPORT_FOR_TESTS

2020-03-06 Thread Chris Wilson
inuity. I suspect it was me, thanks for fixing it! > Fixes: 6349120ddcbf ("drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate > Kconfig") > Signed-off-by: Randy Dunlap > Cc: Chris Wilson > Cc: Daniel Vetter Reviewed-by: Chris Wilson -Chris ___

[PATCH] drm: Make drm_pci_agp_init legacy

2020-03-07 Thread Chris Wilson
Pull the drm_pci_agp_init() underneath the legacy ifdeffry alongside its only caller. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_pci.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c

[PATCH] drm: Mark up racy check of drm_gem_object.handle_count

2020-03-09 Thread Chris Wilson
/0x120 [ 1715.900291] drm_ioctl+0x297/0x4c7 [ 1715.900316] ksys_ioctl+0x89/0xb0 [ 1715.900340] __x64_sys_ioctl+0x42/0x60 [ 1715.900363] do_syscall_64+0x6e/0x2c0 [ 1715.900388] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_gem.c | 2 +- 1 file

[PATCH] drm/mm: Allow drm_mm_initialized() to be used outside of the locks

2020-03-09 Thread Chris Wilson
[ 121.107464] ksys_ioctl+0x89/0xb0 [ 121.107489] __x64_sys_ioctl+0x42/0x60 [ 121.107511] do_syscall_64+0x6e/0x2c0 [ 121.107535] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Chris Wilson --- include/drm/drm_mm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] drm/mm: Use debugobject to track lifetimes

2020-03-12 Thread Chris Wilson
being used correctly. Signed-off-by: Chris Wilson --- drivers/gpu/drm/Kconfig | 13 +++ drivers/gpu/drm/drm_mm.c | 54 drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 2 -- drivers/gpu/drm/i915/i915_vma.c | 17 +++-- include/drm/drm_mm.h

[PATCH] drm/mm: Use debugobject to track lifetimes

2020-03-12 Thread Chris Wilson
being used correctly. Signed-off-by: Chris Wilson --- drivers/gpu/drm/Kconfig | 13 +++ drivers/gpu/drm/drm_mm.c | 55 drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 2 - drivers/gpu/drm/i915/i915_vma.c | 17 +++-- include/drm/drm_mm.h

[PATCH] drm/mm: Use debugobject to track lifetimes

2020-03-12 Thread Chris Wilson
being used correctly. Signed-off-by: Chris Wilson --- And now switch on for CI. Expect failure from unmarked drm_mm_nodes. --- drivers/gpu/drm/Kconfig | 13 +++ drivers/gpu/drm/drm_mm.c | 113 +++ drivers/gpu/drm/i915/Kconfig.debug | 1 + drivers

Re: [PATCH] drm: Skip drm_mode_config_validate() for !modeset

2020-03-18 Thread Chris Wilson
O: We may want to consider calling drm_mode_config_init() > unconditionally to avoid similar issues elsewhere... > > Fixes: 74d2aacbe840 ("drm: Validate encoder->possible_clones") > Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson -Chris _

Re: [PATCH] i915: ggtt: include asm/smp.h

2020-01-10 Thread Chris Wilson
Quoting Arnd Bergmann (2020-01-10 15:17:54) > Splitting up the i915_gem_gtt caused a build failure in some configurations: > > drivers/gpu/drm/i915/gt/intel_ggtt.c: In function 'ggtt_restore_mappings': > drivers/gpu/drm/i915/gt/intel_ggtt.c:1239:3: error: implicit declaration of > function 'wbinv

Re: [PATCH] drm/i915: convert to new logging macros based on struct intel_engine_cs.

2020-01-13 Thread Chris Wilson
Quoting Wambui Karuga (2020-01-13 11:10:25) > fn(...) { > ... > struct intel_engine_cs *E = ...; > +struct drm_i915_private *dev_priv = E->i915; No new dev_priv. There should be no reason for drm_dbg here, as the rest of the debug is behind ENGINE_TRACE and so the vestigial debug should be moved

Re: [PULL] drm-intel-next

2020-01-14 Thread Chris Wilson
Quoting Jani Nikula (2020-01-14 11:43:22) > > Hi Dave & Daniel - > > Last batch for v5.6, slightly delayed I'm afraid. I'd like to close https://gitlab.freedesktop.org/drm/intel/issues/738 for 5.6, otherwise we'll have some more nasty emails from bewildered users/devs. https://patchwork.freedes

Re: [RFC PATCH 2/2] drm/i915/gen7: Clear all EU/L3 residual contexts

2020-01-14 Thread Chris Wilson
tch buffer with dedicated HW > context to the GPU with ring allocation for each context switching. > > Signed-off-by: Mika Kuoppala > Signed-off-by: Prathap Kumar Valsan > Signed-off-by: Akeem G Abodunrin > Cc: Chris Wilson > Cc: Balestrieri Francesco > Cc: Bloomfield Jon >

Re: [PATCH v4] drm/trace: Buffer DRM logs in a ringbuffer accessible via debugfs

2020-01-15 Thread Chris Wilson
Quoting Sean Paul (2020-01-14 17:21:43) > From: Sean Paul > > This patch uses a ring_buffer to keep a "flight recorder" (name credit Weston) > of DRM logs for a specified set of debug categories. The user writes a > bitmask of debug categories to the "trace_mask" node and can read log > messages

Re: [PATCH v4] drm/trace: Buffer DRM logs in a ringbuffer accessible via debugfs

2020-01-15 Thread Chris Wilson
Quoting Sean Paul (2020-01-15 13:41:58) > On Wed, Jan 15, 2020 at 10:36:36AM +0000, Chris Wilson wrote: > > Quoting Sean Paul (2020-01-14 17:21:43) > > > From: Sean Paul > > > > > > This patch uses a ring_buffer to keep a "flight recorder" (name

Re: [PATCH v4] drm/trace: Buffer DRM logs in a ringbuffer accessible via debugfs

2020-01-15 Thread Chris Wilson
Quoting Sean Paul (2020-01-15 14:21:18) > On Wed, Jan 15, 2020 at 02:01:19PM +0000, Chris Wilson wrote: > > Quoting Sean Paul (2020-01-15 13:41:58) > > > On Wed, Jan 15, 2020 at 10:36:36AM +, Chris Wilson wrote: > > > > Quoting Sean Paul (2020-01-14 17:21

[PATCH] drm: Inject a cond_resched() into long drm_clflush_sg()

2020-01-15 Thread Chris Wilson
takes a demonstrable amount to time to flush all the cachelines, clflush is still preferred over a system-wide wbinvd as the latter has unpredictable latencies affecting the whole system not just the local task. Reported-by: David Laight Signed-off-by: Chris Wilson Cc: David Laight --- drivers

<    1   2   3   4   5   6   7   8   9   10   >