[Intel-gfx] [PATCH 05/12] drm/i915: Store ilk+ csc matrices in the crtc state

2023-03-29 Thread Ville Syrjala
From: Ville Syrjälä Embed a pair of intel_csc_matrix structs in the crtc state, and fill them out appropriately during atomic_check(). Since pre-ivb platforms don't have programmable post offsets we shall leave those zeroed, mainly in preparation for state readout+check. Signed-off-by: Ville

[Intel-gfx] [PATCH 04/12] drm/i915: Start using struct intel_csc_matrix for chv cgm csc

2023-03-29 Thread Ville Syrjala
From: Ville Syrjälä Convert chv_cgm_csc_convert_ctm() over to using the nee intel_csc_matrix structure. No pre/post offsets on this hardware so only the coefficients get filled out. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_color.c | 24 +++--- 1 file

[Intel-gfx] [PATCH 02/12] drm/i915: Introduce intel_csc_matrix struct

2023-03-29 Thread Ville Syrjala
From: Ville Syrjälä Introduce a structure that can hold our CSC matrices. In there we shall have the preoffsets, postoffsets, and coefficients, all in platform specific format (at least for now). We shall start by converting the ilk+ code to make use of the new structure. chv will come later.

[Intel-gfx] [PATCH 03/12] drm/i915: Split chv_load_cgm_csc() into pieces

2023-03-29 Thread Ville Syrjala
From: Ville Syrjälä Split chv_cgm_csc_convert_ctm() out from chv_load_cgm_csc() so that we have functions with clear jobs. This is also how the ilk+ code is already structured. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_color.c | 19 +-- 1 file

[Intel-gfx] [PATCH 01/12] drm/i915: Fix limited range csc matrix

2023-03-29 Thread Ville Syrjala
From: Ville Syrjälä Our current limited range matrix is a bit off. I think it was originally calculated with rounding, as if we wanted the normal pixel replication type of behaviour. That is, since the 8bpc max value is 0xeb we assumed the 16bpc max value should be 0xebeb, but what the HDMI spec

[Intel-gfx] [PATCH 00/12] drm/i915: Add CSC state readout/check

2023-03-29 Thread Ville Syrjala
From: Ville Syrjälä Implement state readout/check for the various CSC units we utilize. Ville Syrjälä (12): drm/i915: Fix limited range csc matrix drm/i915: Introduce intel_csc_matrix struct drm/i915: Split chv_load_cgm_csc() into pieces drm/i915: Start using struct intel_csc_matrix for

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/hwmon: Use 0 to designate disabled PL1 power limit

2023-03-29 Thread Patchwork
== Series Details == Series: drm/i915/hwmon: Use 0 to designate disabled PL1 power limit URL : https://patchwork.freedesktop.org/series/115749/ State : success == Summary == CI Bug Log - changes from CI_DRM_12931_full -> Patchwork_115749v1_full

Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: Use current cdclk for DSC Bigjoiner BW check

2023-03-29 Thread Lisovskiy, Stanislav
On Wed, Mar 29, 2023 at 02:35:38PM +0300, Ville Syrjälä wrote: > On Wed, Mar 29, 2023 at 05:00:55PM +0530, Nautiyal, Ankit K wrote: > > > > On 3/29/2023 4:23 PM, Ville Syrjälä wrote: > > > On Wed, Mar 29, 2023 at 04:06:21PM +0530, Nautiyal, Ankit K wrote: > > >> On 3/29/2023 3:27 PM, Ville

[Intel-gfx] [PATCH 1/5] drm/debugfs: drop debugfs_init() for the render and accel node v2

2023-03-29 Thread Christian König
We want to remove per minor debugfs directories. Start by stopping drivers from adding anything inside of those in the mid layer callback. v2: drop it for the accel node as well Signed-off-by: Christian König --- drivers/accel/drm_accel.c | 3 --- drivers/gpu/drm/drm_debugfs.c | 2 +- 2

[Intel-gfx] [PATCH 4/5] drm/debugfs: rework drm_debugfs_create_files implementation

2023-03-29 Thread Christian König
Use managed memory allocation for this. That allows us to not keep track of all the files any more. Signed-off-by: Christian König --- drivers/accel/drm_accel.c | 2 - drivers/gpu/drm/drm_debugfs.c | 75 +- drivers/gpu/drm/drm_drv.c | 2 -

