Re: [Freedreno] [PATCH v1 1/2] drm/msm/dp: enable HDP plugin/unplugged interrupts to hpd_enable/disable

2023-05-11 Thread Dmitry Baryshkov
On Fri, 12 May 2023 at 03:16, Kuogee Hsieh wrote: > > > On 5/11/2023 8:57 AM, Dmitry Baryshkov wrote: > > On 11/05/2023 18:53, Bjorn Andersson wrote: > >> On Thu, May 11, 2023 at 07:24:46AM +0300, Dmitry Baryshkov wrote: > >>> On Wed, 10 May 2023 at 23:31, Kuogee Hsieh > >>> wrote: > >

Re: [Freedreno] [PATCH v1 1/2] drm/msm/dp: enable HDP plugin/unplugged interrupts to hpd_enable/disable

2023-05-11 Thread Kuogee Hsieh
On 5/11/2023 8:57 AM, Dmitry Baryshkov wrote: On 11/05/2023 18:53, Bjorn Andersson wrote: On Thu, May 11, 2023 at 07:24:46AM +0300, Dmitry Baryshkov wrote: On Wed, 10 May 2023 at 23:31, Kuogee Hsieh wrote: The internal_hpd flag was introduced to handle external DP HPD derived from GPIO pi

Re: [Freedreno] [PATCH v7 2/8] drm/display/dsc: add helper to set semi-const parameters

2023-05-11 Thread Marijn Suijten
On 2023-05-11 09:22:47, Dmitry Baryshkov wrote: > On 11/05/2023 09:18, Marijn Suijten wrote: > > On 2023-05-11 07:26:28, Dmitry Baryshkov wrote: > >> On 11/05/2023 01:35, Jessica Zhang wrote: > >>> > >>> > >>> On 5/9/2023 11:29 PM, Marijn Suijten wrote: > On 2023-05-09 15:06:48, Jessica Zhang

Re: [Freedreno] [PATCH v7 4/8] drm/msm: Add MSM-specific DSC helper methods

2023-05-11 Thread Marijn Suijten
On 2023-05-11 13:05:15, Abhinav Kumar wrote: > > Don't think the DP series alone should point that out, as it heavily > > depends on the relation between slice size and bpp parameters, and > > whether those end up with a fractional part or not (are you able to test > > and confirm all those combin

Re: [Freedreno] [PATCH v7 4/8] drm/msm: Add MSM-specific DSC helper methods

2023-05-11 Thread Abhinav Kumar
On 5/10/2023 11:15 PM, Marijn Suijten wrote: On 2023-05-10 14:03:14, Jessica Zhang wrote: On 5/9/2023 11:33 PM, Marijn Suijten wrote: On 2023-05-09 15:06:50, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Reviewed-by: D

Re: [Freedreno] [PATCH v7 4/8] drm/msm: Add MSM-specific DSC helper methods

2023-05-11 Thread Abhinav Kumar
On 5/10/2023 11:28 PM, Dmitry Baryshkov wrote: On 11/05/2023 00:03, Jessica Zhang wrote: On 5/9/2023 11:33 PM, Marijn Suijten wrote: On 2023-05-09 15:06:50, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Reviewed-by: Dm

Re: [Freedreno] [PATCH v1 1/2] drm/msm/dp: enable HDP plugin/unplugged interrupts to hpd_enable/disable

2023-05-11 Thread Stephen Boyd
Quoting Bjorn Andersson (2023-05-11 08:44:16) > On Wed, May 10, 2023 at 05:39:07PM -0700, Abhinav Kumar wrote: > > > > > > On 5/10/2023 4:55 PM, Stephen Boyd wrote: > > > Quoting Kuogee Hsieh (2023-05-10 13:31:04) > > > > The internal_hpd flag was introduced to handle external DP HPD derived > > >

[Freedreno] [PATCH v7 5/8] drm/msm/dpu: add support for DSC encoder v1.2 engine

2023-05-11 Thread Kuogee Hsieh
Add support for DSC 1.2 by providing the necessary hooks to program the DPU DSC 1.2 encoder. Changes in v3: -- fixed kernel test rebot report that "__iomem *off" is declared but not used at dpu_hw_dsc_config_1_2() -- unrolling thresh loops Changes in v4: -- delete DPU_DSC_HW_REV_1_1 -- delete

[Freedreno] [PATCH v7 6/8] drm/msm/dpu: separate DSC flush update out of interface

2023-05-11 Thread Kuogee Hsieh
Current DSC flush update is piggyback inside dpu_hw_ctl_intf_cfg_v1(). This patch separates DSC flush away from dpu_hw_ctl_intf_cfg_v1() by adding dpu_hw_ctl_update_pending_flush_dsc_v1() to handle both per DSC engine and DSC flush bits at same time to make it consistent with the location of flush

