Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Chris Wilson
Quoting Dan Carpenter (2018-05-16 16:15:54) > On Wed, May 16, 2018 at 03:56:55PM +0100, Chris Wilson wrote: > > Quoting Dan Carpenter (2018-05-16 15:52:57) > > > On Wed, May 16, 2018 at 03:26:07PM +0100, Chris Wilson wrote: > > > > Quoting Dan Carpenter (2018-05-16

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Chris Wilson
Quoting Dan Carpenter (2018-05-16 15:52:57) > On Wed, May 16, 2018 at 03:26:07PM +0100, Chris Wilson wrote: > > Quoting Dan Carpenter (2018-05-16 15:00:26) > > > There is a comment here which says that DIV_ROUND_UP() and that's where > > > the p

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Chris Wilson
g has its benefits too. Plus I like having U32_MAX to compare the type ranges against. Reviewed-by: Chris Wilson -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] dma-fence: Make dma_fence_add_callback() fail if signaled with error

2018-05-15 Thread Chris Wilson
Quoting Ezequiel Garcia (2018-05-14 22:28:31) > On Mon, 2018-05-14 at 18:48 +0200, Daniel Vetter wrote: > > On Fri, May 11, 2018 at 08:27:41AM +0100, Chris Wilson wrote: > > > Quoting Ezequiel Garcia (2018-05-09 21:14:49) > > > > Change how dma_fence_add_call

[PATCH 1/4] drm/mm: Reject over-sized allocation requests early

2018-05-13 Thread Chris Wilson
, we convert into the cached rbtree variant which tracks the leftmost node for us. However, currently we sorted into ascending size order so the leftmost node is the smallest, and so to make it the largest hole we need to invert our sorting. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen

[PATCH 2/4] drm/mm: Add a search-by-address variant to only inspect a single hole

2018-05-13 Thread Chris Wilson
ld be the best split, start with a request to try once at most. That is return the top-most (or lowest) hole if it fulfils the alignment and size requirements. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm/drm_mm.c | 9 +++-- include/drm/drm_mm.h | 4 2 files ch

[PATCH 4/4] drm/i915: Pin the ring high

2018-05-13 Thread Chris Wilson
If we can use an unmappable ring, try to pin it out of the mappable aperture. This simple layout preference is to try and keep the mappable aperture reserved and available to handle GGTT mmapping requests from userspace without causing evictions and GPU stalls. Signed-off-by: Chris Wilson Cc

[PATCH 3/4] drm/i915: Limit searching for PIN_HIGH

2018-05-13 Thread Chris Wilson
t the search for the highest available hole and fallback to best-fit if it fails. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem_gtt.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gp

Re: [PATCH] dma-fence: Make dma_fence_add_callback() fail if signaled with error

2018-05-11 Thread Chris Wilson
Quoting Ezequiel Garcia (2018-05-09 21:14:49) > Change how dma_fence_add_callback() behaves, when the fence > has error-signaled by the time it is being add. After this commit, > dma_fence_add_callback() returns the fence error, if it > has error-signaled before dma_fence_add_callback() is called.

Re: [PATCH] dma-fence: Make dma_fence_add_callback() fail if signaled with error

2018-05-11 Thread Chris Wilson
Quoting Ezequiel Garcia (2018-05-10 13:51:56) > On Wed, 2018-05-09 at 19:42 -0300, Gustavo Padovan wrote: > > Hi Ezequiel, > > > > On Wed, 2018-05-09 at 17:14 -0300, Ezequiel Garcia wrote: > > > Change how dma_fence_add_callback() behaves, when the fence > > > has error-signaled by the time it is

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-09 Thread Chris Wilson
Quoting Dan Carpenter (2018-05-09 09:12:54) > There is a comment here which says that DIV_ROUND_UP() can overflow and > that's where the problem comes from. Say you pick: > > args->bpp = UINT_MAX - 7; > args->width = 4; > args->height = 1; > > The integer overflow in DIV_

Re: [Intel-gfx] [PATCH] drm/dp: add module parameter for the dpcd access max retries

2018-05-08 Thread Chris Wilson
Quoting Feng Tang (2018-05-08 20:03:15) > > On Mon, May 07, 2018 at 05:09:21PM +0200, Daniel Vetter wrote: > > On Mon, May 07, 2018 at 02:33:25PM +0100, Chris Wilson wrote: > > > Quoting Feng Tang (2018-05-07 22:26:34) > > > > Hi Chris, > > &g

Re: [PATCH] dma-buf: Remove unused sync_dump()

2018-05-08 Thread Chris Wilson
Quoting Chris Wilson (2018-02-08 10:09:06) > sync_dump() is an unused, unexported, function that adds 64k to the > kernel image and doesn't even provide locking around the global array it > uses. > > add/remove: 0/2 grow/shrink: 0/0 up/down: 0/-65734

Re: [PATCH] drm/dp: add module parameter for the dpcd access max retries

2018-05-07 Thread Chris Wilson
Quoting Feng Tang (2018-05-07 22:26:34) > Hi Chris, > > Thanks for the prompt review! > > On Mon, May 07, 2018 at 11:40:45AM +0100, Chris Wilson wrote: > > Quoting Feng Tang (2018-05-07 11:36:09) > > > To fulfil the Dell 4K monitor, the dpcd max retries has been bu