[Intel-gfx] [PATCH 3/5] drm/debugfs: remove dev->debugfs_list and debugfs_mutex v2

2023-03-29 Thread Christian König
The mutex was completely pointless in the first place since any parallel adding of files to this list would result in random behavior since the list is filled and consumed multiple times. Completely drop that approach and just create the files directly but return -ENODEV while opening the file

[Intel-gfx] [PATCH 5/5] drm/debugfs: remove debugfs_root pointer from minor

2023-03-29 Thread Christian König
We only keept that around for API compatibility with drivers. Clean all this up and use the per device debugfs directory. Signed-off-by: Christian König --- drivers/accel/drm_accel.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c| 4 ++--

[Intel-gfx] [PATCH 2/5] drm/debugfs: rework debugfs directory creation v2

2023-03-29 Thread Christian König
Instead of the per minor directories only create a single debugfs directory for the whole device directly when the device is initialized. For DRM devices each minor gets a symlink to the per device directory for now until we can be sure that this isn't useful any more in any way. Accel devices

Re: [Intel-gfx] [PATCH v6 0/8] drm/i915: use ref_tracker library for tracking wakerefs

2023-03-29 Thread Andi Shyti
Eric, David (Miller), Could you please check the ref_tracker portion of this series? This patch has reached its 6th version, and we need your approval to proceed. Thank you, Andi On Wed, Mar 29, 2023 at 09:24:12AM +0200, Andrzej Hajda wrote: > Gently ping for network developers, could you look

Re: [Intel-gfx] [PATCH v6 6/6] drm/i915/psr: Implement Display WA #1136

2023-03-29 Thread Hogander, Jouni
On Wed, 2023-03-29 at 15:52 +0300, Ville Syrjälä wrote: > On Wed, Mar 29, 2023 at 12:45:32PM +0300, Jouni Högander wrote: > > Implement Display WA #1136 for SKL/BXT. > > Pre-ICL is more accurate now. Ok I will modify the commit message and add your rb. > > Maybe also mention here that the

Re: [Intel-gfx] [PATCH v6 2/6] drm/i915/psr: Modify/Fix Wa_16013835468 and prepare for Wa_14015648006

2023-03-29 Thread Hogander, Jouni
On Wed, 2023-03-29 at 14:40 +0300, Ville Syrjälä wrote: > On Wed, Mar 29, 2023 at 12:45:28PM +0300, Jouni Högander wrote: > > Wa_16013835468 is a separate from Wa_14015648006 and needs to be > > applied for TGL onwards. Fix this by removing all the references to > > Wa_14015648006 and apply

Re: [Intel-gfx] [PATCH v6 3/8] lib/ref_tracker: add printing to memory buffer

2023-03-29 Thread Andi Shyti
Hi Andrzej, On Wed, Mar 29, 2023 at 09:24:14AM +0200, Andrzej Hajda wrote: > Similar to stack_(depot|trace)_snprint the patch > adds helper to printing stats to memory buffer. > It will be helpful in case of debugfs. > > Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH v6 6/6] drm/i915/psr: Implement Display WA #1136

2023-03-29 Thread Ville Syrjälä
On Wed, Mar 29, 2023 at 12:45:32PM +0300, Jouni Högander wrote: > Implement Display WA #1136 for SKL/BXT. Pre-ICL is more accurate now. Maybe also mention here that the chicken bit approach might work for KBL+ but implementing that is left out for the time being. > > Bspec: 21664 > > v2:

Re: [Intel-gfx] [PATCH v6 2/8] lib/ref_tracker: improve printing stats