[Freedreno] [PATCH v7 8/8] drm/msm/dpu: tear down DSC data path when DSC disabled

2023-05-11 Thread Kuogee Hsieh
Unset DSC_ACTIVE bit at dpu_hw_ctl_reset_intf_cfg_v1(), dpu_encoder_unprep_dsc() and dpu_encoder_dsc_pipe_clr() functions to tear down DSC data path if DSC data path was setup previous. Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4

[Freedreno] [PATCH v7 7/8] drm/msm/dpu: add DSC 1.2 hw blocks for relevant chipsets

2023-05-11 Thread Kuogee Hsieh
From: Abhinav Kumar Add DSC 1.2 hardware blocks to the catalog with necessary sub-block and feature flag information. Each display compression engine (DCE) contains dual hard slice DSC encoders so both share same base address but with its own different sub block address. changes in v4: -- delet

[Freedreno] [PATCH v7 2/8] drm/msm/dpu: add DPU_PINGPONG_DSC feature bit for DPU < 7.0.0

2023-05-11 Thread Kuogee Hsieh
DPU < 7.0.0 requires the PINGPONG block to be involved during DSC setting up. Since DPU >= 7.0.0, enabling and starting the DSC encoder engine was moved to INTF with the help of the flush mechanism. Add a DPU_PINGPONG_DSC feature bit to restrict the availability of dpu_hw_pp_setup_dsc() and dpu_hw_

[Freedreno] [PATCH v7 4/8] drm/msm/dpu: Introduce PINGPONG_NONE to disconnect DSC from PINGPONG

2023-05-11 Thread Kuogee Hsieh
Disabling the crossbar mux between DSC and PINGPONG currently requires a bogus enum dpu_pingpong value to be passed when calling dsc_bind_pingpong_blk() with enable=false, even though the register value written is independent of the current PINGPONG block. Replace that `bool enable` parameter with

[Freedreno] [PATCH v7 3/8] drm/msm/dpu: test DPU_PINGPONG_DSC bit before assign DSC ops to PINGPONG

2023-05-11 Thread Kuogee Hsieh
DPU < 7.0.0 has DPU_PINGPONG_DSC feature bit set to indicate it requires both dpu_hw_pp_setup_dsc() and dpu_hw_pp_dsc_{enable,disable}() to be executed to complete DSC configuration if DSC hardware block is present. Hence test DPU_PINGPONG_DSC feature bit and assign DSC related functions to the ops

[Freedreno] [PATCH v7 1/8] drm/msm/dpu: add dsc blocks for remaining chipsets in catalog

2023-05-11 Thread Kuogee Hsieh
From: Abhinav Kumar There are some platforms has DSC blocks but it is not declared at catalog. For completeness, this patch adds DSC blocks for platforms which missed them. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h |

[Freedreno] [PATCH v7 0/8] add DSC 1.2 dpu supports

2023-05-11 Thread Kuogee Hsieh
This series adds the DPU side changes to support DSC 1.2 encoder. This was validated with both DSI DSC 1.2 panel and DP DSC 1.2 monitor. The DSI and DP parts will be pushed later on top of this change. This seriel is rebase on [1], [2] and catalog fixes from rev-4 of [3]. [1]: https://patchwork.fr

Re: [Freedreno] [PATCH v6 5/8] drm/msm/dpu: add support for DSC encoder v1.2 engine

2023-05-11 Thread Dmitry Baryshkov
On 11/05/2023 20:00, Kuogee Hsieh wrote: On 5/10/2023 9:52 PM, Dmitry Baryshkov wrote: On 11/05/2023 01:07, Kuogee Hsieh wrote: Add support for DSC 1.2 by providing the necessary hooks to program the DPU DSC 1.2 encoder. Changes in v3: -- fixed kernel test rebot report that "__iomem *off" is

Re: [Freedreno] [PATCH v6 5/8] drm/msm/dpu: add support for DSC encoder v1.2 engine

2023-05-11 Thread Kuogee Hsieh
On 5/10/2023 9:52 PM, Dmitry Baryshkov wrote: On 11/05/2023 01:07, Kuogee Hsieh wrote: Add support for DSC 1.2 by providing the necessary hooks to program the DPU DSC 1.2 encoder. Changes in v3: -- fixed kernel test rebot report that "__iomem *off" is declared but not     used at dpu_hw_dsc

Re: [Freedreno] [PATCH v1 0/2] enable HDP plugin/unplugged interrupts to hpd_enable/disable

2023-05-11 Thread Dmitry Baryshkov
On 10/05/2023 23:31, Kuogee Hsieh wrote: There is bug report on exteranl DP display does not work. This patch add below two patches to fix the problem. 1) enable HDP plugin/unplugged interrupts to hpd_enable/disable 2) add mutex to protect internal_hpd against race condition between different th

