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

2018-02-01 Thread Chris Wilson
Quoting Kristian Høgsberg (2018-02-01 20:22:40) > On Thu, Feb 1, 2018 at 9:53 AM Chris Wilson <ch...@chris-wilson.co.uk> > wrote: > > > Quoting Andy Lutomirski (2018-02-01 17:40:22) > > > *However*, I do see one unfortunate side effect of turning on PSR. It &g

Re: [Intel-gfx] [IGT PATCH RFC] tools: Introduce intel_cgroup tool

2018-02-01 Thread Chris Wilson
Quoting Matt Roper (2018-02-01 19:56:15) > intel_cgroup is used to modify i915 cgroup parameters. At the moment only a > single parameter is supported (GPU priority offset). In the future the driver > may support additional parameters as well (e.g., limits on memory usage). > > Signed-off-by:

Re: [PATCH RFC v2 7/7] drm/i915: Add context priority & priority offset to debugfs

2018-02-01 Thread Chris Wilson
Quoting Matt Roper (2018-02-01 19:53:15) > Update i915_context_status to include priority information. > > Signed-off-by: Matt Roper > --- > drivers/gpu/drm/i915/i915_debugfs.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git

Re: [PATCH RFC v2 6/7] drm/i915: Introduce 'priority offset' for GPU contexts

2018-02-01 Thread Chris Wilson
Quoting Matt Roper (2018-02-01 19:53:14) > 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 self-classifies its own priority. > Exposing "priority offset" as an

Re: [PATCH RFC v2 5/7] drm/i915: cgroup integration

2018-02-01 Thread Chris Wilson
Quoting Matt Roper (2018-02-01 19:53:13) > +#include > + > +#include "i915_drv.h" > + > +struct i915_cgroup_data { > + struct cgroup_driver_data base; > +}; > + > +static inline struct i915_cgroup_data * > +cgrp_to_i915(struct cgroup_driver_data *data) > +{ Document your requirement that

Re: [PATCH RFC v2 5/7] drm/i915: cgroup integration

2018-02-01 Thread Chris Wilson
Quoting Matt Roper (2018-02-01 19:53:13) > Register i915 as a consumer of the cgroup_driver framework and add an ioctl to > allow userspace to set i915-specific parameters associated with cgroups. > > Signed-off-by: Matt Roper > --- > drivers/gpu/drm/i915/Kconfig

Re: [PATCH RFC v2 5/7] drm/i915: cgroup integration

2018-02-01 Thread Chris Wilson
Quoting Matt Roper (2018-02-01 19:53:13) > diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig > index dfd95889f4b7..1c6b53ee76cd 100644 > --- a/drivers/gpu/drm/i915/Kconfig > +++ b/drivers/gpu/drm/i915/Kconfig > @@ -23,6 +23,7 @@ config DRM_I915 > select SYNC_FILE >

Re: [Intel-gfx] [PATCH RFC v2 4/7] drm: Add helper to obtain cgroup of drm_file's owning process