2023-03-29 Thread Andi Shyti
Hi Andrzej, [...] > -void ref_tracker_dir_print_locked(struct ref_tracker_dir *dir, > - unsigned int display_limit) > +struct ref_tracker_dir_stats { > + int total; > + int count; > + struct { > + depot_stack_handle_t stack_handle; > +

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/1] drm/i915: fix race condition UAF in i915_perf_add_config_ioctl

2023-03-29 Thread Patchwork
== Series Details == Series: series starting with [1/1] drm/i915: fix race condition UAF in i915_perf_add_config_ioctl URL : https://patchwork.freedesktop.org/series/115727/ State : success == Summary == CI Bug Log - changes from CI_DRM_12931_full -> Patchwork_115727v1_full

Re: [Intel-gfx] [PATCH v6 3/6] drm/i915/psr: Implement Wa_14015648006

2023-03-29 Thread Hogander, Jouni
On Wed, 2023-03-29 at 14:44 +0300, Ville Syrjälä wrote: > On Wed, Mar 29, 2023 at 12:45:29PM +0300, Jouni Högander wrote: > > PSR WM optimization should be disabled based on any wm level being > > disabled. Also same WA should be applied for ICL as well. > > > > Bspec: 71580 > > > > v4: > >  -

Re: [Intel-gfx] [PATCH v6 1/8] lib/ref_tracker: add unlocked leak print helper

2023-03-29 Thread Andi Shyti
Hi Andrzej, On Wed, Mar 29, 2023 at 09:24:12AM +0200, Andrzej Hajda wrote: > To have reliable detection of leaks, caller must be able to check under the > same > lock both: tracked counter and the leaks. dir.lock is natural candidate for > such > lock and unlocked print helper can be called

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Flag purely internal commits to not clear crtc_state->inherited

2023-03-29 Thread Patchwork
== Series Details == Series: drm/i915: Flag purely internal commits to not clear crtc_state->inherited URL : https://patchwork.freedesktop.org/series/115718/ State : success == Summary == CI Bug Log - changes from CI_DRM_12931_full -> Patchwork_115718v1_full

Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-03-29 Thread Ville Syrjälä
On Wed, Mar 29, 2023 at 04:53:13PM +0530, Nautiyal, Ankit K wrote: > > On 3/29/2023 4:24 PM, Ville Syrjälä wrote: > > On Wed, Mar 29, 2023 at 02:37:45PM +0530, Ankit Nautiyal wrote: > >> In Bigjoiner check for DSC, bigjoiner interface bits for DP for > >> DISPLAY > 13 is 36 (Bspec: 49259). > >> >

Re: [Intel-gfx] [PATCH v6 3/6] drm/i915/psr: Implement Wa_14015648006

2023-03-29 Thread Ville Syrjälä
On Wed, Mar 29, 2023 at 12:45:29PM +0300, Jouni Högander wrote: > PSR WM optimization should be disabled based on any wm level being > disabled. Also same WA should be applied for ICL as well. > > Bspec: 71580 > > v4: > - Handle mode change in psr enable/disable > - Handle wm_level_disable

Re: [Intel-gfx] [PATCH v6 2/6] drm/i915/psr: Modify/Fix Wa_16013835468 and prepare for Wa_14015648006

2023-03-29 Thread Ville Syrjälä
On Wed, Mar 29, 2023 at 12:45:28PM +0300, Jouni Högander wrote: > Wa_16013835468 is a separate from Wa_14015648006 and needs to be > applied for TGL onwards. Fix this by removing all the references to > Wa_14015648006 and apply Wa_16013835468 according to Bspec. > > Also move workaround into

Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: Use current cdclk for DSC Bigjoiner BW check

2023-03-29 Thread Ville Syrjälä
On Wed, Mar 29, 2023 at 05:00:55PM +0530, Nautiyal, Ankit K wrote: > > On 3/29/2023 4:23 PM, Ville Syrjälä wrote: > > On Wed, Mar 29, 2023 at 04:06:21PM +0530, Nautiyal, Ankit K wrote: > >> On 3/29/2023 3:27 PM, Ville Syrjälä wrote: > >>> On Wed, Mar 29, 2023 at 02:14:49PM +0530, Ankit Nautiyal

Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: Use current cdclk for DSC Bigjoiner BW check

2023-03-29 Thread Nautiyal, Ankit K
On 3/29/2023 4:23 PM, Ville Syrjälä wrote: On Wed, Mar 29, 2023 at 04:06:21PM +0530, Nautiyal, Ankit K wrote: On 3/29/2023 3:27 PM, Ville Syrjälä wrote: On Wed, Mar 29, 2023 at 02:14:49PM +0530, Ankit Nautiyal wrote: As per Bspec, Big Joiner BW check is: Output bpp <= PPC * CDCLK frequency

Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-03-29 Thread Nautiyal, Ankit K
On 3/29/2023 4:24 PM, Ville Syrjälä wrote: On Wed, Mar 29, 2023 at 02:37:45PM +0530, Ankit Nautiyal wrote: In Bigjoiner check for DSC, bigjoiner interface bits for DP for DISPLAY > 13 is 36 (Bspec: 49259). v2: Corrected Display ver to 13. Signed-off-by: Ankit Nautiyal ---

Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-03-29 Thread Ville Syrjälä
On Wed, Mar 29, 2023 at 02:37:45PM +0530, Ankit Nautiyal wrote: > In Bigjoiner check for DSC, bigjoiner interface bits for DP for > DISPLAY > 13 is 36 (Bspec: 49259). > > v2: Corrected Display ver to 13. > > Signed-off-by: Ankit Nautiyal > --- > drivers/gpu/drm/i915/display/intel_dp.c | 3 ++-

Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: Use current cdclk for DSC Bigjoiner BW check

2023-03-29 Thread Ville Syrjälä
On Wed, Mar 29, 2023 at 04:06:21PM +0530, Nautiyal, Ankit K wrote: > > On 3/29/2023 3:27 PM, Ville Syrjälä wrote: > > On Wed, Mar 29, 2023 at 02:14:49PM +0530, Ankit Nautiyal wrote: > >> As per Bspec, Big Joiner BW check is: > >> Output bpp <= PPC * CDCLK frequency * Big joiner interface bits / >

Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: Use current cdclk for DSC Bigjoiner BW check

2023-03-29 Thread Nautiyal, Ankit K
On 3/29/2023 3:27 PM, Ville Syrjälä wrote: On Wed, Mar 29, 2023 at 02:14:49PM +0530, Ankit Nautiyal wrote: As per Bspec, Big Joiner BW check is: Output bpp <= PPC * CDCLK frequency * Big joiner interface bits / Pixel clock Currently we always use max_cdclk in the check for both modevalid and

Re: [Intel-gfx] [PATCH 4/7] drm/i915/mtl: Add Support for C10 PHY message bus and pll programming

2023-03-29 Thread Govindapillai, Vinod
Hi Mika There were some comments from the previous version https://patchwork.freedesktop.org/patch/517048/#comment_943150 I think you should address them? BR vinod On Mon, 2023-03-27 at 15:34 +0300, Mika Kahola wrote: > From: Radhakrishna Sripada > > XELPDP has C10 and C20 phys from

Re: [Intel-gfx] [PATCH] drm/i915: Get HDR DPCD refresh timeout from VBT

2023-03-29 Thread Ville Syrjälä
On Tue, Mar 28, 2023 at 04:09:33PM -0400, Lyude Paul wrote: > BTW - I just started catching up with my email, is this waiting on me or was > someone else able to review it? commit fe82b93fc101 ("drm/i915: Get HDR DPCD refresh timeout from VBT") > > On Mon, 2023-02-20 at 18:47 +0200, Ville

Re: [Intel-gfx] [PATCH 2/2] drm/i915/dp: Use current cdclk for DSC Bigjoiner BW check

2023-03-29 Thread Ville Syrjälä
On Wed, Mar 29, 2023 at 02:14:49PM +0530, Ankit Nautiyal wrote: > As per Bspec, Big Joiner BW check is: > Output bpp <= PPC * CDCLK frequency * Big joiner interface bits / > Pixel clock > > Currently we always use max_cdclk in the check for both modevalid > and compute config steps. > > During

[Intel-gfx] [PATCH v6 5/6] drm/i915/psr: Check that vblank is long enough for psr2

2023-03-29 Thread Jouni Högander
Ensure vblank >= psr2 vblank where Psr2 vblank = PSR2_CTL Block Count Number maximum line count. Bspec: 71580, 49274 v2: Use calculated block count number maximum line count Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_psr.c | 9 + 1

[Intel-gfx] [PATCH v6 6/6] drm/i915/psr: Implement Display WA #1136

2023-03-29 Thread Jouni Högander
Implement Display WA #1136 for SKL/BXT. Bspec: 21664 v2: Handle disable psr in pre/post plane hooks Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 7 +++ drivers/gpu/drm/i915/display/skl_watermark.c | 5 - 2 files changed, 7 insertions(+), 5

[Intel-gfx] [PATCH v6 1/6] drm/i915/psr: Unify pre/post hooks

2023-03-29 Thread Jouni Högander
pre/post hooks are doing things differently. Unify them. Signed-off-by: Jouni Högander --- drivers/gpu/drm/i915/display/intel_psr.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c

[Intel-gfx] [PATCH v6 4/6] drm/i915/psr: Add helpers for block count number handling

2023-03-29 Thread Jouni Högander
Add helpers to make it more clear how PSR2_CTL[Block Count Number] is configured. Signed-off-by: Jouni Högander Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_psr.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git

[Intel-gfx] [PATCH v6 2/6] drm/i915/psr: Modify/Fix Wa_16013835468 and prepare for Wa_14015648006

2023-03-29 Thread Jouni Högander
Wa_16013835468 is a separate from Wa_14015648006 and needs to be applied for TGL onwards. Fix this by removing all the references to Wa_14015648006 and apply Wa_16013835468 according to Bspec. Also move workaround into separate function as a preparation for Wa_14015648006 implementation. Bspec:

[Intel-gfx] [PATCH v6 0/6] High refresh rate PSR fixes

2023-03-29 Thread Jouni Högander
Fix/adjust Wa_16013835468 and implement Wa_14015648006. Implement Wa_1136 and check for vblank being long enough for psr2. v6: - Handle mode change in psr enable/disable - Handle wm_level_disable changes separately in pre plane hook - Handle WA #1136 in pre/post plane hooks v5: - Add missing

[Intel-gfx] [PATCH v6 3/6] drm/i915/psr: Implement Wa_14015648006

2023-03-29 Thread Jouni Högander
PSR WM optimization should be disabled based on any wm level being disabled. Also same WA should be applied for ICL as well. Bspec: 71580 v4: - Handle mode change in psr enable/disable - Handle wm_level_disable changes separately in pre plane hook v3: - Split patch v2: - set/clear chicken

Re: [Intel-gfx] [PATCH v2 10/10] vfio/pci: Add VFIO_DEVICE_GET_PCI_HOT_RESET_GROUP_INFO

2023-03-29 Thread Tian, Kevin
> From: Liu, Yi L > Sent: Wednesday, March 29, 2023 11:14 AM > > > From: Alex Williamson > > Sent: Wednesday, March 29, 2023 12:00 AM > > > > > > Personally I don't like the suggestion to fail with -EPERM if the user > > doesn't own all the affected devices. This isn't a "probe if I can do > >

Re: [Intel-gfx] [PATCH 1/1] drm/i915: fix race condition UAF in i915_perf_add_config_ioctl

2023-03-29 Thread Tvrtko Ursulin
On 29/03/2023 01:48, Umesh Nerlige Ramappa wrote: On Tue, Mar 28, 2023 at 02:08:47PM +0100, Tvrtko Ursulin wrote: On 28/03/2023 10:36, Min Li wrote: Userspace can guess the id value and try to race oa_config object creation with config remove, resulting in a use-after-free if we

[Intel-gfx] [PATCH v2 1/2] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-03-29 Thread Ankit Nautiyal
In Bigjoiner check for DSC, bigjoiner interface bits for DP for DISPLAY > 13 is 36 (Bspec: 49259). v2: Corrected Display ver to 13. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Intel-gfx] [PATCH 0/2] Update DSC Bigjoiner BW check

