drm/msm/dpu: constify DSC data structures
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 4 Apr 2023 13:05:44 +0000 (16:05 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 7 Apr 2023 00:52:08 +0000 (03:52 +0300)
DSC hw catalog data is not supposed to be changed, so mark it as const
data.

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/530818/
Link: https://lore.kernel.org/r/20230404130622.509628-5-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
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_dsc.c

index 1c03d34..84381b9 100644 (file)
@@ -1836,14 +1836,14 @@ static const struct dpu_merge_3d_cfg sm8550_merge_3d[] = {
        .features = _features, \
        }
 
-static struct dpu_dsc_cfg sdm845_dsc[] = {
+static const struct dpu_dsc_cfg sdm845_dsc[] = {
        DSC_BLK("dsc_0", DSC_0, 0x80000, 0),
        DSC_BLK("dsc_1", DSC_1, 0x80400, 0),
        DSC_BLK("dsc_2", DSC_2, 0x80800, 0),
        DSC_BLK("dsc_3", DSC_3, 0x80c00, 0),
 };
 
-static struct dpu_dsc_cfg sm8150_dsc[] = {
+static const struct dpu_dsc_cfg sm8150_dsc[] = {
        DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)),
        DSC_BLK("dsc_1", DSC_1, 0x80400, BIT(DPU_DSC_OUTPUT_CTRL)),
        DSC_BLK("dsc_2", DSC_2, 0x80800, BIT(DPU_DSC_OUTPUT_CTRL)),
index 2f53254..fe360fb 100644 (file)
@@ -872,7 +872,7 @@ struct dpu_mdss_cfg {
        const struct dpu_merge_3d_cfg *merge_3d;
 
        u32 dsc_count;
-       struct dpu_dsc_cfg *dsc;
+       const struct dpu_dsc_cfg *dsc;
 
        u32 intf_count;
        const struct dpu_intf_cfg *intf;
index 619926d..4e13965 100644 (file)
@@ -175,7 +175,7 @@ static void dpu_hw_dsc_bind_pingpong_blk(
        DPU_REG_WRITE(c, dsc_ctl_offset, mux_cfg);
 }
 
-static struct dpu_dsc_cfg *_dsc_offset(enum dpu_dsc dsc,
+static const struct dpu_dsc_cfg *_dsc_offset(enum dpu_dsc dsc,
                                       const struct dpu_mdss_cfg *m,
                                       void __iomem *addr,
                                       struct dpu_hw_blk_reg_map *b)
@@ -207,7 +207,7 @@ struct dpu_hw_dsc *dpu_hw_dsc_init(enum dpu_dsc idx, void __iomem *addr,
                                   const struct dpu_mdss_cfg *m)
 {
        struct dpu_hw_dsc *c;
-       struct dpu_dsc_cfg *cfg;
+       const struct dpu_dsc_cfg *cfg;
 
        c = kzalloc(sizeof(*c), GFP_KERNEL);
        if (!c)