Re: [Freedreno] [PATCH v1 1/2] drm/msm/dp: enable HDP plugin/unplugged interrupts to hpd_enable/disable

2023-05-11 Thread Dmitry Baryshkov
On 11/05/2023 18:53, Bjorn Andersson wrote: On Thu, May 11, 2023 at 07:24:46AM +0300, Dmitry Baryshkov wrote: On Wed, 10 May 2023 at 23:31, Kuogee Hsieh wrote: The internal_hpd flag was introduced to handle external DP HPD derived from GPIO pinmuxed into DP controller. HPD plug/unplug interru

Re: [Freedreno] [PATCH v1 1/2] drm/msm/dp: enable HDP plugin/unplugged interrupts to hpd_enable/disable

2023-05-11 Thread Bjorn Andersson
On Thu, May 11, 2023 at 07:24:46AM +0300, Dmitry Baryshkov wrote: > On Wed, 10 May 2023 at 23:31, Kuogee Hsieh wrote: > > > > The internal_hpd flag was introduced to handle external DP HPD derived from > > GPIO > > pinmuxed into DP controller. HPD plug/unplug interrupts cannot be enabled > > unt

Re: [Freedreno] [PATCH v1 1/2] drm/msm/dp: enable HDP plugin/unplugged interrupts to hpd_enable/disable

2023-05-11 Thread Bjorn Andersson
On Wed, May 10, 2023 at 05:39:07PM -0700, Abhinav Kumar wrote: > > > On 5/10/2023 4:55 PM, Stephen Boyd wrote: > > Quoting Kuogee Hsieh (2023-05-10 13:31:04) > > > The internal_hpd flag was introduced to handle external DP HPD derived > > > from GPIO > > > pinmuxed into DP controller. > > > > W

Re: [Freedreno] [PATCH v1 1/2] drm/msm/dp: enable HDP plugin/unplugged interrupts to hpd_enable/disable

2023-05-11 Thread Bjorn Andersson
On Wed, May 10, 2023 at 04:55:04PM -0700, Stephen Boyd wrote: > Quoting Kuogee Hsieh (2023-05-10 13:31:04) > > The internal_hpd flag was introduced to handle external DP HPD derived from > > GPIO > > pinmuxed into DP controller. > > Was it? It looks more like it was done to differentiate between

[Freedreno] [PATCH v3 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-11 Thread Rob Clark
From: Rob Clark When the special handling of qcom,adreno-smmu was moved into qcom_smmu_create(), it was overlooked that we didn't have all the required entries in qcom_smmu_impl_of_match. So we stopped getting adreno_smmu_priv on sc7180, breaking per-process pgtables. Fixes: 30b912a03d91 ("iomm

[Freedreno] [PATCH v3 2/2] drm/msm: Be more shouty if per-process pgtables aren't working

2023-05-11 Thread Rob Clark
From: Rob Clark Otherwise it is not always obvious if a dt or iommu change is causing us to fall back to global pgtable. Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/msm_iommu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/driv

Re: [Freedreno] [PATCH 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-11 Thread Rob Clark
On Thu, May 11, 2023 at 7:51 AM Dmitry Baryshkov wrote: > > On Tue, 9 May 2023 at 19:37, Rob Clark wrote: > > > > From: Rob Clark > > > > When the special handling of qcom,adreno-smmu was moved into > > qcom_smmu_create(), it was overlooked that we didn't have all the > > required entries in qco

Re: [Freedreno] [PATCH 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-11 Thread Dmitry Baryshkov
On Tue, 9 May 2023 at 19:37, Rob Clark wrote: > > From: Rob Clark > > When the special handling of qcom,adreno-smmu was moved into > qcom_smmu_create(), it was overlooked that we didn't have all the > required entries in qcom_smmu_impl_of_match. So we stopped getting > adreno_smmu_priv on sc7180

Re: [Freedreno] [PATCH 1/2] iommu/arm-smmu-qcom: Fix missing adreno_smmu's

2023-05-11 Thread Rob Clark
On Tue, May 9, 2023 at 9:37 AM Rob Clark wrote: > > From: Rob Clark > > When the special handling of qcom,adreno-smmu was moved into > qcom_smmu_create(), it was overlooked that we didn't have all the > required entries in qcom_smmu_impl_of_match. So we stopped getting > adreno_smmu_priv on sc71

Re: [Freedreno] [PATCH v9 1/8] drm/display/dsc: Add flatness and initial scale value calculations

2023-05-11 Thread Ville Syrjälä
On Wed, May 10, 2023 at 03:54:41PM -0700, Jessica Zhang wrote: > Add helpers to calculate det_thresh_flatness and initial_scale_value as > these calculations are defined within the DSC spec. > > Signed-off-by: Jessica Zhang > Signed-off-by: Dmitry Baryshkov > Reviewed-by: Marijn Suijten > Signe