2023-03-29 Thread Ankit Nautiyal
Update the DSC Bigjoiner BW check for computing compressed bpp: -As per latest Bspec update bigjoiner interface bits for DP for DISPLAY > 12 is 36. -Use current cdclk for the calculation of compressed_bpp instead of maxcdclk. Ankit Nautiyal (2): drm/i915/dp: Update Bigjoiner interface bits for

[Intel-gfx] [PATCH 2/2] drm/i915/dp: Use current cdclk for DSC Bigjoiner BW check

2023-03-29 Thread Ankit Nautiyal
As per Bspec, Big Joiner BW check is: Output bpp <= PPC * CDCLK frequency * Big joiner interface bits / Pixel clock Currently we always use max_cdclk in the check for both modevalid and compute config steps. During modevalid use max_cdclk_freq for the check. During compute config step use

[Intel-gfx] [PATCH 1/2] drm/i915/dp: Update Bigjoiner interface bits for computing compressed bpp

2023-03-29 Thread Ankit Nautiyal
In Bigjoiner check for DSC, bigjoiner interface bits for DP for DISPLAY > 12 is 36 (Bspec: 49259). Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-03-29 Thread Patchwork
== Series Details == Series: drm/i915: Replace kmap_atomic() with kmap_local_page() URL : https://patchwork.freedesktop.org/series/115769/ State : success == Summary == CI Bug Log - changes from CI_DRM_12931 -> Patchwork_115769v1 Summary

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-03-29 Thread Patchwork
== Series Details == Series: drm/i915: Replace kmap_atomic() with kmap_local_page() URL : https://patchwork.freedesktop.org/series/115769/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately.

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-03-29 Thread Patchwork
== Series Details == Series: drm/i915: Replace kmap_atomic() with kmap_local_page() URL : https://patchwork.freedesktop.org/series/115769/ State : warning == Summary == Error: dim checkpatch failed 9bed0825b968 drm/i915: Use kmap_local_page() in gem/i915_gem_object.c -:39:

