Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Boris Brezillon
On Thu, 23 Jan 2025 08:33:01 +0100 Philipp Stanner wrote: > On Wed, 2025-01-22 at 18:16 +0100, Boris Brezillon wrote: > > On Wed, 22 Jan 2025 15:08:20 +0100 > > Philipp Stanner wrote: > > > > >  int drm_sched_init(struct drm_gpu_scheduler *sched, > > > -    const struct drm_sched_backend_ops

Re: [PATCH RFC 0/7] drm/display: dp: add new DPCD access functions

2025-01-23 Thread Jani Nikula
On Thu, 23 Jan 2025, Dmitry Baryshkov wrote: > On Fri, Jan 17, 2025 at 10:56:35AM +0200, Dmitry Baryshkov wrote: >> Existing DPCD access functions return an error code or the number of >> bytes being read / write in case of partial access. However a lot of >> drivers either (incorrectly) ignore pa

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Tvrtko Ursulin
On 23/01/2025 09:35, Philipp Stanner wrote: On Thu, 2025-01-23 at 10:29 +0100, Danilo Krummrich wrote: On Thu, Jan 23, 2025 at 08:33:01AM +0100, Philipp Stanner wrote: On Wed, 2025-01-22 at 18:16 +0100, Boris Brezillon wrote: On Wed, 22 Jan 2025 15:08:20 +0100 Philipp Stanner wrote:  int

Re: [PATCH RFC 08/11] drm/msm/dsi: Add support for SM8750

2025-01-23 Thread Krzysztof Kozlowski
On 13/01/2025 13:13, Dmitry Baryshkov wrote: > On Mon, Jan 13, 2025 at 12:02:54PM +0100, Krzysztof Kozlowski wrote: >> On 13/01/2025 09:29, Dmitry Baryshkov wrote: >>> On Fri, Jan 10, 2025 at 01:43:28PM +0100, Krzysztof Kozlowski wrote: On 10/01/2025 10:17, Dmitry Baryshkov wrote: > On Fri

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Danilo Krummrich
On Thu, Jan 23, 2025 at 08:33:01AM +0100, Philipp Stanner wrote: > On Wed, 2025-01-22 at 18:16 +0100, Boris Brezillon wrote: > > On Wed, 22 Jan 2025 15:08:20 +0100 > > Philipp Stanner wrote: > > > > >  int drm_sched_init(struct drm_gpu_scheduler *sched, > > > -    const struct drm_sched_backend_o

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Danilo Krummrich
On Thu, Jan 23, 2025 at 10:35:43AM +0100, Philipp Stanner wrote: > On Thu, 2025-01-23 at 10:29 +0100, Danilo Krummrich wrote: > > On Thu, Jan 23, 2025 at 08:33:01AM +0100, Philipp Stanner wrote: > > > On Wed, 2025-01-22 at 18:16 +0100, Boris Brezillon wrote: > > > > On Wed, 22 Jan 2025 15:08:20 +01

Re: [PATCH v2] drm/msm/dpu: Fall back to a single DSC encoder (1:1:1) on small SoCs

2025-01-23 Thread Luca Weiss
On Wed Jan 22, 2025 at 5:23 PM CET, Marijn Suijten wrote: > Some SoCs such as SC7280 (used in the Fairphone 5) have only a single > DSC "hard slice" encoder. The current hardcoded use of 2:2:1 topology > (2 LM and 2 DSC for a single interface) make it impossible to use > Display Stream Compression

Re: [PATCH RFC 2/7] drm/display: dp: implement new access helpers

2025-01-23 Thread Dmitry Baryshkov
On Thu, Jan 23, 2025 at 12:26:25PM +0200, Jani Nikula wrote: > On Fri, 17 Jan 2025, Dmitry Baryshkov wrote: > > Existing DPCD access functions return an error code or the number of > > bytes being read / write in case of partial access. However a lot of > > drivers either (incorrectly) ignore part

Re: [PATCH RFC 4/7] drm/display: dp-aux-dev: use new DCPD access helpers

2025-01-23 Thread Dmitry Baryshkov
On Thu, Jan 23, 2025 at 12:05:29PM +0200, Jani Nikula wrote: > On Fri, 17 Jan 2025, Dmitry Baryshkov wrote: > > Switch drm_dp_aux_dev.c to use new set of DPCD read / write helpers. > > This might be one of the few places where the old functions and the old > return value was used in a sensible ma

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Maíra Canal
Hi Philipp, On 23/01/25 05:10, Philipp Stanner wrote: On Wed, 2025-01-22 at 19:07 -0300, Maíra Canal wrote: Hi Philipp, On 22/01/25 11:08, Philipp Stanner wrote: drm_sched_init() has a great many parameters and upcoming new functionality for the scheduler might add even more. Generally, the g

Re: [PATCH v3 1/3] iommu/arm-smmu: Fix spurious interrupts with stall-on-fault

2025-01-23 Thread Prakash Gupta
On Wed, Jan 22, 2025 at 03:00:58PM -0500, Connor Abbott wrote: > @@ -125,12 +125,25 @@ static void qcom_adreno_smmu_resume_translation(const > void *cookie, bool termina > struct arm_smmu_domain *smmu_domain = (void *)cookie; > struct arm_smmu_cfg *cfg = &smmu_domain->cfg; > st

Re: [PATCH RFC 08/11] drm/msm/dsi: Add support for SM8750

2025-01-23 Thread Krzysztof Kozlowski
On 23/01/2025 12:42, Dmitry Baryshkov wrote: > On Thu, Jan 23, 2025 at 12:34:28PM +0100, Krzysztof Kozlowski wrote: >> On 13/01/2025 13:13, Dmitry Baryshkov wrote: >>> On Mon, Jan 13, 2025 at 12:02:54PM +0100, Krzysztof Kozlowski wrote: On 13/01/2025 09:29, Dmitry Baryshkov wrote: > On Fri

Re: [PATCH 0/6] drm: enforce rules for drm_atomic_helper_check_modeset()

2025-01-23 Thread Dmitry Baryshkov
On Thu, Jan 09, 2025 at 02:53:16PM +0100, Thomas Zimmermann wrote: > Hi > > > Am 22.12.24 um 06:00 schrieb Dmitry Baryshkov: > > As pointed out by Simona, the drm_atomic_helper_check_modeset() and > > drm_atomic_helper_check() require the former function is rerun if the > > driver's callbacks mod

Re: [PATCH RFC 4/7] drm/display: dp-aux-dev: use new DCPD access helpers

2025-01-23 Thread Jani Nikula
On Fri, 17 Jan 2025, Dmitry Baryshkov wrote: > Switch drm_dp_aux_dev.c to use new set of DPCD read / write helpers. This might be one of the few places where the old functions and the old return value was used in a sensible manner. BR, Jani. > > Signed-off-by: Dmitry Baryshkov > --- > drivers

Re: [PATCH RFC 2/7] drm/display: dp: implement new access helpers

2025-01-23 Thread Jani Nikula
On Fri, 17 Jan 2025, Dmitry Baryshkov wrote: > Existing DPCD access functions return an error code or the number of > bytes being read / write in case of partial access. However a lot of > drivers either (incorrectly) ignore partial access or mishandle error > codes. In other cases this results in

Re: [PATCH RFC 08/11] drm/msm/dsi: Add support for SM8750

2025-01-23 Thread Dmitry Baryshkov
On Thu, Jan 23, 2025 at 12:34:28PM +0100, Krzysztof Kozlowski wrote: > On 13/01/2025 13:13, Dmitry Baryshkov wrote: > > On Mon, Jan 13, 2025 at 12:02:54PM +0100, Krzysztof Kozlowski wrote: > >> On 13/01/2025 09:29, Dmitry Baryshkov wrote: > >>> On Fri, Jan 10, 2025 at 01:43:28PM +0100, Krzysztof Ko

Re: [PATCH v3 1/3] iommu/arm-smmu: Fix spurious interrupts with stall-on-fault

2025-01-23 Thread Robin Murphy
On 2025-01-23 11:10 am, Prakash Gupta wrote: On Wed, Jan 22, 2025 at 03:00:58PM -0500, Connor Abbott wrote: @@ -125,12 +125,25 @@ static void qcom_adreno_smmu_resume_translation(const void *cookie, bool termina struct arm_smmu_domain *smmu_domain = (void *)cookie; struct arm_

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Maíra Canal
Hi Philipp, On 23/01/25 09:13, Philipp Stanner wrote: On Thu, 2025-01-23 at 08:10 -0300, Maíra Canal wrote: Hi Philipp, On 23/01/25 05:10, Philipp Stanner wrote: On Wed, 2025-01-22 at 19:07 -0300, Maíra Canal wrote: Hi Philipp, On 22/01/25 11:08, Philipp Stanner wrote: drm_sched_init() has

Re: (subset) [PATCH 0/6] drm: enforce rules for drm_atomic_helper_check_modeset()

2025-01-23 Thread Dmitry Baryshkov
On Sun, 22 Dec 2024 07:00:40 +0200, Dmitry Baryshkov wrote: > As pointed out by Simona, the drm_atomic_helper_check_modeset() and > drm_atomic_helper_check() require the former function is rerun if the > driver's callbacks modify crtc_state->mode_changed. MSM is one of the > drivers which failed to

[PATCH v2 4/4] drm/msm/dpu: don't set crtc_state->mode_changed from atomic_check()

2025-01-23 Thread Dmitry Baryshkov
The MSM driver uses drm_atomic_helper_check() which mandates that none of the atomic_check() callbacks toggles crtc_state->mode_changed. Perform corresponding check before calling the drm_atomic_helper_check() function. Fixes: 8b45a26f2ba9 ("drm/msm/dpu: reserve cdm blocks for writeback in case of

[PATCH v2 2/4] drm/msm/dpu: move needs_cdm setting to dpu_encoder_get_topology()

2025-01-23 Thread Dmitry Baryshkov
As a preparation for calling dpu_encoder_get_topology() from different places, move the code setting topology->needs_cdm to that function (instead of patching topology separately). Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 41 ++

[PATCH v2 1/4] drm/msm/dpu: don't use active in atomic_check()

2025-01-23 Thread Dmitry Baryshkov
The driver isn't supposed to consult crtc_state->active/active_check for resource allocation. Instead all resources should be allocated if crtc_state->enabled is set. Stop consulting active / active_changed in order to determine whether the hardware resources should be (re)allocated. Fixes: ccc862

[PATCH v2 0/4] drm/msm/dpu: follow rules for drm_atomic_helper_check_modeset()

2025-01-23 Thread Dmitry Baryshkov
As pointed out by Simona, the drm_atomic_helper_check_modeset() and drm_atomic_helper_check() require the former function is rerun if the driver's callbacks modify crtc_state->mode_changed. MSM is one of the drivers which failed to follow this requirement. Rework the MSM / DPU driver to follow the

[PATCH v2 3/4] drm/msm/dpu: simplify dpu_encoder_get_topology() interface

2025-01-23 Thread Dmitry Baryshkov
As a preparation for calling dpu_encoder_get_topology() from different code paths, simplify its calling interface, obtaining some data pointers internally instead passing them via arguments. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Philipp Stanner
On Thu, 2025-01-23 at 09:10 +0100, Philipp Stanner wrote: > On Wed, 2025-01-22 at 19:07 -0300, Maíra Canal wrote: > > Hi Philipp, > > > > On 22/01/25 11:08, Philipp Stanner wrote: > > > drm_sched_init() has a great many parameters and upcoming new > > > functionality for the scheduler might add ev

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Philipp Stanner
On Wed, 2025-01-22 at 18:16 +0100, Boris Brezillon wrote: > On Wed, 22 Jan 2025 15:08:20 +0100 > Philipp Stanner wrote: > > >  int drm_sched_init(struct drm_gpu_scheduler *sched, > > -    const struct drm_sched_backend_ops *ops, > > -    struct workqueue_struct *submit_wq, > > -    u32 num_rqs, u

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Philipp Stanner
On Wed, 2025-01-22 at 16:06 +0100, Christian König wrote: > Am 22.01.25 um 15:48 schrieb Philipp Stanner: > > On Wed, 2025-01-22 at 15:34 +0100, Christian König wrote: > > > Am 22.01.25 um 15:08 schrieb Philipp Stanner: > > > > drm_sched_init() has a great many parameters and upcoming new > > > > f

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Philipp Stanner
On Wed, 2025-01-22 at 15:34 +0100, Christian König wrote: > Am 22.01.25 um 15:08 schrieb Philipp Stanner: > > drm_sched_init() has a great many parameters and upcoming new > > functionality for the scheduler might add even more. Generally, the > > great number of parameters reduces readability and

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Philipp Stanner
On Thu, 2025-01-23 at 08:10 -0300, Maíra Canal wrote: > Hi Philipp, > > On 23/01/25 05:10, Philipp Stanner wrote: > > On Wed, 2025-01-22 at 19:07 -0300, Maíra Canal wrote: > > > Hi Philipp, > > > > > > On 22/01/25 11:08, Philipp Stanner wrote: > > > > drm_sched_init() has a great many parameters

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Philipp Stanner
On Wed, 2025-01-22 at 19:07 -0300, Maíra Canal wrote: > Hi Philipp, > > On 22/01/25 11:08, Philipp Stanner wrote: > > drm_sched_init() has a great many parameters and upcoming new > > functionality for the scheduler might add even more. Generally, the > > great number of parameters reduces readabi

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Philipp Stanner
On Wed, 2025-01-22 at 20:37 -0800, Matthew Brost wrote: > On Wed, Jan 22, 2025 at 06:04:58PM +0100, Boris Brezillon wrote: > > On Wed, 22 Jan 2025 16:14:59 + > > Tvrtko Ursulin wrote: > > > > > On 22/01/2025 15:51, Boris Brezillon wrote: > > > > On Wed, 22 Jan 2025 15:08:20 +0100 > > > > Phil

Re: [PATCH] drm/sched: Use struct for drm_sched_init() params

2025-01-23 Thread Philipp Stanner
On Thu, 2025-01-23 at 10:29 +0100, Danilo Krummrich wrote: > On Thu, Jan 23, 2025 at 08:33:01AM +0100, Philipp Stanner wrote: > > On Wed, 2025-01-22 at 18:16 +0100, Boris Brezillon wrote: > > > On Wed, 22 Jan 2025 15:08:20 +0100 > > > Philipp Stanner wrote: > > > > > > >  int drm_sched_init(struc

Re: [PATCH v3 1/3] iommu/arm-smmu: Fix spurious interrupts with stall-on-fault

2025-01-23 Thread Prakash Gupta
On Thu, Jan 23, 2025 at 09:00:17AM -0500, Connor Abbott wrote: > On Thu, Jan 23, 2025 at 6:10 AM Prakash Gupta wrote: > > > > On Wed, Jan 22, 2025 at 03:00:58PM -0500, Connor Abbott wrote: > > > > > + /* > > > + * On some implementations FSR.SS asserts a context fault > > > + * inter

Re: [PATCH v3 1/3] iommu/arm-smmu: Fix spurious interrupts with stall-on-fault

2025-01-23 Thread Connor Abbott
On Thu, Jan 23, 2025 at 2:26 PM Prakash Gupta wrote: > > On Thu, Jan 23, 2025 at 09:00:17AM -0500, Connor Abbott wrote: > > On Thu, Jan 23, 2025 at 6:10 AM Prakash Gupta > > wrote: > > > > > > On Wed, Jan 22, 2025 at 03:00:58PM -0500, Connor Abbott wrote: > > > > > > > + /* > > > > + *

Re: [PATCH v3 1/3] iommu/arm-smmu: Fix spurious interrupts with stall-on-fault

2025-01-23 Thread Prakash Gupta
On Thu, Jan 23, 2025 at 11:51:27AM +, Robin Murphy wrote: > On 2025-01-23 11:10 am, Prakash Gupta wrote: > > On Wed, Jan 22, 2025 at 03:00:58PM -0500, Connor Abbott wrote: > > > + /* > > > + * The SMMUv2 architecture specification says that if stall-on-fault is > > > + * enabled the correct s

Re: [PATCH v3 1/3] iommu/arm-smmu: Fix spurious interrupts with stall-on-fault

2025-01-23 Thread Connor Abbott
On Thu, Jan 23, 2025 at 12:35 PM Prakash Gupta wrote: > > On Thu, Jan 23, 2025 at 11:51:27AM +, Robin Murphy wrote: > > On 2025-01-23 11:10 am, Prakash Gupta wrote: > > > On Wed, Jan 22, 2025 at 03:00:58PM -0500, Connor Abbott wrote: > > > > + /* > > > > + * The SMMUv2 architecture specificat

Re: [PATCH v3 1/3] iommu/arm-smmu: Fix spurious interrupts with stall-on-fault

2025-01-23 Thread Connor Abbott
On Thu, Jan 23, 2025 at 6:10 AM Prakash Gupta wrote: > > On Wed, Jan 22, 2025 at 03:00:58PM -0500, Connor Abbott wrote: > > > @@ -125,12 +125,25 @@ static void qcom_adreno_smmu_resume_translation(const > > void *cookie, bool termina > > struct arm_smmu_domain *smmu_domain = (void *)cookie;

Re: [PATCH v5 00/15] drm/msm/dpu: Support quad pipe with dual-DSI

2025-01-23 Thread Jessica Zhang
On 1/17/2025 8:00 AM, Jun Nie wrote: 2 or more SSPPs and dual-DSI interface are need for super wide panel. And 4 DSC are preferred for power optimal in this case due to width limitation of SSPP and MDP clock rate constrain. This patch set extends number of pipes to 4 and revise related mixer b

Re: [PATCH v3 1/3] iommu/arm-smmu: Fix spurious interrupts with stall-on-fault

2025-01-23 Thread Connor Abbott
On Thu, Jan 23, 2025 at 2:26 PM Prakash Gupta wrote: > > On Thu, Jan 23, 2025 at 09:00:17AM -0500, Connor Abbott wrote: > > On Thu, Jan 23, 2025 at 6:10 AM Prakash Gupta > > wrote: > > > > > > On Wed, Jan 22, 2025 at 03:00:58PM -0500, Connor Abbott wrote: > > > > > > > + /* > > > > + *

Re: [PATCH 18/35] drm/msm/dpu: get rid of DPU_PINGPONG_DSC

2025-01-23 Thread Dmitry Baryshkov
On Thu, Jan 23, 2025 at 01:41:14PM -0800, Abhinav Kumar wrote: > > > On 1/23/2025 1:32 PM, Abhinav Kumar wrote: > > > > > > On 12/13/2024 2:14 PM, Dmitry Baryshkov wrote: > > > Continue migration to the MDSS-revision based checks and replace > > > DPU_PINGPONG_DSC feature bit with the core_majo

Re: [PATCH 18/35] drm/msm/dpu: get rid of DPU_PINGPONG_DSC

2025-01-23 Thread Abhinav Kumar
On 1/23/2025 1:32 PM, Abhinav Kumar wrote: On 12/13/2024 2:14 PM, Dmitry Baryshkov wrote: Continue migration to the MDSS-revision based checks and replace DPU_PINGPONG_DSC feature bit with the core_major_ver < 7 check. Signed-off-by: Dmitry Baryshkov ---   drivers/gpu/drm/msm/disp/dpu1/ca

Re: [PATCH 18/35] drm/msm/dpu: get rid of DPU_PINGPONG_DSC

2025-01-23 Thread Abhinav Kumar
On 12/13/2024 2:14 PM, Dmitry Baryshkov wrote: Continue migration to the MDSS-revision based checks and replace DPU_PINGPONG_DSC feature bit with the core_major_ver < 7 check. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_1_14_msm8937.h | 2 -- drivers/gpu

Re: [PATCH v2] drm/msm/dpu: Fall back to a single DSC encoder (1:1:1) on small SoCs

2025-01-23 Thread Jessica Zhang
On 1/22/2025 8:23 AM, Marijn Suijten wrote: Some SoCs such as SC7280 (used in the Fairphone 5) have only a single DSC "hard slice" encoder. The current hardcoded use of 2:2:1 topology (2 LM and 2 DSC for a single interface) make it impossible to use Display Stream Compression panels with main