RE: [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

Re: [PATCH v10] drm: Add initial ci/ subdirectory

2023-07-27 Thread Daniel Stone
On Thu, 27 Jul 2023 at 22:47, Rob Clark wrote: > > I did run into a bit of a chicken vs. egg problem with testing the "in > > tree" version (compared to earlier versions which kept most of the yml > > and scripts in a separate tree), is that it actually requires this > > commit to exist in the

[PATCH v3 2/4] drm/amdkfd: use vma_is_initial_stack() and vma_is_initial_heap()

2023-07-27 Thread Kefeng Wang
Use the helpers to simplify code. Cc: Felix Kuehling Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Reviewed-by: David Hildenbrand Reviewed-by: Felix Kuehling Signed-off-by: Kefeng Wang --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 5 + 1

[PATCH v3 1/4] mm: factor out VMA stack and heap checks

2023-07-27 Thread Kefeng Wang
Factor out VMA stack and heap checks and name them vma_is_initial_stack() and vma_is_initial_heap() for general use. Cc: Christian Göttsche Cc: David Hildenbrand Reviewed-by: David Hildenbrand Signed-off-by: Kefeng Wang --- fs/proc/task_mmu.c | 24

[PATCH v3 3/4] selinux: use vma_is_initial_stack() and vma_is_initial_heap()

2023-07-27 Thread Kefeng Wang
Use the helpers to simplify code. Cc: Paul Moore Cc: Stephen Smalley Cc: Eric Paris Acked-by: Paul Moore Reviewed-by: David Hildenbrand Signed-off-by: Kefeng Wang --- security/selinux/hooks.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

[PATCH v3 4/4] perf/core: use vma_is_initial_stack() and vma_is_initial_heap()

2023-07-27 Thread Kefeng Wang
Use the helpers to simplify code, also kill unneeded goto cpy_name. Cc: Peter Zijlstra Cc: Arnaldo Carvalho de Melo Reviewed-by: David Hildenbrand Signed-off-by: Kefeng Wang --- kernel/events/core.c | 33 +++-- 1 file changed, 11 insertions(+), 22 deletions(-)

[PATCH v3 0/4] mm: convert to vma_is_initial_heap/stack()

2023-07-27 Thread Kefeng Wang
Add vma_is_initial_stack() and vma_is_initial_heap() helper and use them to simplify code. v2: - add comment for heap helper and remove one more goto cpy_name, per David Hildenbrand - add RB v2: - address comments per David Hildenbrand and Christian Göttsche - fix selinux build Kefeng Wang

Re: [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

[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 ---

[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

[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

[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

[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

[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

[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 ---

[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

[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 ---

[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

[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

[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

[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 |

[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

[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

[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

[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

[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.

[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

[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.

[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:

[git pull] drm fixes for 6.5-rc4

2023-07-27 Thread Dave Airlie
Hi Linus, Regular scheduled fixes, msm and amdgpu leading the way, with some i915 and a single misc fbdev, all seems fine. Dave. drm-fixes-2023-07-28: drm fixes for 6.5-rc4 fbdev: - remove unused function amdgpu: - gfxhub partition fix - Fix error handling in psp_sw_init() - SMU13 fix - DCN

[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

Re: [PATCH] drm/panel: Enable DSC and CMD mode for Visionox VTDR6130 panel

2023-07-27 Thread Jessica Zhang
Please resend under the correct email. Thanks, Jessica Zhang On 7/27/2023 6:12 PM, parellan wrote: From: Paloma Arellano Enable display compression (DSC v1.2) and CMD mode for 1080x2400 Visionox VTDR6130 AMOLED DSI panel. In addition, this patch will set the default to command mode with DSC

[PATCH v2] drm/panel: Enable DSC and CMD mode for Visionox VTDR6130 panel

2023-07-27 Thread Paloma Arellano
Enable display compression (DSC v1.2) and CMD mode for 1080x2400 Visionox VTDR6130 AMOLED DSI panel. In addition, this patch will set the default to command mode with DSC enabled. Note: This patch has only been validated DSC over command mode as DSC over video mode has never been validated for

Re: [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

Re: [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: [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

Re: [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. > >

Re: [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: [PATCH v3 28/49] dm zoned: dynamically allocate the dm-zoned-meta shrinker

2023-07-27 Thread Damien Le Moal
On 7/28/23 07:59, Dave Chinner wrote: > On Thu, Jul 27, 2023 at 07:20:46PM +0900, Damien Le Moal wrote: >> On 7/27/23 17:55, Qi Zheng wrote: >   goto err; >   } >   +    zmd->mblk_shrinker->count_objects = dmz_mblock_shrinker_count; > +   

Re: [PATCH v5] drm/vkms: Add support to 1D gamma LUT

2023-07-27 Thread Maira Canal
Hi Arthur, On 7/8/23 22:38, Arthur Grillo wrote: Support a 1D gamma LUT with interpolation for each color channel on the VKMS driver. Add a check for the LUT length by creating vkms_atomic_check(). Enable VKMS to run the test igt@kms_plane@pixel-format. Tested with: igt@kms_color@gamma

Re: [PATCH] drm/nouveau/nvkm/dp: Add hack to fix DP 1.3+ DPCD issues

2023-07-27 Thread Karol Herbst
On Thu, Jul 27, 2023 at 11:57 PM Lyude Paul wrote: > > On Sun, 2023-07-09 at 01:42 +0200, Karol Herbst wrote: > > On Fri, Jul 7, 2023 at 11:58 PM Lyude Paul wrote: > > > > > > Currently we use the drm_dp_dpcd_read_caps() helper in the DRM side of > > > nouveau in order to read the DPCD of a DP

[PATCH] drm/test: drm_exec: fix memory leak on object prepare

2023-07-27 Thread Danilo Krummrich
drm_exec_prepare_obj() and drm_exec_prepare_array() both reserve dma-fence slots and hence a dma_resv_list without ever freeing it. Make sure to call drm_gem_private_object_fini() for each GEM object passed to drm_exec_prepare_obj()/drm_exec_prepare_array() throughout the test to fix this up.

Re: [PATCH] drm/tests: Alloc drm_device on drm_exec tests

2023-07-27 Thread Maira Canal
Hi Arthur, On 7/27/23 16:22, Arthur Grillo wrote: The drm_exec tests where crashing[0] because of a null dereference. This is caused by a new access of the `driver` attribute of `struct drm_driver` on drm_gem_private_object_init(). Alloc the drm_device to fix that. [0] [15:05:24]

Re: [PATCH v3 28/49] dm zoned: dynamically allocate the dm-zoned-meta shrinker

2023-07-27 Thread Dave Chinner
On Thu, Jul 27, 2023 at 07:20:46PM +0900, Damien Le Moal wrote: > On 7/27/23 17:55, Qi Zheng wrote: > >>>   goto err; > >>>   } > >>>   +    zmd->mblk_shrinker->count_objects = dmz_mblock_shrinker_count; > >>> +    zmd->mblk_shrinker->scan_objects = dmz_mblock_shrinker_scan; > >>> +   

[PATCH v2] drm: fix indirect goto into statement expression UB

2023-07-27 Thread ndesaulniers
Chancellor Reported-by: Naresh Kamboju Signed-off-by: Nick Desaulniers --- Changes in v2: Fix the continue to be outside of the do while - Link to v1: https://lore.kernel.org/r/20230727-amdgpu-v1-1-a95690e75...@google.com --- include/drm/drm_exec.h | 21 + 1 file changed, 5 inse

Re: [PATCH v2 11/13] drm/msm/adreno: Move adreno info to config

2023-07-27 Thread Dmitry Baryshkov
On Fri, 28 Jul 2023 at 00:23, Rob Clark wrote: > > From: Rob Clark > > Let's just stash it in adreno_platform_config rather than looking it up > in N different places. This leaves me with the feeling that we are abusing the dev->platform_data, but we were doing it anyway even before the patch.

Re: [PATCH] drm: fix indirect goto into statement expression UB

2023-07-27 Thread Nick Desaulniers
> \ > #define drm_exec_retry_on_contention(exec) \ > do {\ > if (unlikely(drm_exec_is_contended(exec))) \ > - goto *__drm_exec_retry_ptr;

[PATCH] drm: fix indirect goto into statement expression UB

2023-07-27 Thread ndesaulniers
1eb6a374f4dbcfc1cf007eafea91ab change-id: 20230727-amdgpu-93c0e5302951 Best regards, -- Nick Desaulniers

Re: [PATCH] drm/tests: Alloc drm_device on drm_exec tests

2023-07-27 Thread Danilo Krummrich
On 7/27/23 21:22, Arthur Grillo wrote: The drm_exec tests where crashing[0] because of a null dereference. This is caused by a new access of the `driver` attribute of `struct drm_driver` on drm_gem_private_object_init(). Alloc the drm_device to fix that. [0] [15:05:24] ==

Re: [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

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: [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

Re: [PATCH v2 09/13] drm/msm/adreno: Add adreno family

2023-07-27 Thread Dmitry Baryshkov
On Fri, 28 Jul 2023 at 00:23, Rob Clark wrote: > > From: Rob Clark > > Sometimes it is useful to know the sub-generation (or "family"). And in > any case, this helps us get away from infering the generation from the Nit: inferring > numerical chip-id. > > v2: Fix is_a2xx() typo > >

Re: [PATCH v2 07/13] drm/msm/adreno: Move speedbin mapping to device table

2023-07-27 Thread Dmitry Baryshkov
On Fri, 28 Jul 2023 at 00:23, Rob Clark wrote: > > From: Rob Clark > > This simplifies the code. > > v2: Use a table of structs instead of flat uint32_t[] > > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 171 ++--- >

Re: [PATCH v2 06/13] drm/msm/adreno: Allow SoC specific gpu device table entries

2023-07-27 Thread Dmitry Baryshkov
On Fri, 28 Jul 2023 at 00:23, Rob Clark wrote: > > From: Rob Clark > > There are cases where there are differences due to SoC integration. > Such as cache-coherency support, and (in the next patch) e-fuse to > speedbin mappings. > > Signed-off-by: Rob Clark > --- >

Re: [PATCH v2 05/13] drm/msm/adreno: Use quirk to identify cached-coherent support

2023-07-27 Thread Dmitry Baryshkov
On Fri, 28 Jul 2023 at 00:23, Rob Clark wrote: > > From: Rob Clark > > It is better to explicitly list it. With the move to opaque chip-id's > for future devices, we should avoid trying to infer things like > generation from the numerical value. > > Signed-off-by: Rob Clark > Reviewed-by:

Re: [PATCH v2 02/13] drm/msm/adreno: Remove redundant gmem size param

2023-07-27 Thread Dmitry Baryshkov
On Fri, 28 Jul 2023 at 00:22, Rob Clark wrote: > > From: Rob Clark > > Even in the ocmem case, the allocated ocmem buffer size should match the > requested size. > > v2: Move stray hunk to previous patch, make OCMEM size mismatch an error > condition. > > Signed-off-by: Rob Clark

Re: [Freedreno] [PATCH 06/12] drm/msm/adreno: Allow SoC specific gpu device table entries

2023-07-27 Thread Dmitry Baryshkov
On Fri, 28 Jul 2023 at 00:13, Rob Clark wrote: > > On Wed, Jul 26, 2023 at 3:33 PM Dmitry Baryshkov > wrote: > > > > On Thu, 27 Jul 2023 at 01:04, Rob Clark wrote: > > > > > > On Wed, Jul 26, 2023 at 2:43 PM Dmitry Baryshkov > > > wrote: > > > > > > > > On 26/07/2023 23:11, Rob Clark wrote: >

[PATCH 07/14] drm/sti: add more possible GDP / VID planes entries in sti_plane

2023-07-27 Thread Alain Volmat
In order to address the STiH418, add more entries in sti_plane Signed-off-by: Alain Volmat --- drivers/gpu/drm/sti/sti_plane.c | 8 drivers/gpu/drm/sti/sti_plane.h | 8 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sti/sti_plane.c

[PATCH 02/14] dt-bindings: display: add st, stih418-vtg compatible for sti vtg

2023-07-27 Thread Alain Volmat
Add a new compatible in st,stih4xx.txt in order to support sti vtg on stih418 platforms. Signed-off-by: Alain Volmat --- Documentation/devicetree/bindings/display/st,stih4xx.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 08/14] drm/sti: add more planes supports in sti_mixer

2023-07-27 Thread Alain Volmat
On STiH418, the mixer is able to driver more layers of planes. For this purpose, add those new possible entries and allow it to work in either STiH407 or STiH418 mode. Signed-off-by: Alain Volmat --- drivers/gpu/drm/sti/sti_mixer.c | 66 -

[PATCH 04/14] drm/sti: add STih418 platform support in sti mixer

2023-07-27 Thread Alain Volmat
On the STiH418, since there are more planes attached to the mixer, the bit field for each depth of is now coded using 4 bits instead of 3 bits. Some registers as well differ between STiH407 and STiH418 leading on relying on the st,stih418-compositor compatible to distinguish proper behavior.

[PATCH 10/14] drm/sti: add compositor support for stih418 platform

2023-07-27 Thread Alain Volmat
On the STiH418, a new clock (proc_mixer) must be enabled in order to have the plane mixers properly behaving. Add a new st,stih418-compositor in order to describe the planes/mixers available on this platform. Signed-off-by: Alain Volmat --- drivers/gpu/drm/sti/sti_compositor.c | 26

[PATCH 05/14] drm/sti: add support for stih418 in tvout

2023-07-27 Thread Alain Volmat
The tvout for stih407 and stih418 differ in the connection with the vtg regarding to the hdmi output. In order to cop with that, introduce a new compatible st,stih418-tvout in order to have the hdmi_sync_id being part of the data attached to each compatible. Signed-off-by: Alain Volmat ---

[PATCH 06/14] drm/sti: remove VTG_SYNC_ID_HDMI from sti_vtg.h

2023-07-27 Thread Alain Volmat
Since the synchro signal used for hdmi output and coming from the VTG differs between the stih407 and stih418 platforms, we cannot rely anymore on hardcoded value and involve drivers use compatible to figure out the value. The macro VTG_SYNC_ID_HDMI can thus be removed. Signed-off-by: Alain

[PATCH 00/14] drm/sti: add display support on stih418 family

2023-07-27 Thread Alain Volmat
This serie adds support for graphic display features on the stih418 soc. Major differences compare to the already supported stih407 are - a new HDMI PHY to support 4K resolutions - updated mixer to support the higher number of planes available on the stih418 - updated GDP (graphic

[PATCH 09/14] drm/sti: add support for GDPPLUS / stih418 GDPs

2023-07-27 Thread Alain Volmat
The STiH418 platform embeds two kinds of graphical planes (GDP), so called GDPPLUS which has additional (yet unimplemented) features compared to the GDP, and also the GDP. Register map of GDPPLUS slightly differ from the GDP even if, for common functionalities registers name and behavior are the

[PATCH 01/14] drm/sti: add hdmi tx6g0c28 phy for STi platform

2023-07-27 Thread Alain Volmat
Addition of the HDMI TX PHY driver for use in the STiH418 SoC platform and more especially the 4KOpen (B2264) board. Signed-off-by: Alain Volmat --- drivers/gpu/drm/sti/Makefile | 1 + drivers/gpu/drm/sti/sti_hdmi.c | 4 + drivers/gpu/drm/sti/sti_hdmi_tx6g0c28phy.c

[PATCH 03/14] drm/sti: add support for VTG on the stih418 platform

2023-07-27 Thread Alain Volmat
VTG integrated into the STiH418 differ in the number of outputs available and allocation of each output. Indeed on STiH418, there are 6 outputs (4 on the STiH407/STiH410) and HDMI is connected to the 5th output in case of STiH418 while it is on the 1st output in case of STiH407/STiH410. A new

Re: [PATCH] drm/nouveau/nvkm/dp: Add hack to fix DP 1.3+ DPCD issues

2023-07-27 Thread Lyude Paul
On Sun, 2023-07-09 at 01:42 +0200, Karol Herbst wrote: > On Fri, Jul 7, 2023 at 11:58 PM Lyude Paul wrote: > > > > Currently we use the drm_dp_dpcd_read_caps() helper in the DRM side of > > nouveau in order to read the DPCD of a DP connector, which makes sure we do > > the right thing and also

Re: [PATCH v10] drm: Add initial ci/ subdirectory

2023-07-27 Thread Rob Clark
On Thu, Jul 27, 2023 at 12:49 PM Rob Clark wrote: > > On Thu, Jul 20, 2023 at 8:27 AM Helen Koike wrote: > > > > From: Tomeu Vizoso > > > > Developers can easily execute several tests on different devices > > by just pushing their branch to their fork in a repository hosted > > on

Re: [RFC v1 1/3] mm/mmu_notifier: Add a new notifier for mapping updates (new pages)

2023-07-27 Thread Peter Xu
Hi, Vivek, On Tue, Jul 25, 2023 at 10:24:21PM +, Kasireddy, Vivek wrote: > Hi Hugh, > > > > > On Mon, 24 Jul 2023, Kasireddy, Vivek wrote: > > > Hi Jason, > > > > On Mon, Jul 24, 2023 at 07:54:38AM +, Kasireddy, Vivek wrote: > > > > > > > > > > I'm not at all familiar with the udmabuf

[PATCH v2 13/13] drm/msm/adreno: Switch to chip-id for identifying GPU

2023-07-27 Thread Rob Clark
From: Rob Clark Since the revision becomes an opaque identifier with future GPUs, move away from treating different ranges of bits as having a given meaning. This means that we need to explicitly list different patch revisions in the device table. Signed-off-by: Rob Clark ---

[PATCH v2 11/13] drm/msm/adreno: Move adreno info to config

2023-07-27 Thread Rob Clark
From: Rob Clark Let's just stash it in adreno_platform_config rather than looking it up in N different places. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 15 +++ drivers/gpu/drm/msm/adreno/adreno_device.c | 5 +++--

[PATCH v2 12/13] dt-bindings: drm/msm/gpu: Extend bindings for chip-id

2023-07-27 Thread Rob Clark
From: Rob Clark Upcoming GPUs use an opaque chip-id for identifying the GPU. Signed-off-by: Rob Clark --- Documentation/devicetree/bindings/display/msm/gpu.yaml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/display/msm/gpu.yaml

[PATCH v2 09/13] drm/msm/adreno: Add adreno family

2023-07-27 Thread Rob Clark
From: Rob Clark Sometimes it is useful to know the sub-generation (or "family"). And in any case, this helps us get away from infering the generation from the numerical chip-id. v2: Fix is_a2xx() typo Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_device.c | 31

[PATCH v2 10/13] drm/msm/adreno: Add helper for formating chip-id

2023-07-27 Thread Rob Clark
From: Rob Clark This is used in a few places, including one that is parsed by userspace tools. So let's standardize it a bit better. Signed-off-by: Rob Clark Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/adreno_device.c | 8 +++- drivers/gpu/drm/msm/adreno/adreno_gpu.c

[PATCH v2 07/13] drm/msm/adreno: Move speedbin mapping to device table

2023-07-27 Thread Rob Clark
From: Rob Clark This simplifies the code. v2: Use a table of structs instead of flat uint32_t[] Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 171 ++--- drivers/gpu/drm/msm/adreno/adreno_device.c | 51 ++

[PATCH v2 08/13] drm/msm/adreno: Bring the a630 family together

2023-07-27 Thread Rob Clark
From: Rob Clark All of these are derivatives of a630. Signed-off-by: Rob Clark Reviewed-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 +- drivers/gpu/drm/msm/adreno/adreno_gpu.h | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git

[PATCH v2 06/13] drm/msm/adreno: Allow SoC specific gpu device table entries

2023-07-27 Thread Rob Clark
From: Rob Clark There are cases where there are differences due to SoC integration. Such as cache-coherency support, and (in the next patch) e-fuse to speedbin mappings. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/adreno_device.c | 34 +++---

[PATCH v2 05/13] drm/msm/adreno: Use quirk to identify cached-coherent support

2023-07-27 Thread Rob Clark
From: Rob Clark It is better to explicitly list it. With the move to opaque chip-id's for future devices, we should avoid trying to infer things like generation from the numerical value. Signed-off-by: Rob Clark Reviewed-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/adreno_device.c | 23

[PATCH v2 04/13] drm/msm/adreno: Use quirk identify hw_apriv

2023-07-27 Thread Rob Clark
From: Rob Clark Rather than just open coding a list of gpu-id matches. Signed-off-by: Rob Clark Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 3 +-- drivers/gpu/drm/msm/adreno/adreno_device.c | 4

[PATCH v2 03/13] drm/msm/adreno: Remove redundant revn param

2023-07-27 Thread Rob Clark
From: Rob Clark This just duplicates what is in adreno_info, and can cause confusion if used before it is set. Signed-off-by: Rob Clark Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 -- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 1

[PATCH v2 02/13] drm/msm/adreno: Remove redundant gmem size param

2023-07-27 Thread Rob Clark
From: Rob Clark Even in the ocmem case, the allocated ocmem buffer size should match the requested size. v2: Move stray hunk to previous patch, make OCMEM size mismatch an error condition. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 2 +-

[PATCH v2 01/13] drm/msm/adreno: Remove GPU name

2023-07-27 Thread Rob Clark
From: Rob Clark No real need to have marketing names in the kernel. Signed-off-by: Rob Clark Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/adreno/adreno_device.c | 25 -- drivers/gpu/drm/msm/adreno/adreno_gpu.c| 13 +--

[PATCH v2 00/13] drm/msm/adreno: Move away from legacy revision matching

2023-07-27 Thread Rob Clark
From: Rob Clark Downstream seems to be moving to using the chip_id as simply an opaque identifier, and if we want to avoid headaches with userspace mesa supporting both kgsl and upstream, we should move away from the assumption that certain bits in the chip_id have a specific meaning. v2 adds a

Re: [Freedreno] [PATCH 06/12] drm/msm/adreno: Allow SoC specific gpu device table entries

2023-07-27 Thread Rob Clark
On Wed, Jul 26, 2023 at 3:33 PM Dmitry Baryshkov wrote: > > On Thu, 27 Jul 2023 at 01:04, Rob Clark wrote: > > > > On Wed, Jul 26, 2023 at 2:43 PM Dmitry Baryshkov > > wrote: > > > > > > On 26/07/2023 23:11, Rob Clark wrote: > > > > On Wed, Jul 26, 2023 at 1:00 PM Dmitry Baryshkov > > > >

Re: [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

CPU overhead for drm fdinfo stats

2023-07-27 Thread Alex Deucher
We have a number of customers using these stats, but the issue that keeps coming up is the CPU overhead to gather them, particularly on systems with hundreds of processes using the GPU. Has anyone given any thought to having a single interface to get this information for the entire GPU in one

Re: [PATCH v2 2/2] udmabuf: Add back support for mapping hugetlb pages (v2)

2023-07-27 Thread Peter Xu
On Wed, Jul 19, 2023 at 05:42:54AM +, Kasireddy, Vivek wrote: > > > + } else { > > > + page = > > shmem_read_mapping_page(mapping, pgoff + pgidx); > > > > It may not matter to your users, but the semantics for hugetlb and shmem > > pages is different.

Re: [PATCH 7/7] drm/msm/dpu: move INTF tearing checks to dpu_encoder_phys_cmd_init

2023-07-27 Thread Marijn Suijten
On 2023-07-27 22:22:20, Marijn Suijten wrote: > On 2023-07-27 19:21:04, Dmitry Baryshkov wrote: > > As the INTF is fixed at the encoder creation time, we can move the > > check whether INTF supports tearchck to dpu_encoder_phys_cmd_init(). > > This function can return an error if INTF doesn't have

Re: [PATCH 5/7] drm/msm/dpu: drop DPU_INTF_TE feature flag

2023-07-27 Thread Marijn Suijten
On 2023-07-27 23:16:22, Dmitry Baryshkov wrote: > On 27/07/2023 23:14, Marijn Suijten wrote: > > On 2023-07-27 19:21:02, Dmitry Baryshkov wrote: > >> Replace the only user of the DPU_INTF_TE feature flag with the direct > >> DPU version comparison. > >> > >> Signed-off-by: Dmitry Baryshkov > > >

Re: [PATCH 7/7] drm/msm/dpu: move INTF tearing checks to dpu_encoder_phys_cmd_init

2023-07-27 Thread Marijn Suijten
On 2023-07-27 19:21:04, Dmitry Baryshkov wrote: > As the INTF is fixed at the encoder creation time, we can move the > check whether INTF supports tearchck to dpu_encoder_phys_cmd_init(). > This function can return an error if INTF doesn't have required feature. > Performing this check in

Re: [PATCH 6/7] drm/msm/dpu: drop useless check from dpu_encoder_phys_cmd_te_rd_ptr_irq()

2023-07-27 Thread Marijn Suijten
On 2023-07-27 19:21:03, Dmitry Baryshkov wrote: > The dpu_encoder_phys_cmd_te_rd_ptr_irq() function uses neither hw_intf > nor hw_pp data, so we can drop the corresponding check. Maybe because it would catch "bogus" interrupts, or these blocks are accessed somewhere down the line in the vblank

Re: [PATCH 5/7] drm/msm/dpu: drop DPU_INTF_TE feature flag

2023-07-27 Thread Dmitry Baryshkov
On 27/07/2023 23:14, Marijn Suijten wrote: On 2023-07-27 19:21:02, Dmitry Baryshkov wrote: Replace the only user of the DPU_INTF_TE feature flag with the direct DPU version comparison. Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten ---

Re: [PATCH 5/7] drm/msm/dpu: drop DPU_INTF_TE feature flag

2023-07-27 Thread Marijn Suijten
On 2023-07-27 19:21:02, Dmitry Baryshkov wrote: > Replace the only user of the DPU_INTF_TE feature flag with the direct > DPU version comparison. > > Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 4 ++-- >

[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

Re: [PATCH 4/7] drm/msm/dpu: enable INTF TE operations only when supported by HW

2023-07-27 Thread Marijn Suijten
On 2023-07-27 19:21:01, Dmitry Baryshkov wrote: > The DPU_INTF_TE bit is set for all INTF blocks on DPU >= 5.0, however > only INTF_1 and INTF_2 actually support tearing control. Rather than > trying to fix the DPU_INTF_TE, check for the presense of the I would more exactly expand "fix" to

Re: [PATCH 3/7] drm/msm/dpu: inline _setup_intf_ops()

2023-07-27 Thread Marijn Suijten
On 2023-07-27 19:21:00, Dmitry Baryshkov wrote: > Inline the _setup_intf_ops() function, it makes it easier to handle > different conditions involving INTF configuration. > > Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 47

Re: [PATCH 2/7] drm/msm/dpu: drop the DPU_PINGPONG_TE flag

2023-07-27 Thread Marijn Suijten
On 2023-07-27 19:20:59, Dmitry Baryshkov wrote: > The DPU_PINGPONG_TE flag became unused, we can drop it now. > > Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 +- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 4

  1   2   3   4   >