Re: [Intel-gfx] [bug report] drm/i915/pmu: Use functions common with sysfs to read actual freq

2023-03-29 Thread Tvrtko Ursulin
Hi Dan, I feared this might happened while reviewing this patch.. I believe it is a false positive, see below: On 29/03/2023 07:24, Dan Carpenter wrote: Hello Ashutosh Dixit, The patch 12d4eb20d9d8: "drm/i915/pmu: Use functions common with sysfs to read actual freq" from Mar 15, 2023,

Re: [Intel-gfx] [PATCH v6 5/8] drm/i915/pxp: Add ARB session creation and cleanup

2023-03-29 Thread Tvrtko Ursulin
On 28/03/2023 18:52, Rodrigo Vivi wrote: On Tue, Mar 28, 2023 at 05:01:36PM +, Teres Alexis, Alan Previn wrote: On Mon, 2023-03-27 at 17:15 +0100, Tvrtko Ursulin wrote: These two: e6177ec586d1 ("drm/i915/huc: stall media submission until HuC is loaded") b76c14c8fb2a ("drm/i915/huc:

[Intel-gfx] [PATCH v6 7/8] drm/i915: track gt pm wakerefs

2023-03-29 Thread Andrzej Hajda
Track every intel_gt_pm_get() until its corresponding release in intel_gt_pm_put() by returning a cookie to the caller for acquire that must be passed by on released. When there is an imbalance, we can see who either tried to free a stale wakeref, or who forgot to free theirs. Signed-off-by:

[Intel-gfx] [PATCH v6 8/8] drm/i915/gt: Hold a wakeref for the active VM

2023-03-29 Thread Andrzej Hajda
From: Chris Wilson There may be a disconnect between the GT used by the engine and the GT used for the VM, requiring us to hold a wakeref on both while the GPU is active with this request. Signed-off-by: Chris Wilson Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/i915/gt/intel_context.h

[Intel-gfx] [PATCH v2 9/9] drm/i915: Use kmap_local_page() in gem/i915_gem_execbuffer.c

2023-03-29 Thread Zhao Liu
From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the calls from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the

[Intel-gfx] [PATCH v2 8/9] drm/i915: Use kmap_local_page() in i915_cmd_parser.c

2023-03-29 Thread Zhao Liu
From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the

[Intel-gfx] [PATCH v6 5/8] drm/i915: Correct type of wakeref variable

2023-03-29 Thread Andrzej Hajda
Wakeref has dedicated type. Assumption it will be int compatible forever is incorrect. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Intel-gfx] [PATCH v6 6/8] drm/i915: Replace custom intel runtime_pm tracker with ref_tracker library

