[PATCH 1/8] drm/i915/gem: Break out some shmem backend utils

2021-09-13 Thread Matthew Auld
From: Thomas Hellström Break out some shmem backend utils for future reuse by the TTM backend: shmem_alloc_st(), shmem_free_st() and __shmem_writeback() which we can use to provide a shmem-backed TTM page pool for cached-only TTM buffer objects. Main functional change here is that we now compute

[PATCH 5/8] drm/i915: remember to call i915_sw_fence_fini

2021-09-13 Thread Matthew Auld
Fixes some object-debug splat which appeared while debugging something unrelated. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gt/intel_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/i

[PATCH 3/8] drm/i915/ttm: add tt shmem backend

2021-09-13 Thread Matthew Auld
For cached objects we can allocate our pages directly in shmem. This should make it possible(in a later patch) to utilise the existing i915-gem shrinker code for such objects. For now this is still disabled. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König --- drivers/gpu/d

[PATCH 6/8] drm/i915: try to simplify make_{un}shrinkable

2021-09-13 Thread Matthew Auld
Drop the atomic shrink_pin stuff, and just have make_{un}shrinkable update the shrinker visible lists immediately. This at least simplifies the next patch, and does make the behaviour more obvious. The potential downside is that make_unshrinkable now grabs a global lock even when the object itself

[PATCH 4/8] drm/i915/ttm: use cached system pages when evicting lmem

2021-09-13 Thread Matthew Auld
This should let us do an accelerated copy directly to the shmem pages when temporarily moving lmem-only objects, where the i915-gem shrinker can later kick in to swap out the pages, if needed. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 8 -

[PATCH 7/8] drm/i915/ttm: make evicted shmem pages visible to the shrinker

2021-09-13 Thread Matthew Auld
We currently just evict lmem objects to system memory when under memory pressure. For this case we lack the usual object mm.pages, which effectively hides the pages from the i915-gem shrinker, until we actually "attach" the TT to the object, or in the case of lmem-only objects it just gets migrated

[PATCH 8/8] drm/i915/ttm: enable shmem tt backend

2021-09-13 Thread Matthew Auld
Enable shmem tt backend, and enable shrinking. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index dbf06a2af8bf..

[PATCH] drm/hyperv: Fix double mouse pointers

2021-09-13 Thread Dexuan Cui
It looks like Hyper-V supports a hardware cursor feature. It is not used by Linux VM, but the Hyper-V host still draws a point as an extra mouse pointer, which is unwanted, especially when Xorg is running. The hyperv_fb driver uses synthvid_send_ptr() to hide the unwanted pointer. When the hyperv_

Re: [virtio-dev] [PATCH v1 09/12] drm/virtio: implement context init: allocate an array of fence contexts

2021-09-13 Thread Chia-I Wu
. On Mon, Sep 13, 2021 at 10:48 AM Gurchetan Singh wrote: > > > > On Fri, Sep 10, 2021 at 12:33 PM Chia-I Wu wrote: >> >> On Wed, Sep 8, 2021 at 6:37 PM Gurchetan Singh >> wrote: >> > >> > We don't want fences from different 3D contexts (virgl, gfxstream, >> > venus) to be on the same timeline.

Re: [v5 5/5] drm/panel: Update BOE and INX init code to support touch function

2021-09-13 Thread Doug Anderson
Hi, On Mon, Sep 13, 2021 at 3:59 AM yangcong wrote: > > This is an incell IC, TDDI use time division multiplexing. > Init code effect touch sensing. > Support touch function we needed to handle were: > a) Update init code for the panel driver, adjust the porch value. > b) After update init code t

Re: [PATCH v2 0/9] Move vfio_ccw to the new mdev API

2021-09-13 Thread Jason Gunthorpe
On Mon, Sep 13, 2021 at 01:40:34PM -0400, Eric Farman wrote: > On Thu, 2021-09-09 at 16:38 -0300, Jason Gunthorpe wrote: > > This addresses Cornelia's remark on the earlier patch that ccw has a > > confusing lifecycle. While it doesn't seem like the original attempt > > was > > functionally wrong,

