OSDN Git Service

drm/msm/dpu: use right setup_blend_config for sm8150 and sm8250
authorJonathan Marek <jonathan@marek.ca>
Sat, 11 Jul 2020 00:47:24 +0000 (20:47 -0400)
committerRob Clark <robdclark@chromium.org>
Fri, 31 Jul 2020 13:46:16 +0000 (06:46 -0700)
All DPU versions starting from 4.0 use the sdm845 version, so check for
that instead of checking each version individually. This chooses the right
function for sm8150 and sm8250.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c

index 37becd4..4b8baf7 100644 (file)
@@ -152,14 +152,13 @@ static void _setup_mixer_ops(const struct dpu_mdss_cfg *m,
                unsigned long features)
 {
        ops->setup_mixer_out = dpu_hw_lm_setup_out;
-       if (IS_SDM845_TARGET(m->hwversion) || IS_SDM670_TARGET(m->hwversion)
-           || IS_SC7180_TARGET(m->hwversion))
+       if (m->hwversion >= DPU_HW_VER_400)
                ops->setup_blend_config = dpu_hw_lm_setup_blend_config_sdm845;
        else
                ops->setup_blend_config = dpu_hw_lm_setup_blend_config;
        ops->setup_alpha_out = dpu_hw_lm_setup_color3;
        ops->setup_border_color = dpu_hw_lm_setup_border_color;
-};
+}
 
 static struct dpu_hw_blk_ops dpu_hw_ops;