[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible (rev2)

2021-09-24 Thread Patchwork
== Series Details == Series: drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible (rev2) URL : https://patchwork.freedesktop.org/series/94786/ State : failure == Summary == Applying: drm: cleanup: drm_modeset_lock_all_ctx() --> DRM_MODESET_LOCK_ALL_BEGIN() Applying: drm/i915: clean

Re: [Intel-gfx] [patch 07/11] drm/i915/pmu: Use hrtimer_forward_now()

2021-09-24 Thread Tvrtko Ursulin
On 23/09/2021 17:04, Thomas Gleixner wrote: hrtimer_forward() is about to be removed from the public interfaces. Replace it with hrtimer_forward_now() which provides the same functionality. Signed-off-by: Thomas Gleixner Cc: David Airlie Cc: intel-gfx@lists.freedesktop.org Cc: Joonas Lahtine

Re: [Intel-gfx] [PATCH 14/25] drm/i915: use the new iterator in i915_gem_busy_ioctl v2

2021-09-24 Thread Tvrtko Ursulin
On 23/09/2021 08:55, Christian König wrote: This makes the function much simpler since the complex retry logic is now handled else where. Please mention the increased cost versus the old implementation (two atomics per fence when walking vs no atomics). Regards, Tvrtko Signed-off-by: Ch

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [01/25] dma-buf: add dma_resv_for_each_fence_unlocked v5

2021-09-24 Thread Tvrtko Ursulin
On 23/09/2021 14:05, Patchwork wrote: [snip] * igt@gem_busy@busy@all: o fi-apl-guc: PASS -> FAIL

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [01/25] dma-buf: add dma_resv_for_each_fence_unlocked v5

2021-09-24 Thread Tvrtko Ursulin
On 24/09/2021 10:13, Christian König wrote: Am 24.09.21 um 11:11 schrieb Tvrtko Ursulin: On 23/09/2021 14:05, Patchwork wrote: [snip]   *     igt@gem_busy@busy@all:   o fi-apl-guc: PASS

Re: [Intel-gfx] [PATCH 0/6] drm/i915: Reject bogus modes with fixed mode panels

2021-09-24 Thread Jani Nikula
On Thu, 23 Sep 2021, Ville Syrjala wrote: > From: Ville Syrjälä > > Let's start to reject user modes whose refresh rate is > nowhere near the actual fixed mode refresh rate we're > going to use. ATM we're just flat out lying to the user. I eyeballed through this quickly, mostly seems reasonable,

Re: [Intel-gfx] [PATCH 01/13] drm/i915/tc: Fix TypeC port init/resume time sanitization

2021-09-24 Thread Jani Nikula
On Thu, 23 Sep 2021, "Souza, Jose" wrote: > On Tue, 2021-09-21 at 03:23 +0300, Imre Deak wrote: >> Atm during driver loading and system resume TypeC ports are accessed >> before their HW/SW state is synced. Move the TypeC port sanitization to >> the encoder's sync_state hook to fix this. >> >> Fi

Re: [Intel-gfx] [PATCH 01/13] drm/i915/tc: Fix TypeC port init/resume time sanitization

2021-09-24 Thread Imre Deak
On Fri, Sep 24, 2021 at 01:59:35PM +0300, Jani Nikula wrote: > On Thu, 23 Sep 2021, "Souza, Jose" wrote: > > On Tue, 2021-09-21 at 03:23 +0300, Imre Deak wrote: > >> Atm during driver loading and system resume TypeC ports are accessed > >> before their HW/SW state is synced. Move the TypeC port sa

Re: [Intel-gfx] [PATCH 0/6] drm/i915: Reject bogus modes with fixed mode panels

2021-09-24 Thread Ville Syrjälä
On Fri, Sep 24, 2021 at 01:48:51PM +0300, Jani Nikula wrote: > On Thu, 23 Sep 2021, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > Let's start to reject user modes whose refresh rate is > > nowhere near the actual fixed mode refresh rate we're > > going to use. ATM we're just flat out lying

[Intel-gfx] [CI 01/24] drm/i915/uncore: split the fw get function into separate vfunc

2021-09-24 Thread Jani Nikula
From: Dave Airlie constify it while here. drop the put function since it was never overloaded and always has done the same thing, no point in indirecting it for show. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/intel_uncore.c | 70 +

[Intel-gfx] [CI 02/24] drm/i915/pm: drop get_fifo_size vfunc.

2021-09-24 Thread Jani Nikula
From: Dave Airlie The i845_update_wm code was always calling the i845 variant, and the i9xx_update_wm had only a choice between i830 and i9xx paths, hardly worth the vfunc overhead. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/i915_d

[Intel-gfx] [CI 03/24] drm/i915: make update_wm take a dev_priv.

2021-09-24 Thread Jani Nikula
From: Dave Airlie The crtc was never being used here. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 10 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_pm.c

[Intel-gfx] [CI 04/24] drm/i915/wm: provide wrappers around watermark vfuncs calls (v2)

2021-09-24 Thread Jani Nikula
From: Dave Airlie This moves one wrapper from the pm->display side, and creates wrappers for all the others, this should simplify things later. One thing to note is that the code checks the existance of some of these ptrs, so the wrappers are a bit complicated by that. Suggested by Jani. v2: f

[Intel-gfx] [CI 05/24] drm/i915: add wrappers around cdclk vtable funcs.

2021-09-24 Thread Jani Nikula
From: Dave Airlie This adds wrappers around all the vtable callers so they are in one place. Suggested by Jani. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cdclk.c| 47 +++ drivers/gpu/drm/i915/dis

[Intel-gfx] [CI 06/24] drm/i915/display: add intel_fdi_link_train wrapper.

2021-09-24 Thread Jani Nikula
From: Dave Airlie This wraps the fdi link training vfunc to make it clearer. Suggested by Jani. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/display/intel_fdi.c | 8

[Intel-gfx] [CI 07/24] drm/i915: split clock gating init from display vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie This function is only used inside intel_pm.c Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/i915_drv.h | 9 ++- drivers/gpu/drm/i915/intel_pm.c | 48 - 2 files changed, 32 insertio

[Intel-gfx] [CI 08/24] drm/i915: split watermark vfuncs from display vtable.

2021-09-24 Thread Jani Nikula
From: Dave Airlie These are the watermark api between display and pm. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 34 - drivers/gpu/drm/i915/i915_drv.h | 24 driver

[Intel-gfx] [CI 09/24] drm/i915: split color functions from display vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie These are only used internally in the color module Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_color.c | 64 +++--- drivers/gpu/drm/i915/i915_drv.h| 39 +++-- 2 fil

[Intel-gfx] [CI 10/24] drm/i915: split audio functions from display vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie These are only used internally in the audio code Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_audio.c | 24 +++--- drivers/gpu/drm/i915/i915_drv.h| 19 +++-- 2 f

[Intel-gfx] [CI 11/24] drm/i915: split cdclk functions from display vtable.

2021-09-24 Thread Jani Nikula
From: Dave Airlie This moves all the cdclk related functions into their own vtable. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cdclk.c | 142 ++--- drivers/gpu/drm/i915/i915_drv.h| 8 +-

[Intel-gfx] [CI 12/24] drm/i915: split irq hotplug function from display vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie This provide a service from irq to display, so make it separate Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_hotplug.c | 4 ++-- drivers/gpu/drm/i915/i915_drv.h | 9 - drivers/gp

[Intel-gfx] [CI 13/24] drm/i915: split fdi link training from display vtable.

2021-09-24 Thread Jani Nikula
From: Dave Airlie It may make sense to merge this with display again later, however the fdi use of the vtable is limited to only a few generations. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_fdi.c | 8 drive

[Intel-gfx] [CI 14/24] drm/i915: split the dpll clock compute out from display vtable.

2021-09-24 Thread Jani Nikula
From: Dave Airlie this single function might be possible to merge later, but for now it's simple to just split it out. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 6 +++--- drivers/gpu/drm/i915/display/int

[Intel-gfx] [CI 15/24] drm/i915: constify fdi link training vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie Put the vtable into ro memory. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_fdi.c | 20 drivers/gpu/drm/i915/i915_drv.h | 2 +- 2 files changed, 17 insertions(+), 5 delet

[Intel-gfx] [CI 16/24] drm/i915: constify hotplug function vtable.

2021-09-24 Thread Jani Nikula
From: Dave Airlie Use a macro to avoid mistakes, this type of macro is only used in a couple of places. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_hotplug.c | 4 +-- drivers/gpu/drm/i915/i915_drv.h | 2

[Intel-gfx] [CI 18/24] drm/i915: constify the audio function vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie Move the functions into read-only tables. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_audio.c | 43 ++ drivers/gpu/drm/i915/i915_drv.h| 2 +- 2 files changed, 28 inser

[Intel-gfx] [CI 20/24] drm/i915: constify the cdclk vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie This is a bit of a twisty one since each platform is slightly different, so might take some more review care. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_cdclk.c | 300 ++--- drivers/g

[Intel-gfx] [CI 17/24] drm/i915: constify color function vtable.

2021-09-24 Thread Jani Nikula
From: Dave Airlie This clarifies quite well what functions get used on what platforms instead of having to decipher the old tree. v2: fixed IVB mistake (Jani) Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_color.c | 138

[Intel-gfx] [CI 21/24] drm/i915: drop unused function ptr and comments.

2021-09-24 Thread Jani Nikula
From: Dave Airlie There was some excess comments and an unused vtbl ptr. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/i915_drv.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/

[Intel-gfx] [CI 19/24] drm/i915: constify the dpll clock vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie Most the dpll vtable into read-only memory. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 6 +-- drivers/gpu/drm/i915/display/intel_dpll.c| 48 drivers/gpu/drm/i915

[Intel-gfx] [CI 22/24] drm/i915: constify display function vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie Make nice clear tables instead of having things in two places. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 81 drivers/gpu/drm/i915/i915_drv.h | 2 +- 2

[Intel-gfx] [CI 23/24] drm/i915: constify clock gating init vtable.

2021-09-24 Thread Jani Nikula
From: Dave Airlie I used a macro to avoid making any really silly mistakes here. Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_pm.c | 78 +++-- 2 files changed

[Intel-gfx] [CI 24/24] drm/i915: constify display wm vtable

2021-09-24 Thread Jani Nikula
From: Dave Airlie Use a nop table for the cases where CxSR doesn't init properly. v2: use a nop table (Jani) Reviewed-by: Jani Nikula Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display.c | 34 - drivers/gpu/drm/i915/i915_drv.h

Re: [Intel-gfx] [PATCH] drm/i915: fix blank screen booting crashes

2021-09-24 Thread Ville Syrjälä
On Tue, Sep 21, 2021 at 06:50:39PM -0700, Matthew Brost wrote: > From: Hugh Dickins > > 5.15-rc1 crashes with blank screen when booting up on two ThinkPads > using i915. Bisections converge convincingly, but arrive at different > and surprising "culprits", none of them the actual culprit. > > n

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [01/25] dma-buf: add dma_resv_for_each_fence_unlocked v5

2021-09-24 Thread Christian König
Am 24.09.21 um 11:11 schrieb Tvrtko Ursulin: On 23/09/2021 14:05, Patchwork wrote: [snip]   *     igt@gem_busy@busy@all:   o fi-apl-guc: PASS     -> FAIL

Re: [Intel-gfx] [PATCH v2 6/9] vfio/mdev: Add mdev available instance checking to the core

2021-09-24 Thread Eric Farman
On Tue, 2021-09-21 at 10:19 -0300, Jason Gunthorpe wrote: > On Mon, Sep 20, 2021 at 08:02:29PM +0200, Cornelia Huck wrote: > > On Thu, Sep 09 2021, Jason Gunthorpe wrote: > > > > > Many of the mdev drivers use a simple counter for keeping track > > > of the > > > available instances. Move this co

Re: [Intel-gfx] [PATCH v2 1/9] vfio/ccw: Use functions for alloc/free of the vfio_ccw_private

2021-09-24 Thread Eric Farman
On Thu, 2021-09-09 at 16:38 -0300, Jason Gunthorpe wrote: > Makes the code easier to understand what is memory lifecycle and what > is > other stuff. > > Signed-off-by: Jason Gunthorpe > --- > drivers/s390/cio/vfio_ccw_drv.c | 137 ++-- > > 1 file changed, 78 inserti

Re: [Intel-gfx] [PATCH v2 2/9] vfio/ccw: Pass vfio_ccw_private not mdev_device to various functions

2021-09-24 Thread Eric Farman
On Thu, 2021-09-09 at 16:38 -0300, Jason Gunthorpe wrote: > mdev_device should only be used in functions assigned to ops > callbacks, > interior functions should use the struct vfio_ccw_private instead of > repeatedly trying to get it from the mdev. > > Signed-off-by: Jason Gunthorpe > --- > dri

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Introduce intel_panel_compute_config()

2021-09-24 Thread Ville Syrjälä
On Thu, Sep 23, 2021 at 11:01:07PM +0300, Ville Syrjala wrote: > From: Ville Syrjälä > > Let's introduce a compute_config() helper for fixed mode panels. > For now all it does is the fixed_mode->adjusted_mode copy. > > Note that with sDVO we have to ask the external encoder chip > to spit out ou

[Intel-gfx] [PATCH] drm/i915/fbc: Allow FBC with Yf tiling

2021-09-24 Thread Ville Syrjala
From: Ville Syrjälä FBC+Yf tiling seems to work just fine, and unlike with linear the hardware does appear to correctly calculate the CFB stride with using the override stride on both cfl and glk. So no need for any additional tweaks. Cc: Uma Shankar #v2 Signed-off-by: Ville Syrjälä --- drive

Re: [Intel-gfx] [PATCH 1/7] drm/i915/display: Wait PSR2 get out of deep sleep to update pipe

2021-09-24 Thread Ville Syrjälä
On Thu, Sep 23, 2021 at 12:46:11PM -0700, José Roberto de Souza wrote: > Alderlake-P was getting 'max time under evasion' messages when PSR2 > was enabled, this is due PIPE_SCANLINE/PIPEDSL returning 0 over a > period of time longer than VBLANK_EVASION_TIME_US. > > For PSR1 we had the same issue s

Re: [Intel-gfx] [PATCH 3/7] drm/i915/display: Add new fb_op_origin type and use it to optimize power savings

2021-09-24 Thread Ville Syrjälä
On Thu, Sep 23, 2021 at 12:46:13PM -0700, José Roberto de Souza wrote: > intel_prepare_plane_fb() was calling i915_gem_object_flush_frontbuffer() > with the generic ORIGIN_DIRTYFB, what was causing > PSR, FBC and DRRS to do their frontbuffer rendering in a framebuffer > that will be flipped. > > N

Re: [Intel-gfx] [PATCH 5/7] drm/i915/display/psr: Do full fetch when handling biplanar formats

2021-09-24 Thread Ville Syrjälä
On Thu, Sep 23, 2021 at 12:46:15PM -0700, José Roberto de Souza wrote: > From: Gwan-gyeong Mun > > We are still missing the PSR2 selective fetch handling of biplanar > formats but until proper handle is added we can workaround it by > doing full frames fetch when state has biplanar formats. > >

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,01/24] drm/i915/uncore: split the fw get function into separate vfunc

