[Freedreno] [PATCH v4 3/4] drm/msm: add compatibles for sm8150/sm8250 display
Bjorn Andersson
bjorn.andersson at linaro.org
Tue Mar 30 03:16:31 UTC 2021
On Mon 29 Mar 07:00 CDT 2021, Dmitry Baryshkov wrote:
> From: Jonathan Marek <jonathan at marek.ca>
>
> The driver already has support for sm8150/sm8250, but the compatibles were
> never added.
>
> Also inverse the non-mdp4 condition in add_display_components() to avoid
> having to check every new compatible in the condition.
>
> Signed-off-by: Jonathan Marek <jonathan at marek.ca>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 ++
> drivers/gpu/drm/msm/msm_drv.c | 6 +++---
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index 5a8e3e1fc48c..fff12a4c8bfc 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> @@ -1219,6 +1219,8 @@ static const struct dev_pm_ops dpu_pm_ops = {
> static const struct of_device_id dpu_dt_match[] = {
> { .compatible = "qcom,sdm845-dpu", },
> { .compatible = "qcom,sc7180-dpu", },
> + { .compatible = "qcom,sm8150-dpu", },
> + { .compatible = "qcom,sm8250-dpu", },
> {}
> };
> MODULE_DEVICE_TABLE(of, dpu_dt_match);
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 94525ac76d4e..928f13d4bfbc 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -1185,9 +1185,7 @@ static int add_display_components(struct device *dev,
> * Populate the children devices, find the MDP5/DPU node, and then add
> * the interfaces to our components list.
> */
> - if (of_device_is_compatible(dev->of_node, "qcom,mdss") ||
> - of_device_is_compatible(dev->of_node, "qcom,sdm845-mdss") ||
> - of_device_is_compatible(dev->of_node, "qcom,sc7180-mdss")) {
> + if (!of_device_is_compatible(dev->of_node, "qcom,mdp4")) {
Please consider reviewing my proposed alternative solution for this
hunk:
https://lore.kernel.org/linux-arm-msm/20210317025634.3987908-1-bjorn.andersson@linaro.org/
For the rest
Reviewed-by: Bjorn Andersson <bjorn.andersson at linaro.org>
Regards,
Bjorn
> ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
> if (ret) {
> DRM_DEV_ERROR(dev, "failed to populate children devices\n");
> @@ -1320,6 +1318,8 @@ static const struct of_device_id dt_match[] = {
> { .compatible = "qcom,mdss", .data = (void *)KMS_MDP5 },
> { .compatible = "qcom,sdm845-mdss", .data = (void *)KMS_DPU },
> { .compatible = "qcom,sc7180-mdss", .data = (void *)KMS_DPU },
> + { .compatible = "qcom,sm8150-mdss", .data = (void *)KMS_DPU },
> + { .compatible = "qcom,sm8250-mdss", .data = (void *)KMS_DPU },
> {}
> };
> MODULE_DEVICE_TABLE(of, dt_match);
> --
> 2.30.2
>
More information about the Freedreno
mailing list