Re: [PATCH] drm/dp: add module parameter for the dpcd access max retries

2018-05-07 Thread Chris Wilson
Quoting Feng Tang (2018-05-07 11:36:09) > To fulfil the Dell 4K monitor, the dpcd max retries has been bumped > from 7 to 32, which may hurt the boot/init time for some platforms, > as the 32 retries may take hundreds of ms. If we need that many retries, so be it. No modparam, the driver just has

[PATCH] drm/syncobj: Use dma_fence_wait for the simple wait case

2018-05-05 Thread Chris Wilson
allocations and array iterations. Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_syncobj.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index d4f4ce484529..c0f787f7a298 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b

Re: [PATCH 04/15] dma-fence: Make ->wait callback optional

2018-05-04 Thread Chris Wilson
Quoting Daniel Vetter (2018-05-04 09:57:59) > On Fri, May 04, 2018 at 09:31:33AM +0100, Chris Wilson wrote: > > Quoting Daniel Vetter (2018-05-04 09:23:01) > > > On Fri, May 04, 2018 at 10:17:22AM +0200, Daniel Vetter wrote: > > > > On Fri, May 04, 2018 at 09:09:

Re: [PATCH 04/15] dma-fence: Make ->wait callback optional

2018-05-04 Thread Chris Wilson
Quoting Daniel Vetter (2018-05-04 09:23:01) > On Fri, May 04, 2018 at 10:17:22AM +0200, Daniel Vetter wrote: > > On Fri, May 04, 2018 at 09:09:10AM +0100, Chris Wilson wrote: > > > Quoting Daniel Vetter (2018-05-03 15:25:52) > > > > Almost everyone uses dma_fence_def

Re: [PATCH 04/15] dma-fence: Make ->wait callback optional

2018-05-04 Thread Chris Wilson
Quoting Daniel Vetter (2018-05-03 15:25:52) > Almost everyone uses dma_fence_default_wait. > > v2: Also remove the BUG_ON(!ops->wait) (Chris). I just don't get the rationale for implicit over explicit. -Chris ___ dri-devel mailing list dri-devel@lists.f

Re: [PATCH 02/15] dma-fence: Make ->enable_signaling optional