Re: [PATCH 00/14] drm/hdcp: Pull HDCP auth/exchange/check into

2021-09-13 Thread Sean Paul
On Mon, Sep 13, 2021 at 2:05 PM Alex Deucher wrote: > > On Mon, Sep 13, 2021 at 1:57 PM Sean Paul wrote: > > > > From: Sean Paul > > > > Hello, > > This patchset pulls the HDCP protocol auth/exchange/check logic out from > > i915 into a HDCP helper library which drivers can use to implement the

[PATCH] drm/i915/dp: add a delay before setting panel brightness after power on

2021-09-13 Thread Vasily Khoruzhick
Panel in my Dell XPS 7590, that uses Intel's HDR backlight interface to control brightness, apparently needs a delay before setting brightness after power on. Without this delay the panel does accept the setting and may come up with some arbitrary brightness (sometimes it's too dark, sometimes it's

RE: [PATCH] drm/hyperv: Fix double mouse pointers

2021-09-13 Thread Haiyang Zhang
> -Original Message- > From: Dexuan Cui > Sent: Monday, September 13, 2021 2:27 PM > To: drawat.fl...@gmail.com; Haiyang Zhang ; > airl...@linux.ie; dan...@ffwll.ch; tzimmerm...@suse.de; dri- > de...@lists.freedesktop.org > Cc: linux-hyp...@vger.kernel.org; linux-ker...@vger.kernel.org;

Re: [PATCH v2 1/2] drm/probe-helper: Create a HPD IRQ event helper for a single connector

2021-09-13 Thread Sam Ravnborg
Hi Maxime, thanks for the ping on irc. I had accidently deleted v2 of this patch. Sam On Mon, Aug 30, 2021 at 11:49:09AM +0200, Maxime Ripard wrote: > The drm_helper_hpd_irq_event() function is iterating over all the > connectors when an hotplug event is detected. > > During that iterat

[Bug 214029] [NAVI] Several memory leaks in amdgpu and ttm

2021-09-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=214029 --- Comment #8 from Erhard F. (erhar...@mailbox.org) --- Created attachment 298783 --> https://bugzilla.kernel.org/attachment.cgi?id=298783&action=edit output of kmemleak (kernel 5.15-rc1, AMD FX-8370) Seems unchanged in kernel 5.15-rc1. # ca

[Bug 214029] [NAVI] Several memory leaks in amdgpu and ttm

2021-09-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=214029 --- Comment #9 from Erhard F. (erhar...@mailbox.org) --- Created attachment 298785 --> https://bugzilla.kernel.org/attachment.cgi?id=298785&action=edit kernel dmesg (kernel 5.15-rc1, AMD FX-8370) -- You may reply to this email to add a comment

[Bug 214029] [NAVI] Several memory leaks in amdgpu and ttm

2021-09-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=214029 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #298525|0 |1 is obsolete|

[PATCH] drm/i915/selftests: Add a cancel request selftest that triggers a reset

2021-09-13 Thread Matthew Brost
Add a cancel request selftest that results in an engine reset to cancel the request as it is non-preemptable. Also insert a NOP request after the cancelled request and confirm that it completes successfully. v2: (Tvrtko) - Skip test if preemption timeout compiled out - Skip test if engine res

Re: [PATCH 00/14] drm/hdcp: Pull HDCP auth/exchange/check into

2021-09-13 Thread Harry Wentland
On 2021-09-13 3:26 p.m., Sean Paul wrote: > On Mon, Sep 13, 2021 at 2:05 PM Alex Deucher wrote: >> >> On Mon, Sep 13, 2021 at 1:57 PM Sean Paul wrote: >>> >>> From: Sean Paul >>> >>> Hello, >>> This patchset pulls the HDCP protocol auth/exchange/check logic out from >>> i915 into a HDCP helpe

[PATCH] drm/i915/guc: Refcount context during error capture