2023-03-29 Thread Andrzej Hajda
Beside reusing existing code, the main advantage of ref_tracker is tracking per instance of wakeref. It allows also to catch double put. On the other side we lose information about the first acquire and the last release, but the advantages outweigh it. Signed-off-by: Andrzej Hajda ---

[Intel-gfx] [PATCH v6 4/8] lib/ref_tracker: remove warnings in case of allocation failure

2023-03-29 Thread Andrzej Hajda
Library can handle allocation failures. To avoid allocation warnings __GFP_NOWARN has been added everywhere. Moreover GFP_ATOMIC has been replaced with GFP_NOWAIT in case of stack allocation on tracker free call. Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti --- lib/ref_tracker.c | 5

[Intel-gfx] [PATCH v2 7/9] drm/i915: Use memcpy_from_page() in gt/uc/intel_uc_fw.c

2023-03-29 Thread Zhao Liu
From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the

[Intel-gfx] [PATCH v6 3/8] lib/ref_tracker: add printing to memory buffer

2023-03-29 Thread Andrzej Hajda
Similar to stack_(depot|trace)_snprint the patch adds helper to printing stats to memory buffer. It will be helpful in case of debugfs. Signed-off-by: Andrzej Hajda --- include/linux/ref_tracker.h | 8 +++ lib/ref_tracker.c | 56 ++--- 2