2018-05-03 Thread Chris Wilson
Quoting Daniel Vetter (2018-05-03 15:25:50) > @@ -560,7 +567,7 @@ dma_fence_init(struct dma_fence *fence, const struct > dma_fence_ops *ops, >spinlock_t *lock, u64 context, unsigned seqno) > { > BUG_ON(!lock); > - BUG_ON(!ops || !ops->wait || !ops->enable_signaling |

Re: [PATCH] drm/i915/selftests: fix spelling mistake: "parmaters" -> "parameters"

2018-05-03 Thread Chris Wilson
Quoting Colin King (2018-05-03 16:45:10) > From: Colin Ian King > > Trivial fix to spelling mistake in pr_err error message > > Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson -Chris ___ dri-devel mailing list dri-devel@lists.

Re: [PATCH v3] drm/i915: Disable some extra clang warnings

2018-05-02 Thread Chris Wilson
Quoting Chris Wilson (2018-05-02 10:46:07) > Quoting Matthias Kaehlcke (2018-05-01 19:24:40) > > Commit 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set > > warnings to full") enabled extra warnings for i915 to spot possible > > bugs in new code, and

Re: [PATCH v3] drm/i915: Disable some extra clang warnings

2018-05-02 Thread Chris Wilson
ternal-declaration and initializer-overrides. If desired > they can be re-enabled after the code has been fixed. > > Signed-off-by: Matthias Kaehlcke Reviewed-by: Chris Wilson -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org htt

Re: [Intel-gfx] [PATCH v2] drm/i915: Disable some extra clang warnings

2018-04-30 Thread Chris Wilson
Quoting Matthias Kaehlcke (2018-04-30 21:51:45) > On Mon, Apr 30, 2018 at 09:01:49PM +0100, Chris Wilson wrote: > > Quoting Matthias Kaehlcke (2018-04-30 20:31:19) > > > On Mon, Mar 19, 2018 at 12:14:51PM -0700, Matthias Kaehlcke wrote: > > > > Commit 39bf4de89ff7 (&

Re: [Intel-gfx] [PATCH v2] drm/i915: Disable some extra clang warnings

2018-04-30 Thread Chris Wilson
Quoting Matthias Kaehlcke (2018-04-30 20:31:19) > On Mon, Mar 19, 2018 at 12:14:51PM -0700, Matthias Kaehlcke wrote: > > Commit 39bf4de89ff7 ("drm/i915: Add -Wall -Wextra to our build, set > > warnings to full") enabled extra warnings for i915 to spot possible > > bugs in new code, and then disable

Re: [PATCH] drm/i915/selftests: Fix uninitialized variable

2018-04-24 Thread Chris Wilson
Quoting Gustavo A. R. Silva (2018-04-24 14:30:58) > > > On 04/24/2018 08:22 AM, Chris Wilson wrote: > > Quoting Gustavo A. R. Silva (2018-04-24 14:15:45) > >> There is a potential execution path in which variable err is > >> returned without being properly init

Re: [PATCH] drm/i915/selftests: Fix uninitialized variable

2018-04-24 Thread Chris Wilson
Quoting Gustavo A. R. Silva (2018-04-24 14:15:45) > There is a potential execution path in which variable err is > returned without being properly initialized previously. > > Fix this by initializing variable err to 0. err is only returned along an error path, returning 0 would not be useful. Whi

Re: [PATCH] drm/i915/gvt: fix memory leak of a cmd_entry struct on error exit path

2018-04-10 Thread Chris Wilson
if (info) { > gvt_err("%s %s duplicated\n", e->info->name, > info->name); > + kfree(e); e kzalloc'ed moments above, not yet added to any lists, so fine to use kfree. Alternatively, the find_cmd_en

Re: [PATCH 07/10] drm/msm/adreno: Convert the show/crash file format

2018-04-06 Thread Chris Wilson
Quoting Jordan Crouse (2018-04-05 23:00:53) > Convert the format of the 'show' debugfs file and the crash > dump to a format resembling YAML. This should be easier to > parse and be more flexible for future changes and expansions. > > Signed-off-by: Jordan Crouse +1, I've been trying to work up

Re: [PATCH 04/10] drm/msm/gpu: Convert the GPU show function to use the GPU state

2018-04-06 Thread Chris Wilson
Quoting Jordan Crouse (2018-04-05 23:00:50) > diff --git a/drivers/gpu/drm/msm/msm_debugfs.c > b/drivers/gpu/drm/msm/msm_debugfs.c > index ba74cb4f94df..fd535dab3d5b 100644 > --- a/drivers/gpu/drm/msm/msm_debugfs.c > +++ b/drivers/gpu/drm/msm/msm_debugfs.c > @@ -25,13 +25,22 @@ static int msm_gpu_

Re: [PATCH 03/10] drm/msm/gpu: Capture the state of the GPU

2018-04-06 Thread Chris Wilson
Quoting Jordan Crouse (2018-04-05 23:00:49) > +struct msm_gpu_state { > + struct timeval time; My recommendation would be to make this a kreffed struct. You already have multiple uncoordinated consumers so managing the lifetime would seem to be a point of concern? -Chris

Re: [PATCH 02/10] drm: drm_printer: Add printer for devcoredump

2018-04-06 Thread Chris Wilson
Quoting Chris Wilson (2018-04-06 11:42:25) > Quoting Jordan Crouse (2018-04-05 23:00:48) > > +struct drm_print_iterator { > > + void *data; > > + > > + ssize_t start; > > + ssize_t offset; > > + ssize_t remain; > > +}; > &g

Re: [PATCH 02/10] drm: drm_printer: Add printer for devcoredump

2018-04-06 Thread Chris Wilson
Quoting Jordan Crouse (2018-04-05 23:00:48) > +struct drm_print_iterator { > + void *data; > + > + ssize_t start; > + ssize_t offset; > + ssize_t remain; > +}; Neat, we should be able to use to replace struct drm_i915_error_state_buf (or at least the seq_file side). -Chris

Re: [Intel-gfx] [Freedreno] [PATCH 01/10] include: Move ascii85 functions from i915 to linux/ascii85.h

2018-04-06 Thread Chris Wilson
Quoting Jordan Crouse (2018-04-05 23:06:53) > On Thu, Apr 05, 2018 at 04:00:47PM -0600, Jordan Crouse wrote: > > The i915 DRM driver very cleverly used ascii85 encoding for their > > GPU state file. Move the encode functions to a general header file to > > support other drivers that might be intere

Re: [Intel-gfx] [PATCH v3 09/10] drm/i915/psr: Set DPCD PSR2 enable bit when needed

2018-04-05 Thread Chris Wilson
Quoting Rodrigo Vivi (2018-03-30 18:41:08) > On Wed, Mar 28, 2018 at 03:30:45PM -0700, José Roberto de Souza wrote: > > In the 2 eDP1.4a pannels tested set or not set bit have no effect > > but is better set it and comply with specification. > > > > Signed-off-by: José Roberto de Souza > > Cc: Dh

Re: [PATCH 1/1] drm/i915: Do not use kfree() to free kmem_cache_alloc() return value

2018-04-04 Thread Chris Wilson
Quoting Xidong Wang (2018-04-04 08:37:54) > In eb_lookup_vmas(), the return value of kmem_cache_alloc() is freed > with kfree(). I think the expected paired function is kmem_cahce_free(). > > Signed-off-by: Xidong Wang Thank you for the fix; applied. -Chris __

Re: [PATCH 1/1] drm/i915: Do not use kfree() to free kmem_cache_alloc() return value

2018-04-04 Thread Chris Wilson
4 ("drm/i915: Replace execbuf vma ht with an idr") Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: # v4.14+ Reviewed-by: Chris Wilson -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: Signal handling in a page fault handler

2018-04-03 Thread Chris Wilson
Quoting Matthew Wilcox (2018-04-03 14:10:25) > On Tue, Apr 03, 2018 at 01:33:15PM +0100, Chris Wilson wrote: > > Quoting Matthew Wilcox (2018-04-02 15:10:58) > > > I don't think the graphics drivers really want to be interrupted by > > > any signal. > > >

Re: Signal handling in a page fault handler

2018-04-03 Thread Chris Wilson
Quoting Matthew Wilcox (2018-04-02 15:10:58) > > Souptick and I have been auditing the various page fault handler routines > and we've noticed that graphics drivers assume that a signal should be > able to interrupt a page fault. In contrast, the page cache takes great > care to allow only fatal

Re: [Intel-gfx] [PATCH] drm/i915: Do NOT skip the first 4k of stolen memory for pre-allocated buffers

2018-03-30 Thread Chris Wilson
Quoting Hans de Goede (2018-03-30 13:37:40) > Hi, > > On 30-03-18 14:30, Chris Wilson wrote: > > Quoting Hans de Goede (2018-03-30 13:27:15) > >> Before this commit the WaSkipStolenMemoryFirstPage workaround code was > >> skipping the first 4k by passing 4096 as

Re: [Intel-gfx] [PATCH] drm/i915: Do NOT skip the first 4k of stolen memory for pre-allocated buffers

2018-03-30 Thread Chris Wilson
Quoting Hans de Goede (2018-03-30 13:27:15) > Before this commit the WaSkipStolenMemoryFirstPage workaround code was > skipping the first 4k by passing 4096 as start of the address range passed > to drm_mm_init(). This means that calling drm_mm_reserve_node() to try and > reserve the firmware frame

Re: [PATCH] drm/edid: Dump valid EDIDs too

2018-03-29 Thread Chris Wilson
Quoting Ville Syrjälä (2018-03-29 17:14:05) > On Thu, Mar 29, 2018 at 05:01:13PM +0100, Chris Wilson wrote: > > Quoting Ville Syrjala (2018-03-29 16:50:23) > > > From: Ville Syrjälä > > > > > > Having the EDID available is often very beneficial for bug analy

Re: [PATCH] drm/edid: Dump valid EDIDs too

2018-03-29 Thread Chris Wilson
Quoting Ville Syrjala (2018-03-29 16:50:23) > From: Ville Syrjälä > > Having the EDID available is often very beneficial for bug analysis, > even when the EDID itself is valid and not the direct cause of the > bug. So let's dump the EDID to dmesg even when it's valid. This > should also give us a

Re: [PATCH 1/4] drm/vgem: Fix vgem_init to get drm device avaliable.

2018-03-28 Thread Chris Wilson
Quoting Emil Velikov (2018-03-28 02:24:48) > From: Deepak Sharma > > Modify vgem_init to take platform dev as parent in drm_dev_init. > This will make drm device available at "/sys/devices/platform/vgem" > in x86 chromebook. > > Cc: Daniel Vetter > Signed-off-by: Deepak Sharma > Reviewed-by: S

Re: [PATCH 3/3] drm: make drm_core_check_feature() bool that it is

2018-03-27 Thread Chris Wilson
Quoting Jani Nikula (2018-03-27 21:47:22) > Bool is the more appropriate return type here, use it. > > Signed-off-by: Jani Nikula All 3, Reviewed-by: Chris Wilson -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.

Re: [PATCH v2 2/2] gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry

2018-03-26 Thread Chris Wilson
Quoting Ben Skeggs (2018-03-26 13:34:54) > On Mon, Mar 26, 2018 at 4:01 AM, Arushi Singhal > wrote: > > It's better to use list_entry instead of list_{next/prev}_entry > > as it makes the code more clear to read. > > This patch replace list_entry with list_{next/prev}_entry. > > > > Signed-off-by:

Re: [PATCH] drm/i915/gvt/scheduler: Remove unnecessary NULL checks in sr_oa_regs

2018-03-22 Thread Chris Wilson
Quoting Gustavo A. R. Silva (2018-03-22 18:21:54) > The checks are misleading and not required [1]. > > [1] https://lkml.org/lkml/2018/3/19/1792 > > Addresses-Coverity-ID: 1466017 > Cc: Chris Wilson > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Chris Wi

Re: [PATCH v4.5 1/8] cgroup: Allow registration and lookup of cgroup private data (v3)

2018-03-22 Thread Chris Wilson
Quoting Matt Roper (2018-03-21 23:23:37) > There are cases where other parts of the kernel may wish to store data > associated with individual cgroups without building a full cgroup > controller. Let's add interfaces to allow them to register and lookup > this private data for individual cgroups.

Re: [PATCH] drm/i915/gvt: don't dereference 'workload' before null checking it

2018-03-21 Thread Chris Wilson
Quoting Colin Ian King (2018-03-21 19:18:28) > On 21/03/18 19:09, Joe Perches wrote: > > On Wed, 2018-03-21 at 19:06 +, Colin King wrote: > >> From: Colin Ian King > >> > >> The pointer workload is dereferenced before it is null checked, hence > >> there is a potential for a null pointer deref

Re: [PATCH] drm/i915/gvt/scheduler: fix potential NULL pointer dereference

2018-03-19 Thread Chris Wilson
Quoting Gustavo A. R. Silva (2018-03-19 20:50:12) > Hi Chris, > > On 03/19/2018 03:38 PM, Chris Wilson wrote: > > Quoting Gustavo A. R. Silva (2018-03-19 19:30:53) > >> _workload_ is being dereferenced before it is null checked, hence > >> there is a p

Re: [PATCH] drm/i915/gvt/scheduler: fix potential NULL pointer dereference

2018-03-19 Thread Chris Wilson
Quoting Gustavo A. R. Silva (2018-03-19 19:30:53) > _workload_ is being dereferenced before it is null checked, hence > there is a potential null pointer dereference. > > Fix this by moving the pointer dereference after _workload_ has > been null checked. The checks are misleading and not require

Re: [PATCH 1/5] dma-buf: add optional invalidate_mappings callback v2

2018-03-19 Thread Chris Wilson
Quoting Christian König (2018-03-16 14:22:32) [snip, probably lost too must context] > This allows for full grown pipelining, e.g. the exporter can say I need > to move the buffer for some operation. Then let the move operation wait > for all existing fences in the reservation object and install

Re: [Intel-gfx] [PATCH v2] i915: Re-use DEFINE_SHOW_ATTRIBUTE() macro

2018-03-16 Thread Chris Wilson
Quoting Andy Shevchenko (2018-03-16 14:12:13) > ...instead of open coding file operations followed by custom ->open() > callbacks per each attribute. > > Reviewed-by: Chris Wilson > Signed-off-by: Andy Shevchenko And pushed, thanks very much for

Re: [PATCH 1/5] dma-buf: add optional invalidate_mappings callback v2

2018-03-16 Thread Chris Wilson
Quoting Christian König (2018-03-16 13:20:45) > @@ -326,6 +338,29 @@ struct dma_buf_attachment { > struct device *dev; > struct list_head node; > void *priv; > + > + /** > +* @invalidate_mappings: > +* > +* Optional callback provided by the impo

Re: [PATCH] drm/i915/pmu: Work around compiler warnings on some kernel configs

2018-03-14 Thread Chris Wilson
he event enable path. But since enable is not a fast path, that is > preferrable to the alternative solution which was doing MMIO under irqsave > spinlock. > > Signed-off-by: Tvrtko Ursulin > Reported-by: Arnd Bergmann > Fixes: 1fe699e30113 ("drm/i915/pmu: Fix sleep under ato

Re: [PATCH] [v2] drm/i915/pmu: avoid -Wmaybe-uninitialized warning

2018-03-13 Thread Chris Wilson
s only caller. > > Fixes: 1fe699e30113 ("drm/i915/pmu: Fix sleep under atomic in RC6 readout") > Signed-off-by: Arnd Bergmann 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/i915/pmu: avoid -Wmaybe-uninitialized warning

2018-03-13 Thread Chris Wilson
Quoting Arnd Bergmann (2018-03-13 12:08:29) > The conditional spinlock confuses gcc into thinking the 'flags' value > might contain uninitialized data: > > drivers/gpu/drm/i915/i915_pmu.c: In function '__i915_pmu_event_read': > arch/x86/include/asm/paravirt_types.h:573:3: error: 'flags' may be use

Re: [PATCH v3 5/6] drm/i915: Introduce 'priority offset' for GPU contexts (v2)

2018-03-08 Thread Chris Wilson
Quoting Chris Wilson (2018-03-08 18:48:51) > Quoting Matt Roper (2018-03-08 18:22:06) > > * Option 2: Allow priority offset to be set in a much larger range > >(e.g., [SHRT_MIN+1023,SHRT_MAX-1023]). This allows cgroups to have > >effective priority ranges that d

Re: [PATCH v3 5/6] drm/i915: Introduce 'priority offset' for GPU contexts (v2)

2018-03-08 Thread Chris Wilson
Quoting Matt Roper (2018-03-08 18:22:06) > On Thu, Mar 08, 2018 at 01:11:33PM +0000, Chris Wilson wrote: > > Quoting Chris Wilson (2018-03-08 11:32:04) > > > Quoting Matt Roper (2018-03-06 23:46:59) > > > > There are cases where a system integrator may wish to raise

Re: [PATCH v3 5/6] drm/i915: Introduce 'priority offset' for GPU contexts (v2)

2018-03-08 Thread Chris Wilson
Quoting Chris Wilson (2018-03-08 11:32:04) > Quoting Matt Roper (2018-03-06 23:46:59) > > There are cases where a system integrator may wish to raise/lower the > > priority of GPU workloads being submitted by specific OS process(es), > > independently of how the software se

Re: [PATCH v3 5/6] drm/i915: Introduce 'priority offset' for GPU contexts (v2)

2018-03-08 Thread Chris Wilson
gt; > v2: > - Rebase onto new cgroup_priv API > - Use current instead of drm_file->pid to determine which process to >lookup priority for. (Chris) > - Don't forget to subtract priority offset in context_getparam ioctl to >make it match setparam behavior. (Chris

Re: reservation questions

2018-03-06 Thread Chris Wilson
Quoting Liu, Monk (2018-03-06 09:45:19) > call reservation_object_add_excl_fence, > it set obj->fence->shared_count to 0, and put all shared fence from obj->fence > without waiting signaling. > (this action looks inappropriate, I think at least before put all those shared > fences > we should dma_w

Re: [PATCH] dma-buf/reservation: should keep later one in add fence(v2)

2018-03-06 Thread Chris Wilson
Quoting Monk Liu (2018-03-06 03:53:10) > v2: > still check context first to avoid warning from dma_fence_is_later > apply this fix in add_shared_replace as well > > Change-Id: If6a979ba9fd6c923b82212f35f07a9ff31c86767 > Signed-off-by: Monk Liu > --- > drivers/dma-buf/reservation.c | 6 -- >

Re: [Intel-gfx] [PATCH 1/1] intel: align reuse buffer's size on page size instead

2018-03-03 Thread Chris Wilson
Quoting James Xiong (2018-03-02 17:53:04) > From: "Xiong, James" > > With gem_reuse enabled, when a buffer size is different than > the sizes of buckets, it is aligned to the next bucket's size, > which means about 25% more memory than the requested is allocated > in the worst senario. For exampl

Re: [Intel-gfx] [PATCH 5/5] drm/i915: Move hdcp msg detection into shim

2018-02-26 Thread Chris Wilson
Quoting Ramalingam C (2018-02-26 17:12:39) > DP and HDMI HDCP specifications are varying with respect to > detecting the R0 and ksv_fifo availability. > > DP will produce CP_IRQ and set a bit for indicating the R0 and > FIFO_READY status. > > Whereas HDMI will set a bit for FIFO_READY but there i

Re: [PATCH libdrm 1/2] intel: align reuse buffer's size on page size instead

2018-02-21 Thread Chris Wilson
Quoting James Xiong (2018-02-20 17:48:03) > From: "Xiong, James" > > With gem_reuse enabled, when a buffer size is different than > the sizes of buckets, it is aligned to the next bucket's size, > which means about 25% more memory than the requested is allocated > in the worst senario. For exampl

Re: [CI] drm/mm: Fix caching of leftmost node in the interval tree

2018-02-20 Thread Chris Wilson
Quoting Christian König (2018-02-20 09:45:54) > Am 20.02.2018 um 10:37 schrieb Chris Wilson: > > When we descend the tree to find our slot, if we step to the right, we > > are no longer the leftmost node. > > > > Fixes: f808c13fd373 ("lib/interval_tree: fast overl

[CI] drm/mm: Fix caching of leftmost node in the interval tree

2018-02-20 Thread Chris Wilson
When we descend the tree to find our slot, if we step to the right, we are no longer the leftmost node. Fixes: f808c13fd373 ("lib/interval_tree: fast overlap detection") Signed-off-by: Chris Wilson Cc: Davidlohr Bueso Cc: Jérôme Glisse Cc: Christian König Reviewed-by: Joona

Re: [PATCH] drm: Handle unexpected holes in color-eviction

2018-02-20 Thread Chris Wilson
Quoting Daniel Vetter (2018-02-19 15:52:34) > On Mon, Feb 19, 2018 at 02:43:59PM +0000, Chris Wilson wrote: > > Quoting Joonas Lahtinen (2018-02-19 14:40:32) > > > Quoting Chris Wilson (2018-02-19 13:35:43) > > > > +++ b/drivers/gpu/drm/drm_mm.c > > > &g

Re: [PATCH] drm: Handle unexpected holes in color-eviction

2018-02-19 Thread Chris Wilson
Quoting Joonas Lahtinen (2018-02-19 14:40:32) > Quoting Chris Wilson (2018-02-19 13:35:43) > > +++ b/drivers/gpu/drm/drm_mm.c > > @@ -836,9 +836,24 @@ struct drm_mm_node *drm_mm_scan_color_evict(struct > > drm_mm_scan *scan) > > if (!mm->color_adjust) &

Re: [PATCH] drm: Use idr_init_base(1) when using id==0 for invalid

2018-02-19 Thread Chris Wilson
Quoting Christian König (2018-02-13 13:48:24) > Am 12.02.2018 um 18:14 schrieb Ville Syrjälä: > > On Mon, Feb 12, 2018 at 02:55:33PM +0000, Chris Wilson wrote: > >> Use the new idr_init_base() function to create an IDR that knows id==0 > >> is never allocated as it ma

[PATCH] drm: Handle unexpected holes in color-eviction

2018-02-19 Thread Chris Wilson
Apply tight eviction scanning to color_adjust") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: # v4.11+ --- drivers/gpu/drm/drm_mm.c | 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c in

[PATCH 1/2] drm/mm: Fix caching of leftmost node in the interval tree

2018-02-19 Thread Chris Wilson
When we descend the tree to find our slot, if we step to the right, we are no longer the leftmost node. Fixes: f808c13fd373 ("lib/interval_tree: fast overlap detection") Signed-off-by: Chris Wilson Cc: Davidlohr Bueso Cc: Jérôme Glisse Cc: Christian König --- drivers/gpu/drm/dr

[PATCH 2/2] drm/mm: Micro-optimise updating the upper layers of the interval tree

2018-02-19 Thread Chris Wilson
old new delta drm_mm_interval_tree_add_node221 211 -10 Signed-off-by: Chris Wilson --- drivers/gpu/drm/drm_mm.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index

Re: [PATCH 1/3] drm: add func to get max iomem address v2

2018-02-16 Thread Chris Wilson
Quoting Chunming Zhou (2018-02-09 02:44:08) > it will be used to check if the driver needs swiotlb > v2: Don't use inline, instead, move function to drm_memory.c (Mechel Daenzer > ) > > Change-Id: Idbe47af8f12032d4803bb3d47273e807f19169c3 > Signed-off-by: Chunming Zhou > Reviewed-by: Monk Liu >

Re: [PATCH] drm: move read_domains and write_domain into i915 v2

2018-02-16 Thread Chris Wilson
ly compile tested. > > v2: move fields around as suggested by Chris. > > Signed-off-by: Christian König Reviewed-by: Chris Wilson Thanks for the patch, I've pushed to dinq, so it should show up in drm-misc and beyond in a few weeks. -Chris ___

Re: [PATCH] drm: move read_domains and write_domain into i915

2018-02-16 Thread Chris Wilson
Quoting Christian König (2018-02-16 12:27:28) > Am 16.02.2018 um 11:18 schrieb Chris Wilson: > > Quoting Christian König (2018-02-16 09:31:23) > >> i915 is the only driver using those fields in the drm_gem_object > >> structure, so they only waste memory for all other

Re: [PATCH] drm: move read_domains and write_domain into i915

2018-02-16 Thread Chris Wilson
16/ and plonk them next to unsigned int cache_dirty:1; 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/i915/selftests: fix inconsistent IS_ERR and PTR_ERR

2018-02-15 Thread Chris Wilson
Quoting Gustavo A. R. Silva (2018-02-15 16:09:09) > > > On 02/15/2018 03:13 AM, Jani Nikula wrote: > > On Wed, 14 Feb 2018, "Gustavo A. R. Silva" wrote: > >> Fix inconsistent IS_ERR and PTR_ERR in shrink_boom. > >> The proper pointer to use is _explode_ instead of _purge_. > >> > >> This issue w

Re: [PATCH] drm/mm: Fix caching of leftmost node in the interval tree

2018-02-15 Thread Chris Wilson
Quoting Chris Wilson (2018-02-15 11:36:51) > When we descend the tree to find our slot, if we step to the right, we > are no longer the leftmost node. Fortunately, the cached leftmost node is unused here and no drm_mm API exposes it. So probably doesn't make sense to send it to stable

[PATCH] drm/mm: Fix caching of leftmost node in the interval tree

2018-02-15 Thread Chris Wilson
When we descend the tree to find our slot, if we step to the right, we are no longer the leftmost node. Fixes: f808c13fd373 ("lib/interval_tree: fast overlap detection") Signed-off-by: Chris Wilson Cc: Davidlohr Bueso Cc: Jérôme Glisse Cc: Christian König Cc: # v4.14+ --- drive

Re: [Intel-gfx] [PATCH v1] i915: Re-use DEFINE_SHOW_ATTRIBUTE() macro

2018-02-14 Thread Chris Wilson
Quoting Andy Shevchenko (2018-02-14 15:41:57) > ...instead of open coding file operations followed by custom ->open() > callbacks per each attribute. > > Signed-off-by: Andy Shevchenko Reviewed-by: Chris Wilson Note depends on rc1 ba

Re: [RFC] drm/atomic: Abuse legacy cursor update flag for legacy gamma update too

2018-02-13 Thread Chris Wilson
Quoting Maarten Lankhorst (2018-02-13 09:12:01) > Programs like redshift set the legacy gamma for X.org every 5 seconds. > Because atomic commits wait for vblank completion, we get a frame drop > every 5 seconds because of the legacy gamma update. > > Work around this by setting the legacy_cursor_

Re: [Intel-gfx] [PATCH 2/5] drm: Allow determining if current task is output poll worker

2018-02-12 Thread Chris Wilson
Quoting Lyude Paul (2018-02-12 17:46:11) > On Sun, 2018-02-11 at 10:38 +0100, Lukas Wunner wrote: > > Introduce a helper to determine if the current task is an output poll > > worker. > > > > This allows us to fix a long-standing deadlock in several DRM drivers > > wherein the ->runtime_suspend ca

[PATCH] drm: Use idr_init_base(1) when using id==0 for invalid

2018-02-12 Thread Chris Wilson
thus the tree-of-bitmaps indicate that is the first available). References: 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Christian Konig Cc: Dave Airlie --- Note this requires 4.16-rc1. --- drivers/gpu/drm/drm_gem

Re: [Intel-gfx] [PATCH] drm/i915: Improve PSR activation timing

2018-02-10 Thread Chris Wilson
Quoting Andy Lutomirski (2018-02-09 17:55:38) > On Fri, Feb 9, 2018 at 7:39 AM, Rodrigo Vivi wrote: > > Rodrigo Vivi writes: > > So, I move the hacked scheduled to 10s and forced psr_activate 10ms > > after that and the result is this: > > > > > > [ 11.757909] [drm:intel_psr_enable [i915]] *ERR

Re: [PATCH] gpu/drm/udl: Replace struct_mutex with driver private lock

2018-02-09 Thread Chris Wilson
Quoting Shreeya Patel (2018-02-09 12:10:56) > dev->struct_mutex is the Big DRM Lock and the only bit where > it’s mandatory is serializing GEM buffer object destruction. > Which unfortunately means drivers have to keep track of that > lock and either call unreference or unreference_locked > dependi

Re: [PATCH 1/8] include: Move ascii85 functions from i915 to linux/ascii85.h

2018-02-08 Thread Chris Wilson
date the API to be cleaner for the caller suggested by > Chris Wilson] > > Signed-off-by: Jordan Crouse > --- > @@ -545,19 +523,15 @@ static void print_error_obj(struct > drm_i915_error_state_buf *m, > > err_compression_marker(m); >

[PATCH] dma-buf/sw_sync: Fix kerneldoc warnings

2018-02-08 Thread Chris Wilson
t_create' drivers/dma-buf/sw_sync.c:248: warning: Excess function parameter 'inc' description in 'sync_pt_create' Signed-off-by: Chris Wilson --- drivers/dma-buf/sw_sync.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma-

[PATCH] drm: Fix kerneldoc warnings for drm_lease

2018-02-08 Thread Chris Wilson
x27; drivers/gpu/drm/drm_lease.c:672: warning: Excess function parameter 'file_priv' description in 'drm_mode_get_lease_ioctl' drivers/gpu/drm/drm_lease.c:733: warning: No description found for parameter 'lessor_priv' drivers/gpu/drm/drm_lease.c:733: warning: Excess func

[PATCH] dma-buf: Remove unused sync_dump()

2018-02-08 Thread Chris Wilson
_dump198 --198 sync_dump_buf 65536 - -65536 Signed-off-by: Chris Wilson Cc: Sumit Semwal Cc: Gustavo Padovan --- drivers/dma-buf/sync_debug.c | 26 -- drivers/dma-buf/sync_debug.h | 2 -- 2 files change

Re: [Intel-gfx] [PATCH v2] drm/i915/pmu: Fix sleep under atomic in RC6 readout

2018-02-07 Thread Chris Wilson
Quoting Tvrtko Ursulin (2018-02-07 09:20:27) > > On 06/02/2018 21:54, Imre Deak wrote: > > Hi Rafael, > > > > On Tue, Feb 06, 2018 at 09:11:02PM +, Chris Wilson wrote: > >> Quoting Tvrtko Ursulin (2018-02-06 18:33:11) > >>> From: Tvrtko Ur

Re: [PATCH v2] drm/i915/pmu: Fix sleep under atomic in RC6 readout

2018-02-06 Thread Chris Wilson
w_bug.cgi?id=104943 > Fixes: 6060b6aec03c ("drm/i915/pmu: Add RC6 residency metrics") > Testcase: igt/perf_pmu/rc6-runtime-pm > Cc: Tvrtko Ursulin > Cc: Chris Wilson > Cc: Imre Deak > Cc: Jani Nikula > Cc: Joonas Lahtinen > Cc: Rodrigo Vivi > Cc: David A

Re: [PATCH] drm/i915/pmu: Fix sleep under atomic in RC6 readout

2018-02-06 Thread Chris Wilson
Quoting Tvrtko Ursulin (2018-02-06 14:31:07) > +static u64 read_rc6_residency(struct drm_i915_private *i915) > +{ > + u64 val; > + > + val = intel_rc6_residency_ns(i915, IS_VALLEYVIEW(i915) ? > + VLV_GT_RENDER_RC6 : > GEN6_GT_GFX_RC6); > +

Re: [PATCH v2 2/2] drm/i915/cmdparser: Do not check past the cmd length.

2018-02-05 Thread Chris Wilson
Quoting Chris Wilson (2018-02-05 16:04:25) > Quoting Michal Srb (2018-02-05 15:17:45) > > The command MEDIA_VFE_STATE checks bits at offset +2 dwords. However, it is > > possible to have MEDIA_VFE_STATE command with length = 0 + LENGTH_BIAS = 2. > > In that case check_cmd wi

Re: [PATCH v2 2/2] drm/i915/cmdparser: Do not check past the cmd length.

2018-02-05 Thread Chris Wilson
e end of the buffer. > > If the offset ends up outside of the command length, reject the command. > > Signed-off-by: Michal Srb Looks good, both Reviewed-by: Chris Wilson I'll resend them to intel-gfx@ so CI picks them up for the checklist. -Chris

Re: [PATCH 2/2] drm/i915/cmdparser: Do not check past the cmd length.

2018-02-05 Thread Chris Wilson
Quoting Michal Srb (2018-02-05 14:29:16) > The command MEDIA_VFE_STATE checks bits at offset +2 dwords. However, it is > possible to have MEDIA_VFE_STATE command with length = 0 + LENGTH_BIAS = 2. > In that case check_cmd will read bits from the following command, or even past > the end of the buff

Re: [Intel-gfx] i915 PSR test results and cursor lag

2018-02-02 Thread Chris Wilson
Quoting Andy Lutomirski (2018-02-02 19:23:33) > On Fri, Feb 2, 2018 at 7:18 PM, Andy Lutomirski wrote: > > On Fri, Feb 2, 2018 at 1:24 AM, Andy Lutomirski wrote: > >> Anyway, this is all on a 4.14 kernel. I should update to 4.16 and see > >> what happens. > > > > I updated to 4.15, and the situa

Re: [Intel-gfx] i915 PSR test results and cursor lag

2018-02-01 Thread Chris Wilson
Quoting Andy Lutomirski (2018-02-01 21:04:30) > I got this after a recent suspend/resume: > > Feb 01 09:44:34 laptop systemd-logind[2412]: Lid closed. > Feb 01 09:44:34 laptop systemd-logind[2412]: device-enumerator: scan all dirs > Feb 01 09:44:34 laptop systemd-logind[2412]: device-enumerator:

Re: [Intel-gfx] [PATCH RFC v2 3/7] cgroup: Add interface to allow drivers to lookup process cgroup membership

2018-02-01 Thread Chris Wilson
Quoting Matt Roper (2018-02-01 19:53:11) > Drivers will need to save/restore the appropriate cgroup data for the process > submitting a driver request. Add an interface for drivers to determine the > cgroup for the userspace process submitting a driver request. > > Cc: Tejun Heo > Cc: cgro...@vg

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