Re: [Intel-gfx] [RFC 1/8] drm/i915: Skip clflush after GPU writes on Meteorlake

2023-07-27 Thread Yang, Fei
> From: Tvrtko Ursulin > > On Meteorlake CPU cache will not contain stale data after GPU > access since write-invalidate protocol is used, which means > there is no need to flush before potentially transitioning the > buffer to a non-coherent domain. > > Use the opportunity to documet the situatio

[Intel-gfx] ✓ Fi.CI.BAT: success for DSC misc fixes (rev5)

2023-07-27 Thread Patchwork
== Series Details == Series: DSC misc fixes (rev5) URL : https://patchwork.freedesktop.org/series/117662/ State : success == Summary == CI Bug Log - changes from CI_DRM_13435 -> Patchwork_117662v5 Summary --- **SUCCESS** No regres

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for DSC misc fixes (rev5)

2023-07-27 Thread Patchwork
== Series Details == Series: DSC misc fixes (rev5) URL : https://patchwork.freedesktop.org/series/117662/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately.

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

2023-07-27 Thread Nautiyal, Ankit K
On 7/25/2023 4:49 PM, Nautiyal, Ankit K wrote: On 7/25/2023 3:43 PM, Lisovskiy, Stanislav wrote: On Mon, Jul 24, 2023 at 05:49:11PM +0530, Nautiyal, Ankit K wrote: Hi Stan, Thanks for the reviews ans suggestions. Please my response inline: On 7/20/2023 2:59 PM, Lisovskiy, Stanislav wrote:

[Intel-gfx] [PATCH 17/20] drm/i915/dp: Get optimal link config to have best compressed bpp

2023-07-27 Thread Ankit Nautiyal
Currently, we take the max lane, rate and pipe bpp, to get the maximum compressed bpp possible. We then set the output bpp to this value. This patch provides support to have max bpp, min rate and min lanes, that can support the min compressed bpp. v2: -Avoid ending up with compressed bpp, same as

[Intel-gfx] [PATCH 18/20] drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

2023-07-27 Thread Ankit Nautiyal
From: Stanislav Lisovskiy Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp. Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD registe

[Intel-gfx] [PATCH 19/20] drm/i915/dp: Check src/sink compressed bpp limit for edp

2023-07-27 Thread Ankit Nautiyal
Use checks for src and sink limits before computing compressed bpp for eDP. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/d

[Intel-gfx] [PATCH 20/20] drm/i915/dp: Check if force_dsc_output_format is possible

2023-07-27 Thread Ankit Nautiyal
Currently for testing an output format with DSC, we just force the output format, without checking if it can be supported. This also creates an issue where there is a PCON which might need to convert from forced output format to the format to sink format. Signed-off-by: Ankit Nautiyal --- driver

[Intel-gfx] [PATCH 16/20] drm/i915/dp: Separate out function to get compressed bpp with joiner

2023-07-27 Thread Ankit Nautiyal
Pull the code to get joiner constraints on maximum compressed bpp into separate function. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 54 ++--- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_d

[Intel-gfx] [PATCH 15/20] drm/i915/dp: Add DSC BPC/BPP constraints while selecting pipe bpp with DSC

2023-07-27 Thread Ankit Nautiyal
Currently we check if the pipe_bpp selected is >= the min DSC bpc/bpp requirement. We do not check if it is <= the max DSC bpc/bpp requirement. Add checks for max DSC BPC/BPP constraints while computing the pipe_bpp when DSC is in use. v2: Fix the commit message. Signed-off-by: Ankit Nautiyal -

[Intel-gfx] [PATCH 14/20] drm/i915/dp: Separate out functions for edp/DP for computing DSC bpp

2023-07-27 Thread Ankit Nautiyal
Refactor code to separate functions for eDP and DP for computing pipe_bpp/compressed bpp when DSC is involved. This will help to optimize the link configuration for DP later. v2: Fix checkpatch warning. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 191 +++

[Intel-gfx] [PATCH 11/20] drm/i915/dp: Check min bpc DSC limits for dsc_force_bpc also

2023-07-27 Thread Ankit Nautiyal
For DSC the min BPC is 8 for ICL+ and so the min pipe_bpp is 24. Check this condition for cases where bpc is forced by debugfs flag dsc_force_bpc. If the check fails, then WARN and ignore the debugfs flag. For MST case the pipe_bpp is already computed (hardcoded to be 24), and this check is not re

[Intel-gfx] [PATCH 09/20] drm/i915/dp: Avoid forcing DSC BPC for MST case

2023-07-27 Thread Ankit Nautiyal
For MST the bpc is hardcoded to 8, and pipe bpp to 24. So avoid forcing DSC bpc for MST case. v2: Warn and ignore the debug flag than to bail out. (Jani) v3: Fix dbg message to mention forced bpc instead of bpp. v4: Fix checkpatch longline warning. Signed-off-by: Ankit Nautiyal --- drivers/gp

