Re: [PATCH RFC 3/3] arm64: dts: qcom: x1e80100: Add ACD levels for GPU

2024-10-16 Thread Akhil P Oommen
On Wed, Oct 16, 2024 at 09:50:04AM +0200, Krzysztof Kozlowski wrote: > On 15/10/2024 21:35, Akhil P Oommen wrote: > > On Mon, Oct 14, 2024 at 09:40:13AM +0200, Krzysztof Kozlowski wrote: > >> On Sat, Oct 12, 2024 at 01:59:30AM +0530, Akhil P Oommen wrote: > >>> Update GPU node to include acd level

Re: [PATCH RFC 2/3] dt-bindings: opp: Add v2-qcom-adreno vendor bindings

2024-10-16 Thread Akhil P Oommen
On Wed, Oct 16, 2024 at 09:53:58AM +0200, Krzysztof Kozlowski wrote: > On 15/10/2024 21:13, Akhil P Oommen wrote: > > On Mon, Oct 14, 2024 at 09:39:01AM +0200, Krzysztof Kozlowski wrote: > >> On Sat, Oct 12, 2024 at 01:59:29AM +0530, Akhil P Oommen wrote: > >>> Add a new schema which extends opp-v2

[PATCH v3 12/23] drm/msm/dpu: Add RM support for allocating CWB

2024-10-16 Thread Jessica Zhang
Add support for allocating the concurrent writeback mux as part of the WB allocation Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 17 +++-- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 2 ++ 2 files changed, 17 insertions(+), 2

[PATCH v3 16/23] drm/msm/dpu: Reserve resources for CWB

2024-10-16 Thread Jessica Zhang
Add support for RM to reserve dedicated CWB PINGPONGs and CWB muxes For concurrent writeback, even-indexed CWB muxes must be assigned to even-indexed LMs and odd-indexed CWB muxes for odd-indexed LMs. The same even/odd rule applies for dedicated CWB PINGPONGs. Track the CWB muxes in the global st

[PATCH v3 05/23] drm/msm/dpu: move resource allocation to CRTC

2024-10-16 Thread Jessica Zhang
From: Dmitry Baryshkov All resource allocation is centered around the LMs. Then other blocks (except DSCs) are allocated basing on the LMs that was selected, and LM powers up the CRTC rather than the encoder. Moreover if at some point the driver supports encoder cloning, allocating resources fro

[PATCH v3 23/23] drm/msm/dpu: Set possible clones for all encoders

2024-10-16 Thread Jessica Zhang
Set writeback encoders as possible clones for DSI encoders and vice versa. Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 32 + drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 2 ++ drivers/gpu/drm/msm/disp

[PATCH v3 13/23] drm/msm/dpu: Add CWB to msm_display_topology

2024-10-16 Thread Jessica Zhang
Add the cwb_enabled flag to msm_display topology and adjust the toplogy to account for concurrent writeback Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 11 ++- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 10 -- drivers/gpu/drm/msm/msm_drv.h

[PATCH v3 18/23] drm/msm/dpu: Support CWB in dpu_hw_ctl

2024-10-16 Thread Jessica Zhang
The CWB mux has a pending flush bit and *_active register. Add support for configuring them within the dpu_hw_ctl layer. Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c| 13 ++ .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys

[PATCH v3 21/23] drm/msm/dpu: Skip trigger flush and start for CWB

2024-10-16 Thread Jessica Zhang
For concurrent writeback, the real time encoder is responsible for trigger flush and trigger start. Return early for trigger start and trigger flush for the concurrent writeback encoders. Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c

[PATCH v3 22/23] drm/msm/dpu: Reorder encoder kickoff for CWB

2024-10-16 Thread Jessica Zhang
Add a helper that will handle the correct order of the encoder kickoffs for concurrent writeback. For concurrent writeback, the realtime encoder must always kickoff last as it will call the trigger flush and start. This avoids the following scenario where the writeback encoder increments the pend

[PATCH v3 20/23] drm/msm/dpu: Start frame done timer after encoder kickoff

2024-10-16 Thread Jessica Zhang
Starting the frame done timer before the encoder is finished kicking off can lead to unnecessary frame done timeouts when the device is experiencing heavy load (ex. when debug logs are enabled). Thus, create a separate API for starting the encoder frame done timer and call it after the encoder kic