2021-09-13 Thread John . C . Harrison
From: John Harrison When i915 receives a context reset notification from GuC, it triggers an error capture before resetting any outstanding requsts of that context. Unfortunately, the error capture is not a time bound operation. In certain situations it can take a long time, particularly when mul

Re: [Intel-gfx] [PATCH] drm/i915/guc: Refcount context during error capture

2021-09-13 Thread Matthew Brost
On Mon, Sep 13, 2021 at 02:10:16PM -0700, john.c.harri...@intel.com wrote: > From: John Harrison > > When i915 receives a context reset notification from GuC, it triggers > an error capture before resetting any outstanding requsts of that > context. Unfortunately, the error capture is not a time

Re: [PATCH 12/14] dt-bindings: msm/dp: Add bindings for HDCP registers

2021-09-13 Thread Rob Herring
On Mon, 13 Sep 2021 13:57:43 -0400, Sean Paul wrote: > From: Sean Paul > > This patch adds the bindings for the MSM DisplayPort HDCP registers > which are required to write the HDCP key into the display controller as > well as the registers to enable HDCP authentication/key > exchange/encryption.

[RFC PATCH v2 1/2] drm/bridge: parade-ps8640: Use regmap APIs

2021-09-13 Thread Philip Chen
Replace the direct i2c access (i2c_smbus_* functions) with regmap APIs, which will simplify the future update on ps8640 driver. Signed-off-by: Philip Chen --- Changes in v2: - Add separate reg map config per page drivers/gpu/drm/bridge/parade-ps8640.c | 89 ++ 1 file ch

[RFC PATCH v2 2/2] drm/bridge: parade-ps8640: Add support for AUX channel

2021-09-13 Thread Philip Chen
Implement the first version of AUX support, which will be useful as we expand the driver to support varied use cases. WARNING: This patch is not fully verified by hardware. But as AUX CH is not implemented for ps8640 driver until now, the patch shouldn't cause any functional regression in practice

Re: [PATCH 2/2] drm/bridge: parade-ps8640: Add support for AUX channel

2021-09-13 Thread Philip Chen
On Thu, Sep 9, 2021 at 12:07 PM Stephen Boyd wrote: > > Quoting Philip Chen (2021-09-09 11:15:27) > > On Wed, Sep 8, 2021 at 3:27 PM Stephen Boyd wrote: > > > > > > Quoting Philip Chen (2021-09-08 11:18:06) > > > > > > > + > > > > + data = (len - 1) & AUX_LENGTH_MASK; > > > > + regmap

Re: [PATCH 1/2] drm/bridge: parade-ps8640: Use regmap APIs

2021-09-13 Thread Philip Chen
On Thu, Sep 9, 2021 at 2:27 PM Stephen Boyd wrote: > > Quoting Doug Anderson (2021-09-09 14:14:29) > > On Thu, Sep 9, 2021 at 12:09 PM Stephen Boyd wrote: > > > > > > > > > Oh does this have register pages? regmap has support for pages where you > > > write some indirection register and then acce

Re: [Intel-gfx] [PATCH 06/27] drm/i915/guc: Take engine PM when a context is pinned with GuC submission

2021-09-13 Thread John Harrison
On 9/9/2021 17:41, Matthew Brost wrote: On Thu, Sep 09, 2021 at 03:46:43PM -0700, John Harrison wrote: On 8/20/2021 15:44, Matthew Brost wrote: Taking a PM reference to prevent intel_gt_wait_for_idle from short circuiting while a scheduling of user context could be enabled. As with earlier PM

Re: [Intel-gfx] [PATCH 07/27] drm/i915/guc: Don't call switch_to_kernel_context with GuC submission

2021-09-13 Thread John Harrison
On 9/13/2021 09:54, Matthew Brost wrote: On Thu, Sep 09, 2021 at 03:51:27PM -0700, John Harrison wrote: On 8/20/2021 15:44, Matthew Brost wrote: Calling switch_to_kernel_context isn't needed if the engine PM reference is taken while all contexts are pinned. By not calling switch_to_kernel_conte