[Intel-gfx] [PATCH 13/20] drm/i915/dp: Rename helper to get DSC max pipe_bpp

2023-07-27 Thread Ankit Nautiyal
The helper intel_dp_dsc_compute_bpp gives the maximum pipe bpp that is allowed with DSC. Rename the this to reflect that it returns max pipe bpp supported with DSC. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 8 drivers/gpu/drm/i915/display/intel_dp.

[Intel-gfx] [PATCH 08/20] drm/display/dp: Fix the DP DSC Receiver cap size

2023-07-27 Thread Ankit Nautiyal
DP DSC Receiver Capabilities are exposed via DPCD 60h-6Fh. Fix the DSC RECEIVER CAP SIZE accordingly. Fixes: ffddc4363c28 ("drm/dp: Add DP DSC DPCD receiver capability size define and missing SHIFT") Cc: Anusha Srivatsa Cc: Manasi Navare Cc: # v5.0+ Signed-off-by: Ankit Nautiyal --- include

[Intel-gfx] [PATCH 12/20] drm/i915/dp: Avoid left shift of DSC output bpp by 4

2023-07-27 Thread Ankit Nautiyal
To make way for fractional bpp support, avoid left shifting the output_bpp by 4 in helper intel_dp_dsc_get_output_bpp. Signed-off-by: Ankit Nautiyal Reviewed-by: Stanislav Lisovskiy --- drivers/gpu/drm/i915/display/intel_dp.c | 10 +++--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 2

[Intel-gfx] [PATCH 10/20] drm/i915/dp: Add functions to get min/max src input bpc with DSC

2023-07-27 Thread Ankit Nautiyal
Separate out functions for getting maximum and minimum input BPC based on platforms, when DSC is used. Signed-off-by: Ankit Nautiyal --- drivers/gpu/drm/i915/display/intel_dp.c | 38 +++-- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/dis

[Intel-gfx] [PATCH 06/20] drm/i915/intel_cdclk: Add vdsc with bigjoiner constraints on min_cdlck

2023-07-27 Thread Ankit Nautiyal
As per Bsepc:49259, Bigjoiner BW check puts restriction on the compressed bpp for a given CDCLK, pixelclock in cases where Bigjoiner + DSC are used. Currently compressed bpp is computed first, and it is ensured that the bpp will work at least with the max CDCLK freq. Since the CDCLK is computed l

[Intel-gfx] [PATCH 07/20] drm/i915/dp: Remove extra logs for printing DSC info

2023-07-27 Thread Ankit Nautiyal
DSC compressed bpp and slice counts are already getting printed at the end of dsc compute config. Remove extra logs. Signed-off-by: Ankit Nautiyal Reviewed-by: Arun R Murthy --- drivers/gpu/drm/i915/display/intel_dp.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/di

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

2023-07-27 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. v3: Follow convention for conditional statement. (Ville) v4: Fix check for display ver. (Ville) v5: Added note for 2 PPC. (Stan) Signed-off-by: Ankit Nautiyal Re

[Intel-gfx] [PATCH 04/20] drm/i915/dp: Use consistent name for link bpp and compressed bpp

2023-07-27 Thread Ankit Nautiyal
Currently there are many places where we use output_bpp for link bpp and compressed bpp. Lets use consistent naming: output_bpp : The intermediate value taking into account the output_format chroma subsampling. compressed_bpp : target bpp for the DSC encoder. link_bpp : final bpp used in the link.

[Intel-gfx] [PATCH 03/20] drm/i915/dp_mst: Use output_format to get the final link bpp

2023-07-27 Thread Ankit Nautiyal
The final link bpp used to calculate the m_n values depend on the output_format. Though the output_format is set to RGB for MST case and the link bpp will be same as the pipe bpp, for the sake of semantics, lets calculate the m_n values with the link bpp, instead of pipe_bpp. Signed-off-by: Ankit

[Intel-gfx] [PATCH 02/20] drm/i915/dp: Move compressed bpp check with 420 format inside the helper

2023-07-27 Thread Ankit Nautiyal
Move the check for limiting compressed bite_per_pixel for 420,422 formats in the helper to compute bits_per_pixel. Signed-off-by: Ankit Nautiyal Reviewed-by: Arun R Murthy --- drivers/gpu/drm/i915/display/intel_dp.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff

[Intel-gfx] [PATCH 01/20] drm/i915/dp: Consider output_format while computing dsc bpp

2023-07-27 Thread Ankit Nautiyal
While using DSC the compressed bpp is computed assuming RGB output format. Consider the output_format and compute the compressed bpp during mode valid and compute config steps. For DP-MST we currently use RGB output format only, so continue using RGB while computing compressed bpp for MST case. v