[PATCH v3 19/23] drm/msm/dpu: Adjust writeback phys encoder setup for CWB

2024-10-16 Thread Jessica Zhang
Adjust QoS remapper, OT limit, and CDP parameters to account for concurrent writeback Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/dr

[PATCH v3 08/23] drm/msm/dpu: Specify dedicated CWB pingpong blocks

2024-10-16 Thread Jessica Zhang
Change pingpong index and names to distinguish between general use pingpong blocks and pingpong blocks dedicated for concurrent writeback Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 8 drivers/gpu/drm/msm/dis

[PATCH v3 11/23] drm/msm/dpu: add CWB support to dpu_hw_wb

2024-10-16 Thread Jessica Zhang
From: Esha Bharadwaj Adjust the WB_MUX configuration to account for using dedicated CWB pingpong blocks. Signed-off-by: Esha Bharadwaj Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletio

[PATCH v3 06/23] drm/msm/dpu: fill CRTC resources in dpu_crtc.c

2024-10-16 Thread Jessica Zhang
From: Dmitry Baryshkov Stop poking into CRTC state from dpu_encoder.c, fill CRTC HW resources from dpu_crtc_assign_resources(). Signed-off-by: Dmitry Baryshkov [quic_abhin...@quicinc.com: cleaned up formatting] Signed-off-by: Abhinav Kumar Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm

[PATCH v3 04/23] drm/msm/dpu: switch RM to use crtc_id rather than enc_id for allocation

2024-10-16 Thread Jessica Zhang
From: Dmitry Baryshkov Up to now the driver has been using encoder to allocate hardware resources. Switch it to use CRTC id in preparation for the next step. Signed-off-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 18 +-- drivers/gpu/drm

[PATCH v3 10/23] drm/msm/dpu: Add dpu_hw_cwb abstraction for CWB block

2024-10-16 Thread Jessica Zhang
The CWB mux has its own registers and set of operations. Add dpu_hw_cwb abstraction to allow driver to configure the CWB mux. Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/Makefile| 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cwb.c | 73 +

[PATCH v3 17/23] drm/msm/dpu: Configure CWB in writeback encoder

2024-10-16 Thread Jessica Zhang
Cache the CWB block mask in the DPU virtual encoder and configure CWB according to the CWB block mask within the writeback phys encoder Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c| 75 +- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.

[PATCH v3 09/23] drm/msm/dpu: add devcoredumps for cwb registers

2024-10-16 Thread Jessica Zhang
From: Esha Bharadwaj Implement instance of snapshot function to dump new registers used for cwb Reviewed-by: Dmitry Baryshkov Signed-off-by: Esha Bharadwaj Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 5 + 1 file changed, 5 insertions(+) diff --git a/driver

[PATCH v3 15/23] drm/msm/dpu: Fail atomic_check if CWB and CDM are enabled

2024-10-16 Thread Jessica Zhang
We cannot support both CWB and CDM simultaneously as this would require 2 CDM blocks and currently our hardware only supports 1 CDM block at most. Thus return an error if both CWB and CDM are enabled. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 4 1 file cha

[PATCH v3 01/23] drm: add clone mode check for CRTC

2024-10-16 Thread Jessica Zhang
Add a common helper to check if the given CRTC state is in clone mode. This can be used by drivers to help detect if a CRTC is being shared by multiple encoders Signed-off-by: Jessica Zhang --- NOTE: The appropriate KUnit tests will be added in a separate series --- drivers/gpu/drm/drm_crtc.c |

[PATCH v3 07/23] drm/msm/dpu: Add CWB entry to catalog for SM8650

2024-10-16 Thread Jessica Zhang
From: Esha Bharadwaj Add a new block for concurrent writeback mux to the SM8650 HW catalog Signed-off-by: Esha Bharadwaj Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_10_0_sm8650.h | 21 + drivers/gpu/drm/msm/disp/dpu

[PATCH v3 02/23] drm: Add valid clones check

2024-10-16 Thread Jessica Zhang
Check that all encoders attached to a given CRTC are valid possible_clones of each other. Signed-off-by: Jessica Zhang --- NOTE: Appropriate KUnit tests for this change will be posted in a separate series --- drivers/gpu/drm/drm_atomic_helper.c | 23 +++ 1 file changed, 23 i

[PATCH v3 14/23] drm/msm/dpu: Require modeset if clone mode status changes