2021-09-24 Thread Patchwork
== Series Details == Series: series starting with [CI,01/24] drm/i915/uncore: split the fw get function into separate vfunc URL : https://patchwork.freedesktop.org/series/95024/ State : warning == Summary == $ dim checkpatch origin/drm-tip 4914c76ee59e drm/i915/uncore: split the fw get functi

[Intel-gfx] [PATCH] drm/i915: remember to call i915_sw_fence_fini

2021-09-24 Thread Matthew Auld
Seems to fix some object-debug splat which appeared while debugging something unrelated. v2: s/guc_blocked/guc_state.blocked/ Signed-off-by: Matthew Auld Cc: Ville Syrjälä Cc: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers

Re: [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Remove warning from the rps worker (rev3)

2021-09-24 Thread Matt Roper
On Thu, Sep 23, 2021 at 06:58:55AM +, Patchwork wrote: > == Series Details == > > Series: drm/i915: Remove warning from the rps worker (rev3) > URL : https://patchwork.freedesktop.org/series/94650/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_10629_full -> Patch

[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [CI,01/24] drm/i915/uncore: split the fw get function into separate vfunc

2021-09-24 Thread Patchwork
== Series Details == Series: series starting with [CI,01/24] drm/i915/uncore: split the fw get function into separate vfunc URL : https://patchwork.freedesktop.org/series/95024/ State : failure == Summary == CI Bug Log - changes from CI_DRM_10637 -> Patchwork_21152 ===

Re: [Intel-gfx] [PATCH 02/13] drm/i915/adlp/tc: Fix PHY connected check for Thunderbolt mode

2021-09-24 Thread Imre Deak
On Fri, Sep 24, 2021 at 02:18:30AM +0300, Souza, Jose wrote: > On Tue, 2021-09-21 at 03:23 +0300, Imre Deak wrote: > > On ADL-P the PHY ready (aka status complete on other platforms) flag is > > always set, besides when a DP-alt, legacy sink is connected also when a > > TBT sink is connected or not

Re: [Intel-gfx] [PATCH 04/13] drm/i915/tc: Check for DP-alt, legacy sinks before taking PHY ownership

2021-09-24 Thread Imre Deak
On Fri, Sep 24, 2021 at 03:30:07AM +0300, Souza, Jose wrote: > On Tue, 2021-09-21 at 03:23 +0300, Imre Deak wrote: > > On ADL-P the PHY ready/complete flag is always set even in TBT-alt mode. > > To avoid taking the PHY ownership and the following spurious "PHY sudden > > disconnect" messages on th

Re: [Intel-gfx] [PATCH] drm/i915: remember to call i915_sw_fence_fini

2021-09-24 Thread Ville Syrjälä
On Fri, Sep 24, 2021 at 03:46:46PM +0100, Matthew Auld wrote: > Seems to fix some object-debug splat which appeared while debugging > something unrelated. > > v2: s/guc_blocked/guc_state.blocked/ > > Signed-off-by: Matthew Auld > Cc: Ville Syrjälä > Cc: Matthew Brost Seems to help. Tested-by:

Re: [Intel-gfx] [PATCH] drm/i915: remember to call i915_sw_fence_fini

2021-09-24 Thread Matthew Brost
On Fri, Sep 24, 2021 at 03:46:46PM +0100, Matthew Auld wrote: > Seems to fix some object-debug splat which appeared while debugging > something unrelated. > > v2: s/guc_blocked/guc_state.blocked/ > > Signed-off-by: Matthew Auld > Cc: Ville Syrjälä > Cc: Matthew Brost Reviewed-by: Matthew Bros

[Intel-gfx] [PATCH 11/27] drm/amdgpu: use new iterator in amdgpu_ttm_bo_eviction_valuable

2021-09-24 Thread Christian König
Simplifying the code a bit. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 1129e17e9f09..4511cd

[Intel-gfx] [PATCH 15/27] drm/scheduler: use new iterator in drm_sched_job_add_implicit_dependencies v2

2021-09-24 Thread Christian König
Simplifying the code a bit. v2: use dma_resv_for_each_fence Signed-off-by: Christian König Reviewed-by: Daniel Vetter --- drivers/gpu/drm/scheduler/sched_main.c | 26 ++ 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_main.

[Intel-gfx] [PATCH 13/27] drm/msm: use new iterator in msm_gem_describe

2021-09-24 Thread Christian König
Simplifying the code a bit. Also drop the RCU read side lock since the object is locked anyway. Untested since I can't get the driver to compile on !ARM. Signed-off-by: Christian König --- drivers/gpu/drm/msm/msm_gem.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-)

[Intel-gfx] [PATCH 10/27] drm/amdgpu: use the new iterator in amdgpu_sync_resv

2021-09-24 Thread Christian König
Simplifying the code a bit. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 44 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index 862eb3

[Intel-gfx] [PATCH 03/27] dma-buf: add dma_resv selftest

2021-09-24 Thread Christian König
Just exercising a very minor subset of the functionality, but already proven useful. Signed-off-by: Christian König --- drivers/dma-buf/Makefile | 3 +- drivers/dma-buf/selftests.h | 1 + drivers/dma-buf/st-dma-resv.c | 164 ++ 3 files changed, 167 inse

[Intel-gfx] [PATCH 18/27] drm/i915: use the new iterator in i915_request_await_object v2

2021-09-24 Thread Christian König
Simplifying the code a bit. v2: add missing rcu_read_lock()/rcu_read_unlock() v3: use dma_resv_for_each_fence instead Signed-off-by: Christian König Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_request.c | 34 + 1 file changed, 5 insertions(+), 29 delet

[Intel-gfx] [PATCH 16/27] drm/i915: use the new iterator in i915_gem_busy_ioctl v2

2021-09-24 Thread Christian König
This makes the function much simpler since the complex retry logic is now handled else where. Signed-off-by: Christian König Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_busy.c | 35 ++-- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/dr

[Intel-gfx] [PATCH 09/27] drm/ttm: use the new iterator in ttm_bo_flush_all_fences

2021-09-24 Thread Christian König
This is probably a fix since we didn't even grabed a reference to the fences. Signed-off-by: Christian König Reviewed-by: Daniel Vetter --- drivers/gpu/drm/ttm/ttm_bo.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/g

[Intel-gfx] [PATCH 04/27] dma-buf: use new iterator in dma_resv_copy_fences

2021-09-24 Thread Christian König
This makes the function much simpler since the complex retry logic is now handled else where. Signed-off-by: Christian König Reviewed-by: Daniel Vetter --- drivers/dma-buf/dma-resv.c | 84 +++--- 1 file changed, 32 insertions(+), 52 deletions(-) diff --git a/dri

[Intel-gfx] [PATCH 14/27] drm/radeon: use new iterator in radeon_sync_resv

2021-09-24 Thread Christian König
Simplifying the code a bit. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_sync.c | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_sync.c b/drivers/gpu/drm/radeon/radeon_sync.c index 9257b60144c4..b991ba1

[Intel-gfx] [PATCH 22/27] drm: use new iterator in drm_gem_fence_array_add_implicit v3

2021-09-24 Thread Christian König
Simplifying the code a bit. v2: add missing rcu_read_lock()/unlock() v3: switch to locked version Signed-off-by: Christian König --- drivers/gpu/drm/drm_gem.c | 26 +- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/

[Intel-gfx] [PATCH 06/27] dma-buf: use new iterator in dma_resv_wait_timeout

2021-09-24 Thread Christian König
This makes the function much simpler since the complex retry logic is now handled elsewhere. Signed-off-by: Christian König Reviewed-by: Daniel Vetter --- drivers/dma-buf/dma-resv.c | 69 +- 1 file changed, 8 insertions(+), 61 deletions(-) diff --git a/drive

[Intel-gfx] [PATCH 27/27] drm/etnaviv: replace dma_resv_get_excl_unlocked

2021-09-24 Thread Christian König
We certainly hold the reservation lock here, no need for the RCU dance. Signed-off-by: Christian König --- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etna

[Intel-gfx] [PATCH 26/27] drm/etnaviv: use new iterator in etnaviv_gem_describe

2021-09-24 Thread Christian König
Instead of hand rolling the logic. Signed-off-by: Christian König --- drivers/gpu/drm/etnaviv/etnaviv_gem.c | 31 ++- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c index 8f1b5

[Intel-gfx] [PATCH 07/27] dma-buf: use new iterator in dma_resv_test_signaled

2021-09-24 Thread Christian König
This makes the function much simpler since the complex retry logic is now handled elsewhere. Signed-off-by: Christian König Reviewed-by: Daniel Vetter --- drivers/dma-buf/dma-resv.c | 57 +- 1 file changed, 7 insertions(+), 50 deletions(-) diff --git a/drive

[Intel-gfx] [PATCH 02/27] dma-buf: add dma_resv_for_each_fence

2021-09-24 Thread Christian König
A simpler version of the iterator to be used when the dma_resv object is locked. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c | 46 ++ include/linux/dma-resv.h | 19 2 files changed, 65 insertions(+) diff --git a/drivers/dm

[Intel-gfx] [PATCH 17/27] drm/i915: use the new iterator in i915_sw_fence_await_reservation v3

2021-09-24 Thread Christian König
Simplifying the code a bit. v2: use dma_resv_for_each_fence instead, according to Tvrtko the lock is held here anyway. v3: back to using dma_resv_for_each_fence_unlocked. Signed-off-by: Christian König --- drivers/gpu/drm/i915/i915_sw_fence.c | 53 ++-- 1 file change

[Intel-gfx] [PATCH 21/27] drm/i915: use new cursor in intel_prepare_plane_fb

2021-09-24 Thread Christian König
Simplifying the code a bit. Signed-off-by: Christian König --- drivers/gpu/drm/i915/display/intel_display.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 134a6acbd8fb..

[Intel-gfx] [PATCH 24/27] drm/nouveau: use the new iterator in nouveau_fence_sync

2021-09-24 Thread Christian König
Simplifying the code a bit. Signed-off-by: Christian König --- drivers/gpu/drm/nouveau/nouveau_fence.c | 48 +++-- 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index 05d0b3eb

[Intel-gfx] [PATCH 25/27] drm/nouveau: use the new interator in nv50_wndw_prepare_fb

2021-09-24 Thread Christian König
Makes the handling a bit more complex, but avoids the use of dma_resv_get_excl_unlocked(). Signed-off-by: Christian König --- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/g

[Intel-gfx] [PATCH 23/27] drm: use new iterator in drm_gem_plane_helper_prepare_fb

2021-09-24 Thread Christian König
Makes the handling a bit more complex, but avoids the use of dma_resv_get_excl_unlocked(). Signed-off-by: Christian König --- drivers/gpu/drm/drm_gem_atomic_helper.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_atomic_helper.c b/driv

[Intel-gfx] [PATCH 20/27] drm/i915: use new iterator in i915_gem_object_wait_priority

2021-09-24 Thread Christian König
Simplifying the code a bit. Signed-off-by: Christian König --- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 31 +--- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/gem/i915_gem_wait.c index a13193d

[Intel-gfx] [PATCH 08/27] dma-buf: use the new iterator in dma_buf_debug_show

2021-09-24 Thread Christian König
Simplifying the code a bit. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 24 ++-- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 474de2d988ca..d35c71743ccb 100644 --- a/drivers/dma-b

[Intel-gfx] [PATCH 05/27] dma-buf: use new iterator in dma_resv_get_fences v3

2021-09-24 Thread Christian König
This makes the function much simpler since the complex retry logic is now handled elsewhere. v2: use sizeof(void*) instead v3: fix rebase bug Signed-off-by: Christian König Reviewed-by: Daniel Vetter --- drivers/dma-buf/dma-resv.c | 108 - 1 file changed, 35

[Intel-gfx] [PATCH 12/27] drm/amdgpu: use new iterator in amdgpu_vm_prt_fini

2021-09-24 Thread Christian König
No need to actually allocate an array of fences here. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 26 +- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amd

[Intel-gfx] [PATCH 01/27] dma-buf: add dma_resv_for_each_fence_unlocked v6

2021-09-24 Thread Christian König
Abstract the complexity of iterating over all the fences in a dma_resv object. The new loop handles the whole RCU and retry dance and returns only fences where we can be sure we grabbed the right one. v2: fix accessing the shared fences while they might be freed, improve kerneldoc, rename _cu

[Intel-gfx] [PATCH 19/27] drm/i915: use new iterator in i915_gem_object_wait_reservation

2021-09-24 Thread Christian König
Simplifying the code a bit. Signed-off-by: Christian König --- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 51 +--- 1 file changed, 9 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/gem/i915_gem_wait.c index f909aaa

[Intel-gfx] [PATCH v2] drm/i915: Flush buffer pools on driver remove

2021-09-24 Thread Janusz Krzysztofik
We currently do an explicit flush of the buffer pools within the call path of drm_driver.release(); this removes all buffers, regardless of their age, freeing the buffers' associated resources (objects, adress space areas). However there is other code that runs within the drm_driver.release() call

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/fbc: Allow FBC with Yf tiling

2021-09-24 Thread Patchwork
== Series Details == Series: drm/i915/fbc: Allow FBC with Yf tiling URL : https://patchwork.freedesktop.org/series/95028/ State : success == Summary == CI Bug Log - changes from CI_DRM_10638 -> Patchwork_21153 Summary --- **SUCCESS**

Re: [Intel-gfx] [PATCH 1/7] drm/i915/display: Wait PSR2 get out of deep sleep to update pipe

2021-09-24 Thread Souza, Jose
On Fri, 2021-09-24 at 17:35 +0300, Ville Syrjälä wrote: > On Thu, Sep 23, 2021 at 12:46:11PM -0700, José Roberto de Souza wrote: > > Alderlake-P was getting 'max time under evasion' messages when PSR2 > > was enabled, this is due PIPE_SCANLINE/PIPEDSL returning 0 over a > > period of time longer th

Re: [Intel-gfx] [PATCH 3/7] drm/i915/display: Add new fb_op_origin type and use it to optimize power savings

2021-09-24 Thread Souza, Jose
On Fri, 2021-09-24 at 17:39 +0300, Ville Syrjälä wrote: > On Thu, Sep 23, 2021 at 12:46:13PM -0700, José Roberto de Souza wrote: > > intel_prepare_plane_fb() was calling i915_gem_object_flush_frontbuffer() > > with the generic ORIGIN_DIRTYFB, what was causing > > PSR, FBC and DRRS to do their front

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: remember to call i915_sw_fence_fini

2021-09-24 Thread Patchwork
== Series Details == Series: drm/i915: remember to call i915_sw_fence_fini URL : https://patchwork.freedesktop.org/series/95029/ State : success == Summary == CI Bug Log - changes from CI_DRM_10639 -> Patchwork_21154 Summary --- **SU

[Intel-gfx] [PATCH v13 01/17] drm/i915/pxp: Define PXP component interface

2021-09-24 Thread Alan Previn
From: Daniele Ceraolo Spurio This will be used for communication between the i915 driver and the mei one. Defining it in a stand-alone patch to avoid circualr dependedencies between the patches modifying the 2 drivers. Split out from an original patch from Huang, Sean Z v2: rename the componen

[Intel-gfx] [PATCH v13 03/17] drm/i915/pxp: define PXP device flag and kconfig

2021-09-24 Thread Alan Previn
From: Daniele Ceraolo Spurio Ahead of the PXP implementation, define the relevant define flag and kconfig option. v2: flip kconfig default to N. Some machines have IFWIs that do not support PXP, so we need it to be an opt-in until we add support to query the caps from the mei device. v10: chang

[Intel-gfx] [PATCH v13 02/17] mei: pxp: export pavp client to me client bus

2021-09-24 Thread Alan Previn
From: Vitaly Lubart Export PAVP client to work with i915 driver, for binding it uses kernel component framework. v2:drop debug prints, refactor match code to match mei_hdcp (Tomas) Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Ro

[Intel-gfx] [PATCH v13 00/17] drm/i915: Introduce Intel PXP

2021-09-24 Thread Alan Previn
PXP (Protected Xe Path) is an i915 component, available on GEN12 and newer platforms, that helps to establish the hardware protected session and manage the status of the alive software session, as well as its life cycle. changes from v12: - Patch #4: Fixed for loop pointer dereference (Vinay). - P

[Intel-gfx] [PATCH v13 05/17] drm/i915/pxp: Implement funcs to create the TEE channel

2021-09-24 Thread Alan Previn
From: "Huang, Sean Z" Implement the funcs to create the TEE channel, so kernel can send the TEE commands directly to TEE for creating the arbitrary (default) session. v2: fix locking, don't pollute dev_priv (Chris) v3: wait for mei PXP component to be bound. v4: drop the wait, as the component

[Intel-gfx] [PATCH v13 04/17] drm/i915/pxp: allocate a vcs context for pxp usage

2021-09-24 Thread Alan Previn
From: Daniele Ceraolo Spurio The context is required to send the session termination commands to the VCS, which will be implemented in a follow-up patch. We can also use the presence of the context as a check of pxp initialization completion. v2: use perma-pinned context (Chris) v3: rename pinne

[Intel-gfx] [PATCH v13 11/17] drm/i915/pxp: start the arb session on demand

2021-09-24 Thread Alan Previn
From: Daniele Ceraolo Spurio Now that we can handle destruction and re-creation of the arb session, we can postpone the start of the session to the first submission that requires it, to avoid keeping it running with no user. v10: increase timeout when waiting in intel_pxp_start as firmware

[Intel-gfx] [PATCH v13 07/17] drm/i915/pxp: Create the arbitrary session after boot

2021-09-24 Thread Alan Previn
From: "Huang, Sean Z" Create the arbitrary session, with the fixed session id 0xf, after system boot, for the case that application allocates the protected buffer without establishing any protection session. Because the hardware requires at least one alive session for protected buffer creation. T

[Intel-gfx] [PATCH v13 09/17] drm/i915/pxp: Implement PXP irq handler

2021-09-24 Thread Alan Previn
From: "Huang, Sean Z" The HW will generate a teardown interrupt when session termination is required, which requires i915 to submit a terminating batch. Once the HW is done with the termination it will generate another interrupt, at which point it is safe to re-create the session. Since the term

[Intel-gfx] [PATCH v13 06/17] drm/i915/pxp: set KCR reg init

2021-09-24 Thread Alan Previn
From: Daniele Ceraolo Spurio The setting is required by hardware to allow us doing further protection operation such as sending commands to GPU or TEE. The register needs to be re-programmed on resume, so for simplicitly we bundle the programming with the component binding, which is automatically

[Intel-gfx] [PATCH v13 08/17] drm/i915/pxp: Implement arb session teardown

2021-09-24 Thread Alan Previn
From: "Huang, Sean Z" Teardown is triggered when the display topology changes and no long meets the secure playback requirement, and hardware trashes all the encryption keys for display. Additionally, we want to emit a teardown operation to make sure we're clean on boot and resume v2: emit in th

[Intel-gfx] [PATCH v13 12/17] drm/i915/pxp: Enable PXP power management

2021-09-24 Thread Alan Previn
From: "Huang, Sean Z" During the power event S3+ sleep/resume, hardware will lose all the encryption keys for every hardware session, even though the session state might still be marked as alive after resume. Therefore, we should consider the session as dead on suspend and invalidate all the obje

[Intel-gfx] [PATCH v13 14/17] drm/i915/pxp: black pixels on pxp disabled

2021-09-24 Thread Alan Previn
From: Anshuman Gupta When protected sufaces has flipped and pxp session is disabled, display black pixels by using plane color CTM correction. v2: - Display black pixels in async flip too. v3: - Removed the black pixels logic for async flip. [Ville] - Used plane state to force black pixels. [Vi

[Intel-gfx] [PATCH v13 10/17] drm/i915/pxp: interfaces for using protected objects

2021-09-24 Thread Alan Previn
From: Daniele Ceraolo Spurio This api allow user mode to create protected buffers and to mark contexts as making use of such objects. Only when using contexts marked in such a way is the execution guaranteed to work as expected. Contexts can only be marked as using protected content at creation

[Intel-gfx] [PATCH v13 16/17] drm/i915/pxp: add PXP documentation

2021-09-24 Thread Alan Previn
From: Daniele Ceraolo Spurio Now that all the pieces are in place we can add a description of how the feature works. Also modify the comments in struct intel_pxp into kerneldoc. v2: improve doc (Rodrigo) Signed-off-by: Daniele Ceraolo Spurio Cc: Daniel Vetter Cc: Rodrigo Vivi Reviewed-by: Ro

[Intel-gfx] [PATCH v13 13/17] drm/i915/pxp: Add plane decryption support

2021-09-24 Thread Alan Previn
From: Anshuman Gupta Add support to enable/disable PLANE_SURF Decryption Request bit. It requires only to enable plane decryption support when following condition met. 1. PXP session is enabled. 2. Buffer object is protected. v2: - Used gen fb obj user_flags instead gem_object_metadata. [Krishna

[Intel-gfx] [PATCH v13 17/17] drm/i915/pxp: enable PXP for integrated Gen12

2021-09-24 Thread Alan Previn
From: Daniele Ceraolo Spurio Note that discrete cards can support PXP as well, but we haven't tested on those yet so keeping it disabled for now. Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_pci.c | 2 ++ 1 file changed, 2 insertions(+) diff -

  1   2   >