drm/msm/dpu: add cdm blocks to sc7280 dpu_hw_catalog
authorAbhinav Kumar <quic_abhinavk@quicinc.com>
Tue, 12 Dec 2023 20:52:43 +0000 (12:52 -0800)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 14 Dec 2023 07:27:23 +0000 (09:27 +0200)
Add CDM blocks to the sc7280 dpu_hw_catalog to support
YUV format output from writeback block.

changes in v3:
- change the comment from sub-blk to clk for CDM

changes in v2:
- remove explicit zero assignment for features
- move sc7280_cdm to dpu_hw_catalog from the sc7280
  catalog file as its definition can be re-used

Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/571818/
Link: https://lore.kernel.org/r/20231212205254.12422-6-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h

index 209675de6742fcbbeee202173a95f0295ec1e34e..19c2b745479661af73270080d9ac3cd12c0453eb 100644 (file)
@@ -248,6 +248,7 @@ const struct dpu_mdss_cfg dpu_sc7280_cfg = {
        .mdss_ver = &sc7280_mdss_ver,
        .caps = &sc7280_dpu_caps,
        .mdp = &sc7280_mdp,
+       .cdm = &sc7280_cdm,
        .ctl_count = ARRAY_SIZE(sc7280_ctl),
        .ctl = sc7280_ctl,
        .sspp_count = ARRAY_SIZE(sc7280_sspp),
index d52aae54bbd598e14adecd67003ac79725c8230c..b304bebedb8449ef84c6ed55fa0fdb26d33147b3 100644 (file)
@@ -426,6 +426,16 @@ static const struct dpu_dsc_sub_blks dsc_sblk_1 = {
        .ctl = {.name = "ctl", .base = 0xF80, .len = 0x10},
 };
 
+/*************************************************************
+ * CDM block config
+ *************************************************************/
+static const struct dpu_cdm_cfg sc7280_cdm = {
+       .name = "cdm_0",
+       .id = CDM_0,
+       .len = 0x228,
+       .base = 0x79200,
+};
+
 /*************************************************************
  * VBIF sub blocks config
  *************************************************************/
index e3c0d007481bc5268dc4f2d6ab9b8402f1590412..ba82ef4560a6dd7deb8ce704817150a0c554f958 100644 (file)
@@ -682,6 +682,17 @@ struct dpu_vbif_cfg {
        u32 memtype[MAX_XIN_COUNT];
 };
 
+/**
+ * struct dpu_cdm_cfg - information of chroma down blocks
+ * @name               string name for debug purposes
+ * @id                 enum identifying this block
+ * @base               register offset of this block
+ * @features           bit mask identifying sub-blocks/features
+ */
+struct dpu_cdm_cfg {
+       DPU_HW_BLK_INFO;
+};
+
 /**
  * Define CDP use cases
  * @DPU_PERF_CDP_UDAGE_RT: real-time use cases
@@ -805,6 +816,8 @@ struct dpu_mdss_cfg {
        u32 wb_count;
        const struct dpu_wb_cfg *wb;
 
+       const struct dpu_cdm_cfg *cdm;
+
        u32 ad_count;
 
        u32 dspp_count;
index a6702b2bfc6860ff026e01041e8904a26732e95b..f319c8232ea5a776438882fa15303874ce25dc04 100644 (file)
@@ -185,6 +185,11 @@ enum dpu_dsc {
        DSC_MAX
 };
 
+enum dpu_cdm {
+       CDM_0 = 1,
+       CDM_MAX
+};
+
 enum dpu_pingpong {
        PINGPONG_NONE,
        PINGPONG_0,