2024-10-16 Thread Jessica Zhang
If the clone mode enabled status is changing, a modeset needs to happen so that the resources can be reassigned Signed-off-by: Jessica Zhang --- NOTE: As noted by Sima in the v1 [1], the DPU driver doesn't handle crtc_state->mode_changed correctly. However, fixing this is out of the scope of thi

[PATCH v3 03/23] drm/msm/dpu: get rid of struct dpu_rm_requirements

2024-10-16 Thread Jessica Zhang
From: Dmitry Baryshkov The struct dpu_rm_requirements was used to wrap display topology and hw resources, which meant INTF indices. As of commit ef58e0ad3436 ("drm/msm/dpu: get INTF blocks directly rather than through RM") the hw resources struct was removed, leaving struct dpu_rm_requirements co

[PATCH v3 00/23] drm/msm/dpu: Add Concurrent Writeback Support for DPU 10.x+

2024-10-16 Thread Jessica Zhang
DPU supports a single writeback session running concurrently with primary display when the CWB mux is configured properly. This series enables clone mode for DPU driver and adds support for programming the CWB mux in cases where the hardware has dedicated CWB pingpong blocks. Currently, the CWB har

Re: [v8,09/12] drm/msm/a6xx: Add traces for preemption

2024-10-16 Thread Rob Clark
On Wed, Oct 16, 2024 at 5:13 AM Antonino Maniscalco wrote: > > On 10/8/24 11:10 PM, Kees Bakker wrote: > > Op 03-10-2024 om 18:12 schreef Antonino Maniscalco: > >> Add trace points corresponding to preemption being triggered and being > >> completed for latency measurement purposes. > >> > >> Revi

[pull] drm/msm: drm-msm-fixes-2024-10-16 for v6.12-rc4

2024-10-16 Thread Rob Clark
Hi Dave, A few fixes for v6.12, see description below The following changes since commit 15302579373ed2c8ada629e9e7bcf9569393a48d: drm/msm/dpu: enable writeback on SM6350 (2024-09-02 02:53:44 +0300) are available in the Git repository at: https://gitlab.freedesktop.org/drm/msm.git tags/drm

Re: [v8,09/12] drm/msm/a6xx: Add traces for preemption

2024-10-16 Thread Antonino Maniscalco
On 10/8/24 11:10 PM, Kees Bakker wrote: Op 03-10-2024 om 18:12 schreef Antonino Maniscalco: Add trace points corresponding to preemption being triggered and being completed for latency measurement purposes. Reviewed-by: Akhil P Oommen Tested-by: Rob Clark Tested-by: Neil Armstrong # on SM865

Re: [RFC PATCH 1/2] drm/drm_file: Add display of driver's internal memory size

2024-10-16 Thread Tvrtko Ursulin
On 15/10/2024 20:05, Adrián Larumbe wrote: Hi Tvrtko, On 10.10.2024 10:50, Tvrtko Ursulin wrote: On 09/10/2024 23:55, Adrián Larumbe wrote: Hi Tvrtko, On 04.10.2024 14:41, Tvrtko Ursulin wrote: Hi Adrian, On 03/10/2024 00:45, Adrián Larumbe wrote: Some drivers must allocate a considera

Re: [PATCH RFC 2/3] dt-bindings: opp: Add v2-qcom-adreno vendor bindings

2024-10-16 Thread Krzysztof Kozlowski
On 15/10/2024 21:13, Akhil P Oommen wrote: > On Mon, Oct 14, 2024 at 09:39:01AM +0200, Krzysztof Kozlowski wrote: >> On Sat, Oct 12, 2024 at 01:59:29AM +0530, Akhil P Oommen wrote: >>> Add a new schema which extends opp-v2 to support a new vendor specific >>> property required for Adreno GPUs found

Re: [PATCH RFC 3/3] arm64: dts: qcom: x1e80100: Add ACD levels for GPU

2024-10-16 Thread Krzysztof Kozlowski
On 15/10/2024 21:35, Akhil P Oommen wrote: > On Mon, Oct 14, 2024 at 09:40:13AM +0200, Krzysztof Kozlowski wrote: >> On Sat, Oct 12, 2024 at 01:59:30AM +0530, Akhil P Oommen wrote: >>> Update GPU node to include acd level values. >>> >>> Signed-off-by: Akhil P Oommen >>> --- >>> arch/arm64/boot/d