Re: [Intel-gfx] [PATCH 09/27] drm/i915: Expose logical engine instance to user

2021-09-13 Thread John Harrison
On 8/20/2021 15:44, Matthew Brost wrote: Expose logical engine instance to user via query engine info IOCTL. This is required for split-frame workloads as these needs to be placed on engines in a logically contiguous order. The logical mapping can change based on fusing. Rather than having user h

Re: [Intel-gfx] [PATCH 10/27] drm/i915/guc: Introduce context parent-child relationship

2021-09-13 Thread John Harrison
On 8/20/2021 15:44, Matthew Brost wrote: Introduce context parent-child relationship. Once this relationship is created all pinning / unpinning operations are directed to the parent context. The parent context is responsible for pinning all of its' children and itself. This is a precursor to the

Re: [PATCH v1 6/6] drm/mediatek: Add mt8195 DisplayPort driver

2021-09-13 Thread Chun-Kuang Hu
Hi, Markus: Markus Schneider-Pargmann 於 2021年9月10日 週五 下午1:36寫道: > > Hi Chun-Kuang, > > On Fri, Sep 10, 2021 at 07:37:50AM +0800, Chun-Kuang Hu wrote: > > Hi, Markus: > > > > Markus Schneider-Pargmann 於 2021年9月7日 週二 上午3:37寫道: > > > > > > This patch adds a DisplayPort driver for the Mediatek mt819

Re: [RFC PATCH v2 2/2] drm/bridge: parade-ps8640: Add support for AUX channel

2021-09-13 Thread Doug Anderson
Hi, On Mon, Sep 13, 2021 at 2:33 PM Philip Chen wrote: > > Implement the first version of AUX support, which will be useful as > we expand the driver to support varied use cases. > > WARNING: This patch is not fully verified by hardware. But as AUX CH > is not implemented for ps8640 driver until

[RFC v1 1/6] drm/atomic: Move out_fence creation/setup into a separate function

2021-09-13 Thread Vivek Kasireddy
This is needed to leverage the out_fence machinery for similar but additional singalling mechanisms. Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/drm_atomic_uapi.c | 57 --- 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/drm_atom

[RFC v1 0/6] drm: Add support for DRM_CAP_RELEASE_FENCE capability

2021-09-13 Thread Vivek Kasireddy
The main idea behind DRM_CAP_RELEASE_FENCE is to add an additional signaling mechanism for a pageflip completion in addition to out_fence or DRM_EVENT_FLIP_COMPLETE event. This allows a compositor to start a new repaint cycle with a new buffer instead of waiting for the old buffer to be free. Why

[RFC v1 4/6] drm/virtio: Probe and implement VIRTIO_GPU_F_RELEASE_FENCE feature

2021-09-13 Thread Vivek Kasireddy
Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_debugfs.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_fence.c | 9 + drivers/gpu/drm/virtio/virtgpu_kms.c |

[RFC v1 5/6] drm/virtio: Prepare set_scanout_blob to accept a fence

2021-09-13 Thread Vivek Kasireddy
Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 +++- drivers/gpu/drm/virtio/virtgpu_vq.c | 7 +-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 9126bca47c6d..c219e

[RFC v1 2/6] drm/atomic: Add support for release_fence and its associated property

2021-09-13 Thread Vivek Kasireddy
Release_fence is very similar if not the same as out_fence; it is an additional signalling mechanism for a page flip completion. Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/drm_atomic_uapi.c | 43 +-- drivers/gpu/drm/drm_crtc.c| 2 ++ drivers/gpu/drm/d

[RFC v1 6/6] drm/virtio: Add a fence to set_scanout_blob

2021-09-13 Thread Vivek Kasireddy
Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/gpu/drm/virtio/virtgpu_plane.c | 63 +++--- 1 file changed, 56 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index a49fd9480381..ab39254

[RFC v1 3/6] drm: Add a capability flag to support additional flip completion signalling

2021-09-13 Thread Vivek Kasireddy
If a driver supports this capability, it means that there would be an additional signalling mechanism for a page flip completion in addition to out_fence or DRM_MODE_PAGE_FLIP_EVENT. This capability may only be relevant for Virtual KMS drivers and is currently used only by virtio-gpu. Also, it can