[Intel-gfx] [PATCH 00/20] DSC misc fixes

2023-07-27 Thread Ankit Nautiyal
This series is an attempt to address multiple issues with DSC, scattered in separate existing series. Patches 1-4 are DSC fixes from series to Handle BPC for HDMI2.1 PCON https://patchwork.freedesktop.org/series/107550/ Patches 5-6 are from series DSC fixes for Bigjoiner: https://patchwork.freede

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gem: Add check for bitmap_zalloc()

2023-07-27 Thread Patchwork
== Series Details == Series: drm/i915/gem: Add check for bitmap_zalloc() URL : https://patchwork.freedesktop.org/series/121491/ State : success == Summary == CI Bug Log - changes from CI_DRM_13435 -> Patchwork_121491v1 Summary --- **

[Intel-gfx] ✓ Fi.CI.IGT: success for Handle dma fences in dirtyfb ioctl (rev3)

2023-07-27 Thread Patchwork
== Series Details == Series: Handle dma fences in dirtyfb ioctl (rev3) URL : https://patchwork.freedesktop.org/series/116620/ State : success == Summary == CI Bug Log - changes from CI_DRM_13432_full -> Patchwork_116620v3_full Summary -

[Intel-gfx] [PATCH] drm/i915/gem: Add check for bitmap_zalloc()

2023-07-27 Thread Jiasheng Jiang
Add the check for the return value of bitmap_zalloc() in order to guarantee the success of the allocation. Fixes: e9b73c67390a ("drm/i915: Reduce memory pressure during shrinker by preallocating swizzle pages") Signed-off-by: Jiasheng Jiang --- drivers/gpu/drm/i915/gem/i915_gem_tiling.c | 5 +++

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/guc/slpc: Restore efficient freq earlier (rev3)

2023-07-27 Thread Patchwork
== Series Details == Series: drm/i915/guc/slpc: Restore efficient freq earlier (rev3) URL : https://patchwork.freedesktop.org/series/121150/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13432_full -> Patchwork_121150v3_full

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Make i915_coherent_map_type GT-centric

2023-07-27 Thread Andi Shyti
Hi Daniele and John, On Thu, Jul 27, 2023 at 12:35:02PM +0100, Tvrtko Ursulin wrote: > > On 26/07/2023 16:53, Jonathan Cavitt wrote: > > Refactor i915_coherent_map_type to be GT-centric rather than > > device-centric. Each GT may require different coherency > > handling due to hardware workaroun

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Avoid circular locking dependency when flush delayed work on gt reset (rev4)

2023-07-27 Thread Patchwork
== Series Details == Series: drm/i915: Avoid circular locking dependency when flush delayed work on gt reset (rev4) URL : https://patchwork.freedesktop.org/series/118898/ State : success == Summary == CI Bug Log - changes from CI_DRM_13434 -> Patchwork_118898v4 ===

[Intel-gfx] ✗ Fi.CI.IGT: failure for Another take on PAT/object cache mode refactoring

2023-07-27 Thread Patchwork
== Series Details == Series: Another take on PAT/object cache mode refactoring URL : https://patchwork.freedesktop.org/series/121450/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13432_full -> Patchwork_121450v1_full Summa

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Avoid circular locking dependency when flush delayed work on gt reset (rev4)

2023-07-27 Thread Patchwork
== Series Details == Series: drm/i915: Avoid circular locking dependency when flush delayed work on gt reset (rev4) URL : https://patchwork.freedesktop.org/series/118898/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Avoid circular locking dependency when flush delayed work on gt reset (rev4)

2023-07-27 Thread Patchwork
== Series Details == Series: drm/i915: Avoid circular locking dependency when flush delayed work on gt reset (rev4) URL : https://patchwork.freedesktop.org/series/118898/ State : warning == Summary == Error: dim checkpatch failed bf7983c87486 drm/i915: Avoid circular locking dependency when f

