[Freedreno] [PATCH 1/2] drm/msm/dpu: do not enable color-management if DSPPs are not available
Yongqin Liu
yongqin.liu at linaro.org
Thu Jun 15 06:28:22 UTC 2023
On Tue, 13 Jun 2023 at 02:25, Dmitry Baryshkov
<dmitry.baryshkov at linaro.org> wrote:
>
> We can not support color management without DSPP blocks being provided
> in the HW catalog. Do not enable color management for CRTCs if num_dspps
> is 0.
>
> Fixes: 4259ff7ae509 ("drm/msm/dpu: add support for pcc color block in dpu driver")
> Reported-by: Yongqin Liu <yongqin.liu at linaro.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Thanks for this fix!
With it applied to the ACK android-mainline branch,
the "dpu error" problem reported here:
https://lore.kernel.org/lkml/CAMSo37VmhB1-PUp1qu8gaxOXtu98eEYmWd71FOai+cwLb-JvSg@mail.gmail.com/
is not reproduced.
Tested-by: Yongqin Liu <yongqin.liu at linaro.org>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 6e684a7b49a1..1edf2b6b0a26 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -1463,6 +1463,8 @@ static const struct drm_crtc_helper_funcs dpu_crtc_helper_funcs = {
> struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
> struct drm_plane *cursor)
> {
> + struct msm_drm_private *priv = dev->dev_private;
> + struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);
> struct drm_crtc *crtc = NULL;
> struct dpu_crtc *dpu_crtc = NULL;
> int i, ret;
> @@ -1494,7 +1496,8 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
>
> drm_crtc_helper_add(crtc, &dpu_crtc_helper_funcs);
>
> - drm_crtc_enable_color_mgmt(crtc, 0, true, 0);
> + if (dpu_kms->catalog->dspp_count)
> + drm_crtc_enable_color_mgmt(crtc, 0, true, 0);
>
> /* save user friendly CRTC name for later */
> snprintf(dpu_crtc->name, DPU_CRTC_NAME_SIZE, "crtc%u", crtc->base.id);
> --
> 2.39.2
>
--
Best Regards,
Yongqin Liu
---------------------------------------------------------------
#mailing list
linaro-android at lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-android
More information about the Freedreno
mailing list