Re: [RFC PATCH v2 1/2] drm/bridge: parade-ps8640: Use regmap APIs

2021-09-13 Thread Doug Anderson
Hi, On Mon, Sep 13, 2021 at 2:33 PM Philip Chen wrote: > > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c > b/drivers/gpu/drm/bridge/parade-ps8640.c > index 685e9c38b2db..1b2414601538 100644 > --- a/drivers/gpu/drm/bridge/parade-ps8640.c > +++ b/drivers/gpu/drm/bridge/parade-ps8640.c > @@ -

Re: [Intel-gfx] [PATCH 09/27] drm/i915: Expose logical engine instance to user

2021-09-13 Thread Matthew Brost
On Mon, Sep 13, 2021 at 04:06:33PM -0700, John Harrison wrote: > On 8/20/2021 15:44, Matthew Brost wrote: > > Expose logical engine instance to user via query engine info IOCTL. This > > is required for split-frame workloads as these needs to be placed on > > engines in a logically contiguous order

Re: [Intel-gfx] [PATCH 06/27] drm/i915/guc: Take engine PM when a context is pinned with GuC submission

2021-09-13 Thread Matthew Brost
On Mon, Sep 13, 2021 at 03:26:29PM -0700, John Harrison wrote: > On 9/9/2021 17:41, Matthew Brost wrote: > > On Thu, Sep 09, 2021 at 03:46:43PM -0700, John Harrison wrote: > > > On 8/20/2021 15:44, Matthew Brost wrote: > > > > Taking a PM reference to prevent intel_gt_wait_for_idle from short > > >

Re: [PATCH 12/14] dt-bindings: msm/dp: Add bindings for HDCP registers

2021-09-13 Thread Stephen Boyd
Quoting Sean Paul (2021-09-13 10:57:43) > diff --git a/Documentation/devicetree/bindings/display/msm/dp-controller.yaml > b/Documentation/devicetree/bindings/display/msm/dp-controller.yaml > index 64d8d9e5e47a..984301442653 100644 > --- a/Documentation/devicetree/bindings/display/msm/dp-controller

Re: [Intel-gfx] [PATCH 10/27] drm/i915/guc: Introduce context parent-child relationship

2021-09-13 Thread Matthew Brost
On Mon, Sep 13, 2021 at 04:19:00PM -0700, John Harrison wrote: > On 8/20/2021 15:44, Matthew Brost wrote: > > Introduce context parent-child relationship. Once this relationship is > > created all pinning / unpinning operations are directed to the parent > > context. The parent context is responsib

Re: [PATCH 13/14] drm/msm: Add hdcp register ranges to sc7180 device tree

2021-09-13 Thread Stephen Boyd
Quoting Sean Paul (2021-09-13 10:57:44) > From: Sean Paul > > This patch adds the register ranges required for HDCP to the sc7180 > device tree. These registers will be used to inject HDCP key as well as > toggle HDCP on and off. It doesn't look to do any of that? > > Signed-off-by: Sean Paul >

Re: [virtio-dev] [PATCH v1 09/12] drm/virtio: implement context init: allocate an array of fence contexts

2021-09-13 Thread Gurchetan Singh
On Mon, Sep 13, 2021 at 11:52 AM Chia-I Wu wrote: > . > > On Mon, Sep 13, 2021 at 10:48 AM Gurchetan Singh > wrote: > > > > > > > > On Fri, Sep 10, 2021 at 12:33 PM Chia-I Wu wrote: > >> > >> On Wed, Sep 8, 2021 at 6:37 PM Gurchetan Singh > >> wrote: > >> > > >> > We don't want fences from dif

Re: [Intel-gfx] [PATCH 07/14] drm/i915/hdcp: Use HDCP helpers for i915