Re: [Intel-gfx] [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 04:57:53PM -0700, Matt Roper wrote: > On Thu, Jul 27, 2023 at 03:55:00PM +0100, Tvrtko Ursulin wrote: > > From: Tvrtko Ursulin > > > > Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has > > introduced PAT indices to i915 internal APIs, partially rep

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/huc: fix intel_huc.c doc bulleted list format error

2023-07-27 Thread Patchwork
== Series Details == Series: drm/i915/huc: fix intel_huc.c doc bulleted list format error URL : https://patchwork.freedesktop.org/series/121438/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13432_full -> Patchwork_121438v1_full

Re: [Intel-gfx] [RFC 7/8] drm/i915: Lift the user PAT restriction from use_cpu_reloc

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 03:55:03PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Now that i915 understands the caching modes behind PAT indices, we can > refine the check in use_cpu_reloc() to not reject the uncached PAT if it > was set by userspace. > > Instead it can decide based on

Re: [Intel-gfx] [RFC 6/8] drm/i915: Lift the user PAT restriction from gpu_write_needs_clflush

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 03:55:02PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Now that i915 understands the caching modes behind PAT indices, and having > also special cased the Meteorlake snooping fully coherent mode, we can > remove the user PAT check from gpu_write_needs_clflush()

Re: [Intel-gfx] [RFC 5/8] drm/i915: Improve the vm_fault_gtt user PAT index restriction

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 03:55:01PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Now that i915 understands the caching modes behind PAT indices, we can > refine the check in vm_fault_gtt() to not reject the uncached PAT if it > was set by userspace on a snoopable platform. > > Signed-o

Re: [Intel-gfx] [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 03:55:00PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has > introduced PAT indices to i915 internal APIs, partially replacing the > usage of driver internal cache_level, but has also added

Re: [Intel-gfx] [RFC 3/8] drm/i915: Cache PAT index used by the driver

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 03:54:59PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Eliminate a bunch of runtime calls to i915_gem_get_pat_index() by caching > the interesting PAT indices in struct drm_i915_private. They are static > per platfrom so no need to consult a function every time

Re: [Intel-gfx] [RFC 2/8] drm/i915: Split PTE encode between Gen12 and Meteorlake

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 03:54:58PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > No need to run extra instructions which will never trigger on platforms > before Meteorlake. > > Signed-off-by: Tvrtko Ursulin > --- > drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 26 ++

Re: [Intel-gfx] [RFC 1/8] drm/i915: Skip clflush after GPU writes on Meteorlake

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 03:54:57PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > On Meteorlake CPU cache will not contain stale data after GPU access since > write-invalidate protocol is used, which means there is no need to flush > before potentially transitioning the buffer to a non-c

[Intel-gfx] ✓ Fi.CI.IGT: success for MTL Degamma implementation (rev4)

2023-07-27 Thread Patchwork
== Series Details == Series: MTL Degamma implementation (rev4) URL : https://patchwork.freedesktop.org/series/119844/ State : success == Summary == CI Bug Log - changes from CI_DRM_13432_full -> Patchwork_119844v4_full Summary --- **

Re: [Intel-gfx] [PATCH] drm/i915/pxp/mtl: intel_pxp_init_hw needs runtime-pm inside pm-complete

2023-07-27 Thread Ceraolo Spurio, Daniele
On 6/1/2023 8:59 AM, Alan Previn wrote: In the case of failed suspend flow or cases where the kernel does not go into full suspend but goes from suspend_prepare back to resume_complete, we get called for a pm_complete but without runtime_pm guaranteed. Thus, ensure we take the runtime_pm when

[Intel-gfx] ✓ Fi.CI.BAT: success for Handle dma fences in dirtyfb ioctl (rev3)

2023-07-27 Thread Patchwork
== Series Details == Series: Handle dma fences in dirtyfb ioctl (rev3) URL : https://patchwork.freedesktop.org/series/116620/ State : success == Summary == CI Bug Log - changes from CI_DRM_13432 -> Patchwork_116620v3 Summary --- **SU

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Handle dma fences in dirtyfb ioctl (rev3)

2023-07-27 Thread Patchwork
== Series Details == Series: Handle dma fences in dirtyfb ioctl (rev3) URL : https://patchwork.freedesktop.org/series/116620/ 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.BAT: success for drm/i915/guc/slpc: Restore efficient freq earlier (rev3)

2023-07-27 Thread Patchwork
== Series Details == Series: drm/i915/guc/slpc: Restore efficient freq earlier (rev3) URL : https://patchwork.freedesktop.org/series/121150/ State : success == Summary == CI Bug Log - changes from CI_DRM_13432 -> Patchwork_121150v3 Summary

[Intel-gfx] [PATCH v4] drm/i915: Avoid circular locking dependency when flush delayed work on gt reset

2023-07-27 Thread Zhanjun Dong
This attempts to avoid circular locking dependency between flush delayed work and intel_gt_reset. Switched from cancel_delayed_work_sync to cancel_delayed_work, the non-sync version for reset path, it is safe as the worker has the trylock code to handle the lock; Meanwhile keep the sync version

[Intel-gfx] ✓ Fi.CI.BAT: success for Another take on PAT/object cache mode refactoring

2023-07-27 Thread Patchwork
== Series Details == Series: Another take on PAT/object cache mode refactoring URL : https://patchwork.freedesktop.org/series/121450/ State : success == Summary == CI Bug Log - changes from CI_DRM_13432 -> Patchwork_121450v1 Summary ---

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Another take on PAT/object cache mode refactoring

2023-07-27 Thread Patchwork
== Series Details == Series: Another take on PAT/object cache mode refactoring URL : https://patchwork.freedesktop.org/series/121450/ 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 Another take on PAT/object cache mode refactoring

2023-07-27 Thread Patchwork
== Series Details == Series: Another take on PAT/object cache mode refactoring URL : https://patchwork.freedesktop.org/series/121450/ State : warning == Summary == Error: dim checkpatch failed 7ea1d7a9ac31 drm/i915: Skip clflush after GPU writes on Meteorlake 5658be9fc6d2 drm/i915: Split PTE e

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/huc: fix intel_huc.c doc bulleted list format error

2023-07-27 Thread Patchwork
== Series Details == Series: drm/i915/huc: fix intel_huc.c doc bulleted list format error URL : https://patchwork.freedesktop.org/series/121438/ State : success == Summary == CI Bug Log - changes from CI_DRM_13432 -> Patchwork_121438v1 Summ

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/huc: fix intel_huc.c doc bulleted list format error

2023-07-27 Thread Patchwork
== Series Details == Series: drm/i915/huc: fix intel_huc.c doc bulleted list format error URL : https://patchwork.freedesktop.org/series/121438/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2

Re: [Intel-gfx] [PATCH v2 8/9] drm/i915/display: Eliminate IS_METEORLAKE checks

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 03:38:46PM -0300, Lucas De Marchi wrote: > On Mon, Jul 24, 2023 at 05:13:21PM -0700, Matt Roper wrote: > > diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c > > b/drivers/gpu/drm/i915/display/intel_cx0_phy.c > > for the phy checks what I have locally is: > > > ind

Re: [Intel-gfx] [PATCH v2 8/9] drm/i915/display: Eliminate IS_METEORLAKE checks

2023-07-27 Thread Lucas De Marchi
On Mon, Jul 24, 2023 at 05:13:21PM -0700, Matt Roper wrote: diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c for the phy checks what I have locally is: index 1b00ef2c6185..a42b3c4c0ed7 100644 --- a/drivers/gpu/drm/i915/display/intel_cx0

[Intel-gfx] ✓ Fi.CI.BAT: success for MTL Degamma implementation (rev4)

2023-07-27 Thread Patchwork
== Series Details == Series: MTL Degamma implementation (rev4) URL : https://patchwork.freedesktop.org/series/119844/ State : success == Summary == CI Bug Log - changes from CI_DRM_13432 -> Patchwork_119844v4 Summary --- **SUCCESS**

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for MTL Degamma implementation (rev4)

2023-07-27 Thread Patchwork
== Series Details == Series: MTL Degamma implementation (rev4) URL : https://patchwork.freedesktop.org/series/119844/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2

Re: [Intel-gfx] [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-27 Thread Tvrtko Ursulin
On 27/07/2023 12:54, Maarten Lankhorst wrote: Hey, On 2023-07-26 13:41, Tvrtko Ursulin wrote: On 26/07/2023 11:14, Maarten Lankhorst wrote: Hey, On 2023-07-22 00:21, Tejun Heo wrote: On Wed, Jul 12, 2023 at 12:46:04PM +0100, Tvrtko Ursulin wrote:    $ cat drm.memory.stat    card0 region=

Re: [Intel-gfx] [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-27 Thread Tvrtko Ursulin
On 27/07/2023 14:42, Maarten Lankhorst wrote: On 2023-07-26 21:44, Tejun Heo wrote: Hello, On Wed, Jul 26, 2023 at 12:14:24PM +0200, Maarten Lankhorst wrote: So, yeah, if you want to add memory controls, we better think through how the fd ownership migration should work. I've taken a look

Re: [Intel-gfx] [PATCH 0/2] Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout()

2023-07-27 Thread Maira Canal
On 7/18/23 18:44, Nathan Chancellor wrote: Hi all, A proposed update to clang's -Wconstant-logical-operand [1] to warn when the left hand side is a constant as well now triggers with the modulo expression in nsecs_to_jiffies_timeout() when NSEC_PER_SEC is not a multiple of HZ, such as CONFIG_HZ=

[Intel-gfx] ✓ Fi.CI.IGT: success for fdinfo memory stats (rev6)

2023-07-27 Thread Patchwork
== Series Details == Series: fdinfo memory stats (rev6) URL : https://patchwork.freedesktop.org/series/119082/ State : success == Summary == CI Bug Log - changes from CI_DRM_13429_full -> Patchwork_119082v6_full Summary --- **SUCCESS

Re: [Intel-gfx] [PATCH i-g-t 2/3] lib/igt_drm_clients: Store memory info in the client

2023-07-27 Thread Tvrtko Ursulin
Hi, On 27/07/2023 15:10, Kamil Konieczny wrote: Hi Tvrtko, On 2023-07-27 at 10:20:24 +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Define the storage structure and copy over memory data as parsed by the fdinfo helpers. v2: * Fix empty region map entry skip condition. (Kamil, Chris)

[Intel-gfx] [RFC 5/8] drm/i915: Improve the vm_fault_gtt user PAT index restriction

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Now that i915 understands the caching modes behind PAT indices, we can refine the check in vm_fault_gtt() to not reject the uncached PAT if it was set by userspace on a snoopable platform. Signed-off-by: Tvrtko Ursulin Cc: Fei Yang Cc: Matt Roper --- drivers/gpu/drm/i915

[Intel-gfx] [RFC 8/8] drm/i915: Refine the caching check in i915_gem_object_can_bypass_llc

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Now that i915 understands the caching modes behind PAT indices, we can refine the check in i915_gem_object_can_bypass_llc() to stop assuming any user PAT can bypass the shared cache (if there is any). Instead we can use the absence of I915_BO_CACHE_COHERENT_FOR_WRITE as the

[Intel-gfx] [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has introduced PAT indices to i915 internal APIs, partially replacing the usage of driver internal cache_level, but has also added a few sub- optimal design decisions which this patch tries to improve upon

[Intel-gfx] [RFC 7/8] drm/i915: Lift the user PAT restriction from use_cpu_reloc

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Now that i915 understands the caching modes behind PAT indices, we can refine the check in use_cpu_reloc() to not reject the uncached PAT if it was set by userspace. Instead it can decide based on the presence of full coherency which should be functionally equivalent on lega

[Intel-gfx] [RFC 6/8] drm/i915: Lift the user PAT restriction from gpu_write_needs_clflush

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Now that i915 understands the caching modes behind PAT indices, and having also special cased the Meteorlake snooping fully coherent mode, we can remove the user PAT check from gpu_write_needs_clflush(). Signed-off-by: Tvrtko Ursulin Cc: Fei Yang Cc: Matt Roper --- drive

[Intel-gfx] [RFC 3/8] drm/i915: Cache PAT index used by the driver

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Eliminate a bunch of runtime calls to i915_gem_get_pat_index() by caching the interesting PAT indices in struct drm_i915_private. They are static per platfrom so no need to consult a function every time. Signed-off-by: Tvrtko Ursulin Cc: Matt Roper Cc: Fei Yang --- drive

[Intel-gfx] [RFC 2/8] drm/i915: Split PTE encode between Gen12 and Meteorlake

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin No need to run extra instructions which will never trigger on platforms before Meteorlake. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/gen8_pp

[Intel-gfx] [RFC 1/8] drm/i915: Skip clflush after GPU writes on Meteorlake

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin On Meteorlake CPU cache will not contain stale data after GPU access since write-invalidate protocol is used, which means there is no need to flush before potentially transitioning the buffer to a non-coherent domain. Use the opportunity to documet the situation on discrete

[Intel-gfx] [RFC 0/8] Another take on PAT/object cache mode refactoring

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Good news is that I realized series can be split after all. Bad news is that it is still a lot to go through. drm/i915: Skip clflush after GPU writes on Meteorlake This is based on what Fei found out from hardware architects. If we agree the the function this helper shoul

Re: [Intel-gfx] [PATCH i-g-t 1/3] lib/igt_drm_fdinfo: Parse memory usage

2023-07-27 Thread Kamil Konieczny
Hi Tvrtko, On 2023-07-27 at 10:20:23 +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Add parsing and memory storage for the memory usage related fdinfo stats. > > Uses the same approach as the engine utilization code by either auto- > discovering different memory regions, or allowing fo

Re: [Intel-gfx] [PATCH 1/2] drm/v3d: Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout()

2023-07-27 Thread Nathan Chancellor
Hi Maira, On Thu, Jul 27, 2023 at 11:01:27AM -0300, Maira Canal wrote: > Hi Nathan, > > On 7/18/23 18:44, Nathan Chancellor wrote: > > A proposed update to clang's -Wconstant-logical-operand to warn when the > > left hand side is a constant shows the following instance in > > nsecs_to_jiffies_tim

Re: [Intel-gfx] [PATCH i-g-t 2/3] lib/igt_drm_clients: Store memory info in the client

2023-07-27 Thread Kamil Konieczny
Hi Tvrtko, On 2023-07-27 at 10:20:24 +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Define the storage structure and copy over memory data as parsed by the > fdinfo helpers. > > v2: > * Fix empty region map entry skip condition. (Kamil, Chris) > > Signed-off-by: Tvrtko Ursulin > Cc:

Re: [Intel-gfx] [PATCH 1/2] drm/v3d: Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout()

2023-07-27 Thread Maira Canal
Hi Nathan, On 7/18/23 18:44, Nathan Chancellor wrote: A proposed update to clang's -Wconstant-logical-operand to warn when the left hand side is a constant shows the following instance in nsecs_to_jiffies_timeout() when NSEC_PER_SEC is not a multiple of HZ, such as CONFIG_HZ=300: In file inc

Re: [Intel-gfx] [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-27 Thread Maarten Lankhorst
Hey, On 2023-07-26 21:44, Tejun Heo wrote: Hello, On Wed, Jul 26, 2023 at 12:14:24PM +0200, Maarten Lankhorst wrote: So, yeah, if you want to add memory controls, we better think through how the fd ownership migration should work. I've taken a look at the series, since I have been working on

[Intel-gfx] ✓ Fi.CI.BAT: success for fdinfo memory stats (rev6)

2023-07-27 Thread Patchwork
== Series Details == Series: fdinfo memory stats (rev6) URL : https://patchwork.freedesktop.org/series/119082/ State : success == Summary == CI Bug Log - changes from CI_DRM_13429 -> Patchwork_119082v6 Summary --- **SUCCESS** No r

[Intel-gfx] [PATCH] drm/i915/huc: fix intel_huc.c doc bulleted list format error

2023-07-27 Thread David Reaver
Fix the following make htmldocs errors/warnings: ./drivers/gpu/drm/i915/gt/uc/intel_huc.c:29: ERROR: Unexpected indentation. ./drivers/gpu/drm/i915/gt/uc/intel_huc.c:30: WARNING: Block quote ends without a blank line; unexpected unindent. ./drivers/gpu/drm/i915/gt/uc/intel_huc.c:35: WARNING: Bull

Re: [Intel-gfx] [PATCH 0/2] MTL Degamma implementation

2023-07-27 Thread Nautiyal, Ankit K
Thanks for the patches and the reviews, pushed to drm-intel-next. Regards, Ankit On 7/27/2023 5:27 PM, Nautiyal, Ankit K wrote: LGTM. Acked-by: Ankit Nautiyal On 7/25/2023 2:00 PM, Chaitanya Kumar Borah wrote: MTL onwards Degamma LUT/PRE-CSC LUT precision has been increased from 16 bits to

Re: [Intel-gfx] [PULL] drm-misc-next

2023-07-27 Thread Daniel Vetter
On Fri, Jul 21, 2023 at 04:50:44PM +0200, Maxime Ripard wrote: > Hi, > > Here's this week drm-misc-next PR > > Thanks! > Maxime > > The following changes since commit 36672dda2eb715af99e9abbcdc400d46598b691c: > > drm/loongson: Remove a useless check in cursor_plane_atomic_async_check() > (20

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for fdinfo memory stats (rev6)

2023-07-27 Thread Patchwork
== Series Details == Series: fdinfo memory stats (rev6) URL : https://patchwork.freedesktop.org/series/119082/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately.

[Intel-gfx] [PATCH v4 1/2] drm/i915/color: Upscale degamma values for MTL

2023-07-27 Thread Chaitanya Kumar Borah
MTL onwards Degamma LUT/PRE-CSC LUT precision has been increased from 16 bits to 24 bits. Currently, drm framework only supports LUTs up to 16 bit precision. Until a new uapi comes along to support higher bitdepth, upscale the values sent from userland to 24 bit before writing into the HW to contin

Re: [Intel-gfx] [PATCH 1/3] drm/i915/gt: Simplify shmem_create_from_object map_type selection

2023-07-27 Thread Andi Shyti
Hi Jonathan, On Wed, Jul 26, 2023 at 08:53:54AM -0700, Jonathan Cavitt wrote: > The object pin created for shmem_create_from_object is just a > single use mapping with the sole purpose of reading the contents > of the whole object in bulk. And the whole source object is also > even a throw-away.

Re: [Intel-gfx] [PATCH 3/3] drm/i915/gt: Apply workaround 22016122933 correctly

2023-07-27 Thread Andi Shyti
Hi Jonathan, On Wed, Jul 26, 2023 at 08:53:56AM -0700, Jonathan Cavitt wrote: > WA_22016122933 was recently applied to all MeteorLake engines, which is > simultaneously too broad (should only apply to Media engines) and too > specific (should apply to all platforms that use the same media engine >

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Make i915_coherent_map_type GT-centric

2023-07-27 Thread Andi Shyti
Hi Jonathan, On Wed, Jul 26, 2023 at 08:53:55AM -0700, Jonathan Cavitt wrote: > Refactor i915_coherent_map_type to be GT-centric rather than > device-centric. Each GT may require different coherency > handling due to hardware workarounds. > > Since the function now takes a GT instead of the i915

Re: [Intel-gfx] [PATCH v6 3/4] drm: Expand max DRM device number to full MINORBITS

2023-07-27 Thread Christian König
Am 26.07.23 um 20:15 schrieb Simon Ser: On Monday, July 24th, 2023 at 23:14, Michał Winiarski wrote: Having a limit of 64 DRM devices is not good enough for modern world where we have multi-GPU servers, SR-IOV virtual functions and virtual devices used for testing. Let's utilize full minor ra

Re: [Intel-gfx] [PATCH v3 1/2] drm/i915/color: Upscale degamma values for MTL

2023-07-27 Thread Nautiyal, Ankit K
On 7/25/2023 2:00 PM, Chaitanya Kumar Borah wrote: MTL onwards Degamma LUT/PRE-CSC LUT precision has been increased from 16 bits to 24 bits. Currently, drm framework only supports LUTs up to 16 bit precision. Until a new uapi comes along to support higher bitdepth, upscale the values sent from

Re: [Intel-gfx] [PATCH 0/2] MTL Degamma implementation

2023-07-27 Thread Nautiyal, Ankit K
LGTM. Acked-by: Ankit Nautiyal On 7/25/2023 2:00 PM, Chaitanya Kumar Borah wrote: MTL onwards Degamma LUT/PRE-CSC LUT precision has been increased from 16 bits to 24 bits. Currently, drm framework only supports LUTs up to 16 bit precision. Until a new uapi comes along to support higher bitdept

Re: [Intel-gfx] [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-27 Thread Maarten Lankhorst
Hey, On 2023-07-26 13:41, Tvrtko Ursulin wrote: On 26/07/2023 11:14, Maarten Lankhorst wrote: Hey, On 2023-07-22 00:21, Tejun Heo wrote: On Wed, Jul 12, 2023 at 12:46:04PM +0100, Tvrtko Ursulin wrote:    $ cat drm.memory.stat    card0 region=system total=12898304 shared=0 active=0 resident

[Intel-gfx] ✗ Fi.CI.BAT: failure for fdinfo memory stats (rev5)

2023-07-27 Thread Patchwork
== Series Details == Series: fdinfo memory stats (rev5) URL : https://patchwork.freedesktop.org/series/119082/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13428 -> Patchwork_119082v5 Summary --- **FAILURE** Seri

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Make i915_coherent_map_type GT-centric

2023-07-27 Thread Tvrtko Ursulin
On 26/07/2023 16:53, Jonathan Cavitt wrote: Refactor i915_coherent_map_type to be GT-centric rather than device-centric. Each GT may require different coherency handling due to hardware workarounds. Since the function now takes a GT instead of the i915, the function is renamed and moved to th

Re: [Intel-gfx] [PATCH 1/3] drm/i915/gt: Simplify shmem_create_from_object map_type selection

2023-07-27 Thread Tvrtko Ursulin
On 26/07/2023 16:53, Jonathan Cavitt wrote: The object pin created for shmem_create_from_object is just a single use mapping with the sole purpose of reading the contents of the whole object in bulk. And the whole source object is also even a throw-away. Ergo, the additional logic required by

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for fdinfo memory stats (rev5)

2023-07-27 Thread Patchwork
== Series Details == Series: fdinfo memory stats (rev5) URL : https://patchwork.freedesktop.org/series/119082/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately.

[Intel-gfx] [PATCH 4/5] drm/i915: Account ring buffer and context state storage

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account ring buffers and logical context space against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty --- drivers/gpu/drm/i915/gt/intel_context.c | 14 ++ drivers/gpu/drm/i915/i915_drm_client.c | 10 +++

[Intel-gfx] [PATCH 5/5] drm/i915: Implement fdinfo memory stats printing

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories. Obj

[Intel-gfx] [PATCH 2/5] drm/i915: Record which client owns a VM

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin To enable accounting of indirect client memory usage (such as page tables) in the following patch, lets start recording the creator of each PPGTT. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11

[Intel-gfx] [PATCH v6 0/5] fdinfo memory stats

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin A short series to enable fdinfo memory stats for i915. I added tracking of most classes of objects (user objects, page tables, context state, ring buffers) which contribute to client's memory footprint and am accouting their memory use along the similar lines as in Rob's msm

[Intel-gfx] [PATCH 1/5] drm/i915: Add ability for tracking buffer objects per client

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin In order to show per client memory usage lets add some infrastructure which enables tracking buffer objects owned by clients. We add a per client list protected by a new per client lock and to support delayed destruction (post client exit) we make tracked objects hold refere

[Intel-gfx] [PATCH 3/5] drm/i915: Track page table backing store usage

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account page table backing store against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty --- drivers/gpu/drm/i915/gt/intel_gtt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gtt

  1   2   >