[Intel-gfx] [PATCH v2 6/9] drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_context.c

2023-03-29 Thread Zhao Liu
From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption. With

[Intel-gfx] [PATCH v6 2/8] lib/ref_tracker: improve printing stats

2023-03-29 Thread Andrzej Hajda
In case the library is tracking busy subsystem, simply printing stack for every active reference will spam log with long, hard to read, redundant stack traces. To improve readabilty following changes have been made: - reports are printed per stack_handle - log is more compact, - added display name

[Intel-gfx] [PATCH v6 1/8] lib/ref_tracker: add unlocked leak print helper

2023-03-29 Thread Andrzej Hajda
To have reliable detection of leaks, caller must be able to check under the same lock both: tracked counter and the leaks. dir.lock is natural candidate for such lock and unlocked print helper can be called with this lock taken. As a bonus we can reuse this helper in ref_tracker_dir_exit.

[Intel-gfx] [PATCH v6 0/8] drm/i915: use ref_tracker library for tracking wakerefs

2023-03-29 Thread Andrzej Hajda
Gently ping for network developers, could you look at ref_tracker patches, as the ref_tracker library was developed for network. This is revived patchset improving ref_tracker library and converting i915 internal tracker to ref_tracker. The old thread ended without consensus about small kernel

[Intel-gfx] [PATCH v2 5/9] drm/i915: Use kmap_local_page() in gem/selftests/i915_gem_coherency.c

2023-03-29 Thread Zhao Liu
From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the

[Intel-gfx] [PATCH v2 4/9] drm/i915: Use kmap_local_page() in gem/selftests/huge_pages.c

2023-03-29 Thread Zhao Liu
From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the

[Intel-gfx] [PATCH v2 3/9] drm/i915: Use kmap_local_page() in gem/i915_gem_shmem.c

2023-03-29 Thread Zhao Liu
From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1]. The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the preemption is disabled for !PREEMPT_RT case, otherwise it only disables

[Intel-gfx] [PATCH v2 2/9] drm/i915: Use memcpy_[from/to]_page() in gem/i915_gem_pyhs.c

2023-03-29 Thread Zhao Liu
From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() + memcpy() to memcpy_[from/to]_page(), which use kmap_local_page() to build local mapping and then do memcpy(). The main difference between atomic

[Intel-gfx] [PATCH v2 1/9] drm/i915: Use kmap_local_page() in gem/i915_gem_object.c

2023-03-29 Thread Zhao Liu
From: Zhao Liu The use of kmap_atomic() is being deprecated in favor of kmap_local_page()[1], and this patch converts the call from kmap_atomic() to kmap_local_page(). The main difference between atomic and local mappings is that local mappings doesn't disable page faults or preemption (the

[Intel-gfx] [PATCH v2 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2023-03-29 Thread Zhao Liu
From: Zhao Liu Hi list, Sorry for a long delay since v1 [1]. This patchset is based on 197b6b6 (Linux 6.3-rc4). Welcome and thanks for your review and comments! # Purpose of this patchset The purpose of this pacthset is to replace all uses of kmap_atomic() in i915 with kmap_local_page()

Re: [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: use ref_tracker library for tracking wakerefs (rev6)

2023-03-29 Thread Andrzej Hajda
On 29.03.2023 01:24, Patchwork wrote: == Series Details == Series: drm/i915: use ref_tracker library for tracking wakerefs (rev6) URL : https://patchwork.freedesktop.org/series/100327/ State : failure == Summary == Error: patch

[Intel-gfx] [bug report] drm/i915/pmu: Use functions common with sysfs to read actual freq

2023-03-29 Thread Dan Carpenter
Hello Ashutosh Dixit, The patch 12d4eb20d9d8: "drm/i915/pmu: Use functions common with sysfs to read actual freq" from Mar 15, 2023, leads to the following Smatch static checker warning: drivers/gpu/drm/i915/gt/intel_rps.c:2110 __read_cagf() error: uninitialized symbol 'freq'.

<    1   2