2021-09-13 Thread kernel test robot
Hi Sean, I love your patch! Yet something to improve: [auto build test ERROR on drm-tip/drm-tip] [cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.15-rc1 next-20210913] [If your patch is applied to the wrong git tree

RE: [RFC][PATCH] drm/amdgpu/powerplay/smu10: Add custom profile

2021-09-13 Thread Quan, Evan
[AMD Official Use Only] Driver can exchange the custom profiling settings with SMU FW using the table below: TABLE_CUSTOM_DPM And the related data structure is CustomDpmSettings_t. BR Evan > -Original Message- > From: Alex Deucher > Sent: Monday, September 13, 2021 11:11 PM > To: Danie

Re: [PATCH 1/8] drm/i915/gem: Break out some shmem backend utils

2021-09-13 Thread kernel test robot
Hi Matthew, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] [also build test WARNING on drm-exynos/exynos-drm-next linus/master v5.15-rc1 next-20210913] [cannot apply to drm-intel/for-linux-next tegra-drm/drm/tegra/for-next drm/drm-next] [If

Re: [PATCH] kernel/locking: Add context to ww_mutex_trylock.

2021-09-13 Thread kernel test robot
Hi Maarten, I love your patch! Perhaps something to improve: [auto build test WARNING on regulator/for-next] [also build test WARNING on tegra-drm/drm/tegra/for-next v5.14] [cannot apply to tip/locking/core linus/master next-20210909] [If your patch is applied to the wrong git tree, kindly drop

Re: [PATCH v1 1/2] drm/msm/dp: Add support for SC7280 eDP

2021-09-13 Thread Stephen Boyd
Quoting Sankeerth Billakanti (2021-08-11 17:08:01) > The eDP controller on SC7280 is similar to the eDP/DP controllers > supported by the current driver implementation. > > SC7280 supports one EDP and one DP controller which can operate > concurrently. > > The following are some required changes fo

Re: [PATCH] drm/rockchip: cdn-dp-core: Fix cdn_dp_resume unused warning

2021-09-13 Thread Randy Dunlap
On 1/14/21 11:40 PM, Palmer Dabbelt wrote: From: Palmer Dabbelt cdn_dp_resume is only used under PM_SLEEP, and now that it's static an unused function warning is triggered undner !PM_SLEEP. This conditionally enables the function to avoid the warning. Fixes: 7c49abb4c2f8 ("drm/rockchip: cdn-d

[PATCH v2 1/1] lib, stackdepot: Add helper to print stack entries into buffer.

2021-09-13 Thread Imran Khan
To print stack entries into a buffer, users of stackdepot, first get a list of stack entries using stack_depot_fetch and then print this list into a buffer using stack_trace_snprint. Provide a helper in stackdepot for this purpose. Also change above mentioned users to use this helper. Signed-off-b

[PATCH v2 0/1] lib, stackdepot: Add helper to print stack entries into buffer.

2021-09-13 Thread Imran Khan
Changes in v2: - Addressed review comment. - Added Acked from Vlastimil. - Fixed one mistake, due to which stack_trace_snprint was always getting invoked with 0 as space value. Changed it to make use of space argument, because users that are printing stack entries into buffer, may

Re: [PATCH 1/1] lib, stackdepot: Add helper to print stack entries into buffer.

2021-09-13 Thread imran . f . khan
On 13/9/21 6:51 pm, Vlastimil Babka wrote: On 9/10/21 16:10, Imran Khan wrote: To print stack entries into a buffer, users of stackdepot, first get a list of stack entries using stack_depot_fetch and then print this list into a buffer using stack_trace_snprint. Provide a helper in stackdepot

[PATCH 2/4] drm/i915/guc: Do error capture asynchronously

2021-09-13 Thread Matthew Brost
An error capture allocates memory, memory allocations depend on resets, and resets need to flush the G2H handlers to seal several races. If the error capture is done from the G2H handler this creates a circular dependency. To work around this, do a error capture in a work queue asynchronously from

[PATCH 4/4] drm/i915/guc: Refcount context during error capture

2021-09-13 Thread Matthew Brost
From: John Harrison When i915 receives a context reset notification from GuC, it triggers an error capture before resetting any outstanding requsts of that context. Unfortunately, the error capture is not a time bound operation. In certain situations it can take a long time, particularly when mul

[PATCH 0/4] Do error capture async, flush G2H processing on reset

2021-09-13 Thread Matthew Brost
Rather allocating an error capture in nowait context to break a lockdep splat [1], do the error capture async compared to the G2H processing. Signed-off-by: Matthew Brost [1] https://patchwork.freedesktop.org/patch/451415/?series=93704&rev=5 John Harrison (1): drm/i915/guc: Refcount context d

[PATCH 3/4] drm/i915/guc: Flush G2H work queue during reset

2021-09-13 Thread Matthew Brost
It isn't safe to scrub for missing G2H or continue with the reset until all G2H processing is complete. Flush the G2H work queue during reset to ensure it is done running. No need to call the IRQ handler directly either as the scrubbing code can deal with any missing G2H. Signed-off-by: Matthew Br

[PATCH 1/4] drm/i915/guc: Move guc_ids under submission_state sub-structure

2021-09-13 Thread Matthew Brost
Move guc_ids under submission_state sub-structure as a future patch will use contexts_lock (global GuC submission lock) to protect more data. Introducing the sub-structure makes ownership of the locking / fields clear. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context_types.

[PATCH 0/5] Enable GuC submission by default on DG1

2021-09-13 Thread Matthew Brost
Minimum set of patches to enable GuC submission on DG1 and enable it by default. A little difficult to test as IGTs do not work with DG1 due to a bunch of uAPI features being disabled (e.g. relocations, caching memory options, etc...) and CI for DG1 isn't all that useful yet. Tested quite thorough

[PATCH 3/5] drm/i915/guc: Add DG1 GuC / HuC firmware defs

2021-09-13 Thread Matthew Brost
From: Daniele Ceraolo Spurio Add DG1 GuC / HuC firmware defs Signed-off-by: Matthew Brost Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c

[PATCH 4/5] drm/i915/guc: Enable GuC submission by default on DG1

2021-09-13 Thread Matthew Brost
Enable GuC submission by default on DG1 Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c index 86c318516e14..2fef3b0bbe95 10064

[PATCH 2/5] drm/i915/guc: put all guc objects in lmem when available

2021-09-13 Thread Matthew Brost
From: Daniele Ceraolo Spurio The firmware binary has to be loaded from lmem and the recommendation is to put all other objects in there as well. Note that we don't fall back to system memory if the allocation in lmem fails because all objects are allocated during driver load and if we have issues

[PATCH 5/5] drm/i915/guc: Use i915_gem_object_is_lmem in i915_gem_object_is_lmem

2021-09-13 Thread Matthew Brost
The GuC objects are perma-pinned and need to be dumped during an error capture. Use the macro i915_gem_object_is_lmem rather than __i915_gem_object_is_lmem to avoid a lockdep splat as the former is the correct call if the object is perma-pinned. Signed-off-by: Matthew Brost Cc: Thomas Hellstrom

[PATCH 1/5] drm/i915: Do not define vma on stack

2021-09-13 Thread Matthew Brost
From: Venkata Sandeep Dhanalakota Defining vma on stack can cause stack overflow, if vma gets populated with new fields. Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Matthew Brost Reviewed-by: Matthew Brost --- drivers/gpu/drm/i915

Re: [PATCH 1/5] drm/i915: Do not define vma on stack

2021-09-13 Thread Dave Airlie
On Tue, 14 Sept 2021 at 14:55, Matthew Brost wrote: > > From: Venkata Sandeep Dhanalakota > > Defining vma on stack can cause stack overflow, if > vma gets populated with new fields. Is there some higher level locking stopping that from getting trashed? or a guarantee that uc_fw_bind_ggtt is onl

Re: [Intel-gfx] [PATCH 07/27] drm/i915/guc: Don't call switch_to_kernel_context with GuC submission

2021-09-13 Thread Matthew Brost
On Mon, Sep 13, 2021 at 03:38:44PM -0700, John Harrison wrote: > On 9/13/2021 09:54, Matthew Brost wrote: > > On Thu, Sep 09, 2021 at 03:51:27PM -0700, John Harrison wrote: > > On 8/20/2021 15:44, Matthew Brost wrote: > > Calling switch_to_kernel_context isn't needed if t

[PATCH 0/4] Do error capture async, flush G2H processing on reset

2021-09-13 Thread Matthew Brost
Rather allocating an error capture in nowait context to break a lockdep splat [1], do the error capture async compared to the G2H processing. v2: Fix Docs warning Signed-off-by: Matthew Brost [1] https://patchwork.freedesktop.org/patch/451415/?series=93704&rev=5 John Harrison (1): drm/i915/g

[PATCH 4/4] drm/i915/guc: Refcount context during error capture

2021-09-13 Thread Matthew Brost
From: John Harrison When i915 receives a context reset notification from GuC, it triggers an error capture before resetting any outstanding requsts of that context. Unfortunately, the error capture is not a time bound operation. In certain situations it can take a long time, particularly when mul

[PATCH 1/4] drm/i915/guc: Move guc_ids under submission_state sub-structure

2021-09-13 Thread Matthew Brost
Move guc_ids under submission_state sub-structure as a future patch will use contexts_lock (global GuC submission lock) to protect more data. Introducing the sub-structure makes ownership of the locking / fields clear. v2: (Docs) - Fix Docs warning by adding comment to submission_state structur

[PATCH 3/4] drm/i915/guc: Flush G2H work queue during reset

2021-09-13 Thread Matthew Brost
It isn't safe to scrub for missing G2H or continue with the reset until all G2H processing is complete. Flush the G2H work queue during reset to ensure it is done running. No need to call the IRQ handler directly either as the scrubbing code can deal with any missing G2H. Signed-off-by: Matthew Br

[PATCH 2/4] drm/i915/guc: Do error capture asynchronously

2021-09-13 Thread Matthew Brost
An error capture allocates memory, memory allocations depend on resets, and resets need to flush the G2H handlers to seal several races. If the error capture is done from the G2H handler this creates a circular dependency. To work around this, do a error capture in a work queue asynchronously from

[PATCH] drm/v3d: fix wait for TMU write combiner flush

2021-09-13 Thread Iago Toral Quiroga
The hardware sets the TMUWCF bit back to 0 when the TMU write combiner flush completes so we should be checking for that instead of the L2TFLS bit. Fixes spurious Vulkan CTS failures in: dEQP-VK.binding_model.descriptorset_random.* --- drivers/gpu/drm/v3d/v3d_gem.c | 2 +- 1 file changed, 1 inser

Re: [PATCH v2 0/9] Move vfio_ccw to the new mdev API

2021-09-13 Thread Eric Farman
On Thu, 2021-09-09 at 16:38 -0300, Jason Gunthorpe wrote: > This addresses Cornelia's remark on the earlier patch that ccw has a > confusing lifecycle. While it doesn't seem like the original attempt > was > functionally wrong, the result can be made better with a lot of > further > work. I though

Re: [PATCH v2 0/9] Move vfio_ccw to the new mdev API

2021-09-13 Thread Eric Farman
On Mon, 2021-09-13 at 16:24 -0300, Jason Gunthorpe wrote: > On Mon, Sep 13, 2021 at 01:40:34PM -0400, Eric Farman wrote: > > On Thu, 2021-09-09 at 16:38 -0300, Jason Gunthorpe wrote: > > > This addresses Cornelia's remark on the earlier patch that ccw > > > has a > > > confusing lifecycle. While it

Re: [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-13 Thread Peter Zijlstra
On Mon, Sep 13, 2021 at 10:42:36AM +0200, Maarten Lankhorst wrote: > > +/** > > + * ww_mutex_trylock - tries to acquire the w/w mutex with optional acquire > > context > > + * @ww: mutex to lock > > + * @ww_ctx: optional w/w acquire context > > + * > > + * Trylocks a mutex with the optional acqui

<    1   2