]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/msm/dpu: get rid of DPU_MIXER_COMBINED_ALPHA
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 22 May 2025 19:03:40 +0000 (22:03 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Fri, 4 Jul 2025 13:35:17 +0000 (16:35 +0300)
Continue migration to the MDSS-revision based checks and replace
DPU_MIXER_COMBINED_ALPHA feature bit with the core_major_ver >= 4 check.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/655398/
Link: https://lore.kernel.org/r/20250522-dpu-drop-features-v5-21-3b2085a07884@oss.qualcomm.com
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_lm.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c

index 4777a4a852da0d65e20cebc31fd05647e0b4c4b2..d64ebc729bfb589bf90af89c094181f879d5b1ef 100644 (file)
        (BIT(DPU_MIXER_SOURCESPLIT))
 
 #define MIXER_SDM845_MASK \
-       (BIT(DPU_MIXER_SOURCESPLIT) | BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA))
+       (BIT(DPU_MIXER_SOURCESPLIT) | BIT(DPU_DIM_LAYER))
 
 #define MIXER_QCM2290_MASK \
-       (BIT(DPU_DIM_LAYER) | BIT(DPU_MIXER_COMBINED_ALPHA))
+       (BIT(DPU_DIM_LAYER))
 
 #define WB_SDM845_MASK (BIT(DPU_WB_LINE_MODE) | \
                         BIT(DPU_WB_UBWC) | \
index 9ba9e273f81ab1966db1865b4ce28f8c18f750b8..5e4608d10c6d4fee387c9a599a73b15661148430 100644 (file)
@@ -85,7 +85,6 @@ enum {
  * @DPU_MIXER_SOURCESPLIT     Layer mixer supports source-split configuration
  * @DPU_MIXER_GC              Gamma correction block
  * @DPU_DIM_LAYER             Layer mixer supports dim layer
- * @DPU_MIXER_COMBINED_ALPHA  Layer mixer has combined alpha register
  * @DPU_MIXER_MAX             maximum value
  */
 enum {
@@ -93,7 +92,6 @@ enum {
        DPU_MIXER_SOURCESPLIT,
        DPU_MIXER_GC,
        DPU_DIM_LAYER,
-       DPU_MIXER_COMBINED_ALPHA,
        DPU_MIXER_MAX
 };
 
index 4f57cfca89bd3962e7e512952809db0300cb9baf..3bfb61cb83672dca4236bdbbbfb1e442223576d2 100644 (file)
@@ -150,10 +150,12 @@ static void dpu_hw_lm_setup_color3(struct dpu_hw_mixer *ctx,
  * @dev:  Corresponding device for devres management
  * @cfg:  mixer catalog entry for which driver object is required
  * @addr: mapped register io address of MDP
+ * @mdss_ver: DPU core's major and minor versions
  */
 struct dpu_hw_mixer *dpu_hw_lm_init(struct drm_device *dev,
                                    const struct dpu_lm_cfg *cfg,
-                                   void __iomem *addr)
+                                   void __iomem *addr,
+                                   const struct dpu_mdss_version *mdss_ver)
 {
        struct dpu_hw_mixer *c;
 
@@ -173,7 +175,7 @@ struct dpu_hw_mixer *dpu_hw_lm_init(struct drm_device *dev,
        c->idx = cfg->id;
        c->cap = cfg;
        c->ops.setup_mixer_out = dpu_hw_lm_setup_out;
-       if (test_bit(DPU_MIXER_COMBINED_ALPHA, &c->cap->features))
+       if (mdss_ver->core_major_ver >= 4)
                c->ops.setup_blend_config = dpu_hw_lm_setup_blend_config_combined_alpha;
        else
                c->ops.setup_blend_config = dpu_hw_lm_setup_blend_config;
index 6f60fa9b3cd78160699a97dc7a86a5ec0b599281..fff1156add683fec8ce6785e7fe1d769d0de3fe0 100644 (file)
@@ -95,6 +95,7 @@ static inline struct dpu_hw_mixer *to_dpu_hw_mixer(struct dpu_hw_blk *hw)
 
 struct dpu_hw_mixer *dpu_hw_lm_init(struct drm_device *dev,
                                    const struct dpu_lm_cfg *cfg,
-                                   void __iomem *addr);
+                                   void __iomem *addr,
+                                   const struct dpu_mdss_version *mdss_ver);
 
 #endif /*_DPU_HW_LM_H */
index d728e275ac427f7849dad4f4a055c56840ca2d23..7bcb1e057b143a5512aafbd640199c8f3b436527 100644 (file)
@@ -60,7 +60,7 @@ int dpu_rm_init(struct drm_device *dev,
                struct dpu_hw_mixer *hw;
                const struct dpu_lm_cfg *lm = &cat->mixer[i];
 
-               hw = dpu_hw_lm_init(dev, lm, mmio);
+               hw = dpu_hw_lm_init(dev, lm, mmio, cat->mdss_ver);
                if (IS_ERR(hw)) {
                        rc = PTR_ERR(hw);
                        DPU_ERROR("failed lm object creation: err %d\n", rc);