2018-02-01 Thread Chris Wilson
Quoting Matt Roper (2018-02-01 19:53:12) > +/** > + * drm_file_get_cgroup - obtain cgroup for drm_file's owning process > + * @file_priv: DRM file > + * > + * Obtains the cgroup from a specific hierarchy that the drm_file's owning > + * process belongs to. The cgroup may be used to set

Re: [Intel-gfx] [PATCH RFC v2 2/7] kernfs: Export kernfs_get_inode

2018-02-01 Thread Chris Wilson
Quoting Matt Roper (2018-02-01 19:53:10) > Drivers may wish to access a cgroup's inode to perform permission checks on > driver-specific operations. > > Cc: Tejun Heo > Cc: cgro...@vger.kernel.org > Signed-off-by: Matt Roper > --- > fs/kernfs/inode.c

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

2018-02-01 Thread Chris Wilson
Quoting Andy Lutomirski (2018-02-01 17:40:22) > *However*, I do see one unfortunate side effect of turning on PSR. It > seems that, when I move my cursor a little bit after a few seconds of > doing nothing, there seems to be a little bit of lag, as if either a > few frames are dropped at the

Re: [PATCH 7/9] dma-buf/dma-fence: Signal all callbacks from dma_fence_release()

2018-01-31 Thread Chris Wilson
Quoting Gustavo Padovan (2018-01-31 12:32:21) > Hi, > > 2017-08-11 Jason Ekstrand <ja...@jlekstrand.net>: > > > From: Chris Wilson <ch...@chris-wilson.co.uk> > > > > This is an illegal scenario, to free the fence whilst there are pending > > ca

Re: [PATCH] dma-buf/dma-fence: Signal all callbacks from dma_fence_release()

2018-01-31 Thread Chris Wilson
Quoting Christian König (2017-08-13 14:04:29) > Am 11.08.2017 um 19:01 schrieb Chris Wilson: > > This is an illegal scenario, to free the fence whilst there are pending > > callbacks. Currently, we emit a WARN and then cast aside the callbacks > > leaving them dangling. Altern

Re: [PATCH] dma-buf: Refanctor reservation_object_add_shared_fence()

2018-01-30 Thread Chris Wilson
Quoting Christian König (2018-01-30 12:26:05) > Am 30.01.2018 um 10:32 schrieb Chris Wilson: > > Adding a shared fence to a reservation_object is currently split into > > two handlers, one to insert the fence into the existing array and the > > other to replace the existing ar

[PATCH] dma-buf: Refanctor reservation_object_add_shared_fence()

2018-01-30 Thread Chris Wilson
__warned23522350 -2 reservation_object_reserve_shared196 185 -11 reservation_object_add_shared_fence 1272 658-614 Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Christian König <christian.koe...@am

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

2018-01-26 Thread Chris Wilson
Quoting Jordan Crouse (2018-01-26 20:59:22) > The i915 DRM driver very cleverly used ascii85 encoding for their All gfx drivers must eventually become PostScript. > GPU state file. Move the encode functions to a general header file to > support other drivers that might be interested in the same

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

2018-01-26 Thread Chris Wilson
Quoting Jordan Crouse (2018-01-26 20:59:22) > 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 interested in the same > functionality. > > Signed-off-by: Jordan Crouse

Re: [PATCH 1/5] drm: rename {drm_clflush_sg, drm_clflush_pages}

2018-01-24 Thread Chris Wilson
Quoting Gurchetan Singh (2018-01-24 18:45:07) > On Wed, Jan 24, 2018 at 1:14 AM, Chris Wilson <ch...@chris-wilson.co.uk> > wrote: > > Quoting Gurchetan Singh (2018-01-24 02:55:30) > > Since clfush is an x86-only instruction, these function names won't > &g

Re: [Intel-gfx] [RFC v2 0/6] DRM logging tidy

2018-01-24 Thread Chris Wilson
Quoting Tvrtko Ursulin (2018-01-24 16:18:15) > From: Tvrtko Ursulin > > This series tries to solve a few issues in the current DRM logging code to > primarily make it clearer which messages belong to which driver. > > Main problem is that currently some logging

Re: [PATCH 1/5] drm: rename {drm_clflush_sg, drm_clflush_pages}

2018-01-24 Thread Chris Wilson
Quoting Gurchetan Singh (2018-01-24 02:55:30) > Since clfush is an x86-only instruction, these function names won't > make much sense if we start adding cases for other architectures. Whatever your dislike for the name, it has one clear advantage over the new one: it tells you what it is

Re: [PATCH] dma-buf: fix reservation_object_wait_timeout_rcu once more v2

2018-01-22 Thread Chris Wilson
> struct dma_fence *fence; > - unsigned seq, shared_count, i = 0; > + unsigned seq, shared_count; > long ret = timeout ? timeout : 1; > + int i; > > retry: > shared_count = 0; > seq = read_seqcount_begin(>seq); > rcu_read_l

Re: [PATCH] dma-buf: fix reservation_object_wait_timeout_rcu once more

2018-01-22 Thread Chris Wilson
Quoting Christian König (2018-01-22 19:32:39) > We need to set shared_count even if we already have a fence to wait for. You mean for the if (ret > 0 && wait_all && (i + 1 < shared_count) clause. In the case of having the exclusive fence, i=0 (erm, once), but shared_count may still be just 1

Re: [PATCH RFC 8/9] drm/i915: Allow default context priority to be set via cgroup parameter

2018-01-22 Thread Chris Wilson
Quoting Michel Dänzer (2018-01-22 09:50:38) > On 2018-01-20 11:40 AM, Chris Wilson wrote: > > > > Along this vein, it's worthwhile pointing out that the current scheduler > > is not even close to being the cgroup-enabled CFS implementation it > > needs to be to call its

Re: [PATCH RFC 8/9] drm/i915: Allow default context priority to be set via cgroup parameter

2018-01-20 Thread Chris Wilson
Quoting Chris Wilson (2018-01-20 09:36:10) > Quoting Matt Roper (2018-01-20 01:51:40) > > GPU contexts are usually created with "normal" priority as a starting point > > and > > then may be adjusted from their either via explicit methods > > (context_set_p

Re: [PATCH RFC 8/9] drm/i915: Allow default context priority to be set via cgroup parameter

2018-01-20 Thread Chris Wilson
Quoting Matt Roper (2018-01-20 01:51:40) > GPU contexts are usually created with "normal" priority as a starting point > and > then may be adjusted from their either via explicit methods > (context_set_param) > or implicit methods (boosts/penalization due to runtime behavior). Let's > allow >

[PATCH] drm/i915/dp: Fix compilation of intel_dp_hdcp_check_link

2018-01-18 Thread Chris Wilson
playPort") Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vet...@ffwll.ch> Cc: Ramalingam C <ramalinga...@intel.com> Cc: Sean Paul <seanp...@chromium.org> Cc: Jani Nikula <jani.nik...@linux.intel.com> --- drivers/gpu/drm/i915/intel_

Re: [PATCH] drm: Make PANEL_ORIENTATION_QUIRKS depend on DRM

2018-01-15 Thread Chris Wilson
Quoting Hans de Goede (2018-01-15 15:56:26) > Hi, > > On 15-01-18 16:48, Chris Wilson wrote: > > Commit 404d1a3edc38 ("drm: Add panel orientation quirks, v6.") > > introduced a new internal Kconfig option for DRM and placed in the > > middle of the DRM option

[PATCH] drm: Make PANEL_ORIENTATION_QUIRKS depend on DRM

2018-01-15 Thread Chris Wilson
e existing DRM options. Fixes: 404d1a3edc38 ("drm: Add panel orientation quirks, v6.") Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vet...@ffwll.ch> Cc: Hans de Goede <hdego...@redhat.com> --- drivers/gpu/drm/Kconfig | 1 + 1 fi

Re: [PATCH 0/3] drm/tegra: Add support for fence FDs

2018-01-15 Thread Chris Wilson
Quoting Thierry Reding (2018-01-12 16:04:22) > On Fri, Jan 12, 2018 at 03:38:56PM +0000, Chris Wilson wrote: > > Quoting Thierry Reding (2018-01-12 15:14:38) > > > On Fri, Jan 12, 2018 at 10:40:16AM +, Chris Wilson wrote: > > > > Quoting Thierry Reding (2018-

Re: [PATCH 0/3] drm/tegra: Add support for fence FDs

2018-01-12 Thread Chris Wilson
Quoting Thierry Reding (2018-01-12 15:14:38) > On Fri, Jan 12, 2018 at 10:40:16AM +0000, Chris Wilson wrote: > > Quoting Thierry Reding (2018-01-11 22:22:46) > > > From: Thierry Reding <tred...@nvidia.com> > > > > > > This set of patches adds suppo

Re: [PATCH 0/3] drm/tegra: Add support for fence FDs

2018-01-12 Thread Chris Wilson
Quoting Thierry Reding (2018-01-11 22:22:46) > From: Thierry Reding > > This set of patches adds support for fences to Tegra DRM and complements > the fence FD support for Nouveau. Technically this isn't necessary for a > fence-based synchronization loop with Nouveau because

Re: [PATCH] drm/prime: Remove duplicate forward declaration

2018-01-11 Thread Chris Wilson
ierry Reding <tred...@nvidia.com> Reviewed-by: Chris Wilson <ch...@chris-wilson.co.uk> -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: How to map depth=30 fb to XBGR instead of XRGB?

2018-01-09 Thread Chris Wilson
Quoting Ville Syrjälä (2018-01-09 15:19:06) > On Sun, Dec 31, 2017 at 01:03:39AM -0500, Ilia Mirkin wrote: > > NVIDIA hardware, prior to Kepler, only supports XBGR2101010. However > > drmAddFB with depth = 30 will use the mapping in > > drm_mode_legacy_fb_format and pick the XRGB version of the

Re: [RFC 0/4] drm/msm: GPU crash state

2018-01-05 Thread Chris Wilson
Quoting Jordan Crouse (2018-01-05 18:00:17) > This is a request for comment on code to store and dump a GPU state > a hang with inspiration from the very good i915 GPU error state and > the binary GPU snapshot in the downstream kernel. > > The goal is to store and provide enough information to

Re: [Intel-gfx] [PATCH v2] drm/i915: Try EDID bitbanging on HDMI after failed read

2018-01-02 Thread Chris Wilson
Quoting Rodrigo Vivi (2018-01-02 19:12:18) > On Sun, Dec 31, 2017 at 10:34:54PM +, Stefan Brüns wrote: > > + edid = drm_get_edid(connector, i2c); > > + > > + if (!edid && !intel_gmbus_is_forced_bit(i2c)) { > > + DRM_DEBUG_KMS("HDMI GMBUS EDID read failed, retry using GPIO

Re: [Intel-gfx] [RFC 4/7] drm/prime: Clear drm_gem_object->dma_buf on release

2017-12-31 Thread Chris Wilson
Quoting Noralf Trønnes (2017-12-31 13:58:40) > Clear the pointer so the buffer can be re-exported. Otherwise use > after free happens in the next call to drm_gem_prime_handle_to_fd(). > > Signed-off-by: Noralf Trønnes > --- > drivers/gpu/drm/drm_prime.c | 1 + > 1 file

Re: Problem rebuilding tip

2017-12-22 Thread Chris Wilson
Quoting Linus Walleij (2017-12-22 08:35:42) > I haven't even touched drm_syncobj.c so this conflict doesn't appear > to be mine. The conflict looks complex too. > > I guess someone else is busy fixing this up elsewhere in the world so > I just defer for a while and try rebuilding tip later. A

Re: [Intel-gfx] [PATCH] drm/syncobj: Stop reusing the same struct file for all syncobj -> fd

2017-12-20 Thread Chris Wilson
Quoting Dave Airlie (2017-12-21 02:42:56) > > @@ -494,12 +473,11 @@ static int drm_syncobj_fd_to_handle(struct drm_file > > *file_private, > > spin_unlock(_private->syncobj_table_lock); > > idr_preload_end(); > > > > - if (ret < 0) { > > - fput(syncobj->file);

[PATCH] drm/syncobj: Stop reusing the same struct file for all syncobj -> fd

2017-12-19 Thread Chris Wilson
we assumed that the syncobj->file was never unset. Stop trying to reuse the same struct file for every fd pointing to the drm_syncobj, and allocate one file for each fd instead. Reported-by: Dave Airlie <airl...@redhat.com> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc:

Re: [PATCH] drm/syncobj: reset file ptr to NULL when released.

2017-12-19 Thread Chris Wilson
Quoting Dave Airlie (2017-12-19 11:30:12) > From: Dave Airlie > > The vk cts test: > dEQP-VK.api.external.semaphore.opaque_fd.export_multiple_times_temporary > > triggers a lot of > VFS: Close: file count is 0 > > This patch fixes it, but I'm guessing it's racy and someone

Re: [Intel-gfx] [PATCH v6 0/5] drm/i915: Expose more GPU properties through sysfs

2017-12-13 Thread Chris Wilson
Quoting Daniel Vetter (2017-12-13 08:17:17) > On Tue, Dec 12, 2017 at 02:33:38PM +, Lionel Landwerlin wrote: > > On 12/12/17 11:19, Tvrtko Ursulin wrote: > > > > > > On 11/12/2017 21:05, Daniel Vetter wrote: > > > > On Mon, Dec 11, 2017 at 02:38:53PM +, Tvrtko Ursulin wrote: > > > > > On

Re: [PATCH] drm: rework delayed connector cleanup in connector_iter

2017-12-13 Thread Chris Wilson
gt; Fixes: a703c55004e1 ("drm: safely free connectors from connector_iter") > Fixes: 613051dac40d ("drm: locking iterators for connector_list") > Cc: Ben Widawsky <b...@bwidawsk.net> > Cc: Dave Airlie <airl...@gmail.com> > Cc: Chris Wilson <ch...@chris-wil

Re: [PATCH] drm: rework delayed connector cleanup in connector_iter

2017-12-13 Thread Chris Wilson
locking iterators for connector_list") > Cc: Ben Widawsky <b...@bwidawsk.net> > Cc: Dave Airlie <airl...@gmail.com> > Cc: Chris Wilson <ch...@chris-wilson.co.uk> > Cc: Sean Paul <seanp...@chromium.org> > Cc: <sta...@vger.kernel.org> # v4.11+: 613051d

Re: [PATCH] drm: Fix possible deadlock in drm_mode_config_cleanup()

2017-12-13 Thread Chris Wilson
Quoting Marek Szyprowski (2017-12-13 08:57:20) > drm_mode_config_cleanup() might be called from a workqueue context (for > example in error path handling of deferred probe), so it must not call > flush_scheduled_work(), because it would deadlock in such case. Replace > that call with explicit

Re: [PATCH] [v2] drm/i915: use static const array for PICK macro

2017-12-11 Thread Chris Wilson
Quoting Chris Wilson (2017-12-11 12:51:42) > Quoting Arnd Bergmann (2017-12-11 12:46:22) > > The varargs macro trick in _PIPE3/_PHY3/_PORT3 was meant as an optimization > > to shrink the i915 kernel module by around 1000 bytes. However, the > > downside is a size regression wi

Re: [PATCH] drm: Give the DRM device's anon_inode a unique lockclass for its mmap_rswem

2017-12-11 Thread Chris Wilson
Quoting Daniel Vetter (2017-12-11 17:20:32) > On Mon, Dec 11, 2017 at 11:39 AM, Chris Wilson <ch...@chris-wilson.co.uk> > wrote: > > Teach lockdep to track the device's internal mmapping separately > > from the generic lockclass over all other inodes. Since this is de

[PATCH] drm: Give the DRM device's anon_inode a unique lockclass for its mmap_rswem

2017-12-11 Thread Chris Wilson
. By giving the internal mmap_rwsem a distinct lockclass, lockdep can identify it and learn/enforce its distinct locking requirements. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104209 Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vet...

Re: [Intel-gfx] [PATCH] drm/i915: Increase max texture to 16k for gen9+

2017-12-07 Thread Chris Wilson
Quoting Alex Tu (2017-12-07 09:26:00) > Rrefer to another patch [1] on mesa to extend width/height to 16384. > For issue : > - https://bugs.freedesktop.org/show_bug.cgi?id=102508 > - LP: #1714178 Triple monitor display failed with Dell Dock (HiDPI) > > [1]

Re: [Intel-gfx] [PATCH] drm/i915: Increase max texture to 16k for gen9+

2017-12-07 Thread Chris Wilson
Quoting Alex Tu (2017-12-07 09:26:00) > Rrefer to another patch [1] on mesa to extend width/height to 16384. > For issue : > - https://bugs.freedesktop.org/show_bug.cgi?id=102508 > - LP: #1714178 Triple monitor display failed with Dell Dock (HiDPI) > > [1]

Re: [RESEND PATCH 4/4] drm/meson: Add missing VPU init

2017-12-06 Thread Chris Wilson
Quoting Neil Armstrong (2017-12-06 12:03:59) > On 06/12/2017 13:02, Chris Wilson wrote: > > Quoting Neil Armstrong (2017-12-06 11:54:28) > >> The VPU init misses these configurations values. > >> > >> Signed-off-by: Neil Armstrong <narmstr...@baylibre.co

Re: [RESEND PATCH 4/4] drm/meson: Add missing VPU init

2017-12-06 Thread Chris Wilson
Quoting Neil Armstrong (2017-12-06 11:54:28) > The VPU init misses these configurations values. > > Signed-off-by: Neil Armstrong > --- > drivers/gpu/drm/meson/meson_drv.c | 9 + > drivers/gpu/drm/meson/meson_registers.h | 4 > 2 files changed, 13

Re: [Intel-gfx] [PATCH v3 4/9] drm: Add some HDCP related #defines

2017-12-05 Thread Chris Wilson
Quoting Sean Paul (2017-12-05 05:15:03) > In preparation for implementing HDCP in i915, add some HDCP related > register offsets and defines. The dpcd register offsets will go in > drm_dp_helper.h whereas the ddc offsets along with generic HDCP stuff > will get stuffed in drm_hdcp.h, which is new.

Re: [Intel-gfx] [PATCH v3 2/9] drm/i915: Add more control to wait_for routines

2017-12-05 Thread Chris Wilson
2 value, > - unsigned int timeout_ms) > + unsigned int fast_timeout_us, > + unsigned int slow_timeout_ms, > + u32 *out_value) > { > unsigned fw = >

Re: [Intel-gfx] [PATCH v3 3/9] drm: Add Content Protection property

2017-12-05 Thread Chris Wilson
Quoting Daniel Vetter (2017-12-05 15:34:36) > Two bits missing imo: > - Should explain that userspace should poll this property to detect a > change from ENABLED to DESIRED (and take adequate actions and e.g. stop > the stream). No uevent will be sent out because the HDCP specs require >

Re: d17a1d97dc ("x86/mm/kasan: don't use vmemmap_populate() to initialize shadow"): BUG: KASAN: use-after-scope in __drm_mm_interval_first

2017-12-04 Thread Chris Wilson
> [ 26.770152] raw: 88007f39c5e8 88007f39c5e8 > [ 26.770152] page dumped because: kasan: bad access detected > [ 26.790299] > [ 26.790299] Memory state around the buggy address: > [ 26.790299] 88006cb3fa80: 00 00 00 00 00 00 00 00 00 00 00

Re: [PATCH] drm/vc4: Release fence after signalling

2017-12-02 Thread Chris Wilson
Quoting Stefan Schake (2017-12-02 17:40:39) > We were never releasing the initial fence reference that is obtained > through dma_fence_init. > > Link: https://github.com/anholt/linux/issues/122 > Fixes: cdec4d361323 ("drm/vc4: Expose dma-buf fences for V3D rendering.") > Signed-off-by: Stefan

Re: [Intel-gfx] [PATCH v2 2/8] drm/i915: Add more control to wait_for routines

2017-12-01 Thread Chris Wilson
Quoting Chris Wilson (2017-12-01 17:55:15) > Quoting Sean Paul (2017-12-01 17:48:17) > > On Fri, Dec 1, 2017 at 12:44 PM, Chris Wilson <ch...@chris-wilson.co.uk> > > wrote: > > > The current wait_for() is a little more complicated nowadays (variable > > >

Re: [Intel-gfx] [PATCH v2 2/8] drm/i915: Add more control to wait_for routines

2017-12-01 Thread Chris Wilson
Quoting Sean Paul (2017-12-01 17:48:17) > On Fri, Dec 1, 2017 at 12:44 PM, Chris Wilson <ch...@chris-wilson.co.uk> > wrote: > > Quoting Sean Paul (2017-12-01 17:20:24) > >> /** > >> - * _wait_for - magic (register) wait macro > >> + * __wait_

Re: [Intel-gfx] [PATCH v2 2/8] drm/i915: Add more control to wait_for routines

2017-12-01 Thread Chris Wilson
Quoting Sean Paul (2017-12-01 17:20:24) > /** > - * _wait_for - magic (register) wait macro > + * __wait_for - magic wait macro > * > - * Does the right thing for modeset paths when run under kdgb or similar > atomic > - * contexts. Note that it's important that we check the condition again

Re: [PATCH] drm/prime: skip CPU sync in map/unmap dma_buf

2017-11-30 Thread Chris Wilson
equivalent patch through i915's CI, which didn't show any problems. Reviewed-by: Chris Wilson <ch...@chris-wilson.co.uk> -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [Intel-gfx] [RFC PATCH 3/6] drm/i915: Add HDCP framework + base implementation

2017-11-30 Thread Chris Wilson
Quoting Sean Paul (2017-11-30 03:08:58) > This patch adds the framework required to add HDCP support to intel > connectors. It implements Aksv loading from fuse, and parts 1/2/3 > of the HDCP authentication scheme. > > Note that without shim implementations, this does not actually implement >

Re: [PATCH 3/3] drm/ttm: roundup the shrink request to prevent skip huge pool

2017-11-22 Thread Chris Wilson
Quoting Roger He (2017-11-22 11:44:29) > e.g. shrink reqeust is less than 512, the logic will skip huge pool You should also tell the shrinker that you skipped objects so that it knows to accumulate the request for the next pass. See shrinkctl->nr_scanned. -Chris

Re: [PATCH 1/3] drm/ttm: add set_pages_wb for handling page order more than zero

2017-11-22 Thread Chris Wilson
Quoting Roger He (2017-11-22 11:44:27) > Change-Id: Idf5ccb579d264b343199d8b8344bddeec2c0019f > Signed-off-by: Roger He > --- > drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c >

[PATCH v3] drm/printer: Add drm_vprintf()

2017-11-22 Thread Chris Wilson
Simple va_args equivalent to the existing drm_printf() for use with the drm_printer. v2: Fixup kerneldoc to match final parameter names. v3: Turn it into a kerneldoc comment Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Rob Clark <robdcl...@gmail.com> Reviewed-by: D

[PATCH] lib/rbtree,drm/mm: Add rbtree_replace_node_cached()

2017-11-22 Thread Chris Wilson
of drm_mm_replace_node() is its testsuite... Fixes: f808c13fd373 ("lib/interval_tree: fast overlap detection") Testcase: igt/drm_mm/replace Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Davidlohr Bueso <dbu...@suse.de> Cc: Jérôme Glisse <jgli...@redhat.com> Cc: Andrew Morto

Re: [PATCH] reservation: don't wait when timeout=0

2017-11-21 Thread Chris Wilson
Quoting Christian König (2017-11-21 15:49:55) > Am 21.11.2017 um 15:59 schrieb Rob Clark: > > On Tue, Nov 21, 2017 at 9:38 AM, Chris Wilson <ch...@chris-wilson.co.uk> > > wrote: > >> Quoting Rob Clark (2017-11-21 14:08:46) > >>> If we are testing

Re: [PATCH] reservation: don't wait when timeout=0

2017-11-21 Thread Chris Wilson
Quoting Rob Clark (2017-11-21 14:08:46) > If we are testing if a reservation object's fences have been > signaled with timeout=0 (non-blocking), we need to pass 0 for > timeout to dma_fence_wait_timeout(). > > Plus bonus spelling correction. > > Signed-off-by: Rob Clark >

Re: [PATCH 2/2] dma-buf: try to replace a signaled fence in reservation_object_add_shared_inplace

2017-11-15 Thread Chris Wilson
Quoting Christian König (2017-11-15 18:56:43) > Am 15.11.2017 um 18:43 schrieb Chris Wilson: > > Quoting Christian König (2017-11-15 17:34:07) > >> Am 15.11.2017 um 17:55 schrieb Chris Wilson: > >>> Quoting Chris Wilson (2017-11-14 14:34:05) > >>>>

Re: [PATCH 2/2] dma-buf: try to replace a signaled fence in reservation_object_add_shared_inplace

2017-11-15 Thread Chris Wilson
Quoting Christian König (2017-11-15 17:34:07) > Am 15.11.2017 um 17:55 schrieb Chris Wilson: > > Quoting Chris Wilson (2017-11-14 14:34:05) > >> Quoting Christian König (2017-11-14 14:24:44) > >>> Am 06.11.2017 um 17:22 schrieb Chris Wilson: > >>>>

Re: [PATCH 2/2] dma-buf: try to replace a signaled fence in reservation_object_add_shared_inplace

2017-11-15 Thread Chris Wilson
Quoting Chris Wilson (2017-11-14 14:34:05) > Quoting Christian König (2017-11-14 14:24:44) > > Am 06.11.2017 um 17:22 schrieb Chris Wilson: > > > Quoting Christian König (2017-10-30 14:59:04) > > >> @@ -126,17 +127,28 @@ reservation_object_add_shared_inplace(struct

Re: [PATCH] dma-buf/fence: Fix lock inversion within dma-fence-array

2017-11-15 Thread Chris Wilson
Quoting Chris Wilson (2017-11-14 16:27:19) > Ages ago Rob Clark noted, > > "Currently with fence-array, we have a potential deadlock situation. If > we fence_add_callback() on an array-fence, the array-fence's lock is > acquired first, and in it's ->enable_signaling() ca

Re: [Intel-gfx] [PATCH 06/10] drm/modes: Kill off the oddball DRM_MODE_TYPE_CRTC_C vs. DRM_MODE_TYPE_BUILTIN handling

2017-11-14 Thread Chris Wilson
Quoting Ville Syrjala (2017-11-14 18:32:54) > From: Ville Syrjälä > > For some reason drm_mode_set_crtcinfo() does nothing of the mode has s/of/if/ > the DRM_MODE_TYPE_BUILTIN flag set without the other bit from > DRM_MODE_TYPE_CRTC_C also set. I have zero idea

Re: [Intel-gfx] [PATCH 02/10] drm/uapi: Validate the mode flags/type

2017-11-14 Thread Chris Wilson
Quoting Ville Syrjala (2017-11-14 18:32:50) > From: Ville Syrjälä > > Currently userspace is allowed to feed in any king of garbage in the > high bits of the mode flags/type, as are drivers when probing modes. > Reject any mode with bogus flags/type. > > Hopefully

[PATCH] dma-buf/fence: Fix lock inversion within dma-fence-array

2017-11-14 Thread Chris Wilson
l...@gmail.com Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Rob Clark <robdcl...@gmail.com> Cc: Gustavo Padovan <gustavo.pado...@collabora.co.uk> Cc: Sumit Semwal <sumit.sem...@linaro.org> Cc: Christian König <christian.koe...@amd.com> --- drivers/base

Re: [PATCH 1/2] dma-buf: keep only not signaled fence in reservation_object_add_shared_replace v3

2017-11-14 Thread Chris Wilson
Quoting Chris Wilson (2017-11-14 14:39:29) > Quoting Christian König (2017-11-14 14:24:35) > > The amdgpu issue to also need signaled fences in the reservation objects > > should be fixed by now. > > > > Optimize the list by keeping only the not signaled yet fences aro

Re: [PATCH 2/2] dma-buf: try to replace a signaled fence in reservation_object_add_shared_inplace

2017-11-14 Thread Chris Wilson
ian König <christian.koe...@amd.com> Reviewed-by: Chris Wilson <ch...@chris-wilson.co.uk> Does what you say, but not quite the same patch I've been testing. -Chris ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 1/2] dma-buf: keep only not signaled fence in reservation_object_add_shared_replace v3

2017-11-14 Thread Chris Wilson
OINTER(fobj->shared[j++], check); > } > + fobj->shared_count = j; > + RCU_INIT_POINTER(fobj->shared[fobj->shared_count], fence); > + fobj->shared_count++; I would keep the INIT_PTR(fobj->shared[j++], fence); fobj->shared_count = j; Reviewed

Re: [PATCH 2/2] dma-buf: try to replace a signaled fence in reservation_object_add_shared_inplace

2017-11-14 Thread Chris Wilson
Quoting Christian König (2017-11-14 14:24:44) > Am 06.11.2017 um 17:22 schrieb Chris Wilson: > > Quoting Christian König (2017-10-30 14:59:04) > >> From: Christian König <christian.koe...@amd.com> > >> > >> The amdgpu issue to also need signaled fenc

Re: [PATCH v5 04/12] drm/framebuffer: Add framebuffer debugfs file

2017-11-13 Thread Chris Wilson
Quoting Noralf Trønnes (2017-11-13 22:12:06) > > Den 13.11.2017 22.33, skrev Chris Wilson: > > Quoting Noralf Trønnes (2017-11-13 19:54:43) > >> Den 11.11.2017 19.55, skrev Chris Wilson: > >>> Quoting Noralf Trønnes (2017-11-07 19:13:40) > >>

Re: [PATCH v5 04/12] drm/framebuffer: Add framebuffer debugfs file

2017-11-13 Thread Chris Wilson
Quoting Noralf Trønnes (2017-11-13 19:54:43) > > Den 11.11.2017 19.55, skrev Chris Wilson: > > Quoting Noralf Trønnes (2017-11-07 19:13:40) > >> Add debugfs file that dumps info about the framebuffers and its planes. > >> Also dump info about any connected gem obj

Re: [PATCH v5 04/12] drm/framebuffer: Add framebuffer debugfs file

2017-11-11 Thread Chris Wilson
Quoting Noralf Trønnes (2017-11-07 19:13:40) > Add debugfs file that dumps info about the framebuffers and its planes. > Also dump info about any connected gem object(s). This isn't too hot for non-modesetting drm drivers. And isn't this growing a midlayer? Calling to the drivers instead of the

Re: [Intel-gfx] [PATCH] i915: pm: Be less agressive with clockfreq changes on Bay Trail

2017-11-10 Thread Chris Wilson
Quoting Hans de Goede (2017-11-09 18:51:01) > Bay Trail devices are known to hang when changing the frequency often, > this is discussed in great length in: > https://bugzilla.kernel.org/show_bug.cgi?id=109051 > > Commit 6067a27d1f01 ("drm/i915: Avoid tweaking evaluation thresholds > on Baytrail

[PATCH v2] drm/printer: Add drm_vprintf()

2017-11-10 Thread Chris Wilson
Simple va_args equivalent to the existing drm_printf() for use with the drm_printer. Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> --- drivers/gpu/drm/drm_print.c | 5 + include/drm/drm_print.h | 14 ++ 2 files changed, 15 insertions(+), 4 deletions(-) diff

[PATCH 2/2] drm/selftests/mm: Add callsite indicator to common asserts

2017-11-09 Thread Chris Wilson
The majority of the asserts (validating nodes and ranges) are shared amongst several subtests. This makes identification of which caller failed hard; but we uniquely identify them if we include the callsite into the assertion error message (a single frame stacktrace). Signed-off-by: Chris Wilson

[PATCH 1/2] lib/rbtree,drm/mm: Add rbtree_replace_node_cached()

2017-11-09 Thread Chris Wilson
of drm_mm_replace_node() is its testsuite... Fixes: f808c13fd373 ("lib/interval_tree: fast overlap detection") Testcase: igt/drm_mm/replace Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Davidlohr Bueso <dbu...@suse.de> Cc: Jérôme Glisse <jgli...@redhat.com> C

[PATCH] drm/selftests/mm: Insert cond_resched() between insert modes

2017-11-07 Thread Chris Wilson
kbuilder has begun running the selftests and reported a soft-lockup inside __igt_insert(), so break up the test loop over different modes with another call to cond_resched(). Reported-by: Fengguang Wu <fengguang...@intel.com> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

Re: [PATCH 2/2] dma-buf: try to replace a signaled fence in reservation_object_add_shared_inplace

2017-11-06 Thread Chris Wilson
Quoting Christian König (2017-10-30 14:59:04) > From: Christian König > > The amdgpu issue to also need signaled fences in the reservation objects > should > be fixed by now. > > Optimize the handling by replacing a signaled fence when adding a new > shared one. > >

Re: [PATCH 1/2] dma-buf: keep only not signaled fence in reservation_object_add_shared_replace v2

2017-11-06 Thread Chris Wilson
Quoting Christian König (2017-10-30 14:59:03) > From: Christian König > > The amdgpu issue to also need signaled fences in the reservation objects > should be fixed by now. > > Optimize the list by keeping only the not signaled yet fences around. > > v2: temporary put

Re: [PATCH v2] drm/drm_vma_manager.c: Remove useless goto statement

2017-11-01 Thread Chris Wilson
call redundant. Rework the function (as suggested by Chris Wilson) to > eliminate the need for the goto and associated label. > > v2: rewrite function to remove all goto statements. > > Fixes: db2395eccf08i ("drm: Convert drm_vma_manager to embedded interval-tree > in drm_mm&q

Re: [PATCH 1/2] drm/i915: Reject unknown syncobj flags

2017-11-01 Thread Chris Wilson
Quoting Tvrtko Ursulin (2017-10-31 10:23:25) > From: Tvrtko Ursulin <tvrtko.ursu...@intel.com> > > We have to reject unknown flags for uAPI considerations, and also > because the curent implementation limits their i915 storage space > to two bits. > > v2: (Chris W

Re: [PATCH] drm/drm_vma_manager.c: Remove useless goto statement

2017-11-01 Thread Chris Wilson
Quoting Liviu Dudau (2017-11-01 14:20:53) > On Wed, Nov 01, 2017 at 02:11:44PM +0000, Chris Wilson wrote: > > Quoting Liviu Dudau (2017-11-01 14:04:24) > > > Commit db2395eccf08i ("drm: Convert drm_vma_manager to embedded > > > interval-tree in drm_mm")

Re: [PATCH] drm/drm_vma_manager.c: Remove useless goto statement

2017-11-01 Thread Chris Wilson
redundant. Remove them. > > Fixes: db2395eccf08i ("drm: Convert drm_vma_manager to embedded interval-tree > in drm_mm") > Cc: Chris Wilson <ch...@chris-wilson.co.uk> > Signed-off-by: Liviu Dudau <liviu.du...@arm.com> > --- > drivers/gpu/drm/drm_vma_manager.c |

Re: [PATCH] drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all

2017-11-01 Thread Chris Wilson
Quoting Daniel Vetter (2017-10-31 16:38:26) > On Tue, Oct 31, 2017 at 03:28:01PM +0200, Ville Syrjälä wrote: > > On Tue, Oct 31, 2017 at 11:55:35AM +0000, Chris Wilson wrote: > > > To acquire all modeset locks requires a ww_ctx to be allocated. As this > > > is the leg

Re: [PATCH] drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all

2017-10-31 Thread Chris Wilson
Quoting Chris Wilson (2017-10-31 11:55:35) > To acquire all modeset locks requires a ww_ctx to be allocated. As this > is the legacy path and the allocation small, to reduce the changes > required (and complex untested error handling) to the legacy drivers, we > simply assume that th

Re: WARNING in drm_modeset_lock_all

2017-10-31 Thread Chris Wilson
Quoting syzbot (2017-10-27 09:09:50) > This bug is generated by a dumb bot. It may contain errors. > See https://goo.gl/tpsmEJ for details. > Direct all questions to syzkal...@googlegroups.com. > > syzbot will keep track of this bug report. > Once a fix for this bug is committed, please reply to

[PATCH] drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all

2017-10-31 Thread Chris Wilson
-to-fail rule, but syzbot found that by injecting a failure here we would hit the WARN. Document that this allocation must succeed with __GFP_NOFAIL. Reported-by: syzbot (syzkaller) Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vet...@ffwll.ch> --- Resent

Re: WARNING in drm_modeset_lock_all

2017-10-30 Thread Chris Wilson
Quoting syzbot (2017-10-27 09:09:50) > Hello, > > syzkaller hit the following crash on > 6f20b7a58cb9c0fe00badcdfd65b1f4a8f28dfc6 > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is

Re: [PATCH 1/3] drm/i915: Reject unknown syncobj flags

2017-10-27 Thread Chris Wilson
Tvrtko Ursulin <tvrtko.ursu...@intel.com> > Fixes: cf6e7bac6357 ("drm/i915: Add support for drm syncobjs") > Cc: Jason Ekstrand <ja...@jlekstrand.net> > Cc: Chris Wilson <ch...@chris-wilson.co.uk> > Cc: Jani Nikula <jani.nik...@linux.intel.com> &

[PATCH] drm: Enable pr_debug() for drm_printer

2017-10-27 Thread Chris Wilson
pr_debug() is conditionally compiled and requires either dynamic-debugging to be enabled or for the code to opt-in using #define DEBUG. Since drm_print provides a central debugging facility using pr_debug(), make sure it will always produce output. Signed-off-by: Chris Wilson <ch...@ch

Re: [PATCH] drm/i915/selftests: Convert timers to use timer_setup()

2017-10-25 Thread Chris Wilson
Quoting Kees Cook (2017-10-25 15:05:13) > On Wed, Oct 25, 2017 at 3:11 PM, Chris Wilson <ch...@chris-wilson.co.uk> > wrote: > > Quoting Chris Wilson (2017-10-25 11:24:19) > >> Quoting Chris Wilson (2017-10-24 17:17:09) > >> > Quoting Kees Cook (2017-

Re: [PATCH] drm/i915/selftests: Convert timers to use timer_setup()

2017-10-25 Thread Chris Wilson
Quoting Chris Wilson (2017-10-25 11:24:19) > Quoting Chris Wilson (2017-10-24 17:17:09) > > Quoting Kees Cook (2017-10-24 16:13:44) > > > In preparation for unconditionally passing the struct timer_list pointer > > > to > > > all timer callbacks,

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