2022-03-18 00:14:41

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH] drm/msm/dsi: Use connector directly in msm_dsi_manager_connector_init()

The member 'msm_dsi->connector' isn't assigned until
msm_dsi_manager_connector_init() returns (see msm_dsi_modeset_init() and
how it assigns the return value). Therefore this pointer is going to be
NULL here. Let's use 'connector' which is what was intended.

Cc: Dmitry Baryshkov <[email protected]>
Cc: Sean Paul <[email protected]>
Fixes: 6d5e78406991 ("drm/msm/dsi: Move dsi panel init into modeset init path")
Signed-off-by: Stephen Boyd <[email protected]>
---

I don't know if this is superseeded by something else but I found this
while trying to use the connector from msm_dsi in this function.

drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 0c1b7dde377c..9f6af0f0fe00 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -638,7 +638,7 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id)
return connector;

fail:
- connector->funcs->destroy(msm_dsi->connector);
+ connector->funcs->destroy(connector);
return ERR_PTR(ret);
}


base-commit: 05afd57f4d34602a652fdaf58e0a2756b3c20fd4
--
https://chromeos.dev


2022-04-11 10:44:29

by Abhinav Kumar

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dsi: Use connector directly in msm_dsi_manager_connector_init()



On 3/17/2022 5:07 PM, Stephen Boyd wrote:
> The member 'msm_dsi->connector' isn't assigned until
> msm_dsi_manager_connector_init() returns (see msm_dsi_modeset_init() and
> how it assigns the return value). Therefore this pointer is going to be
> NULL here. Let's use 'connector' which is what was intended.
>
> Cc: Dmitry Baryshkov <[email protected]>
> Cc: Sean Paul <[email protected]>
> Fixes: 6d5e78406991 ("drm/msm/dsi: Move dsi panel init into modeset init path")
> Signed-off-by: Stephen Boyd <[email protected]>
Reviewed-by: Abhinav Kumar <[email protected]>
> ---
>
> I don't know if this is superseeded by something else but I found this
> while trying to use the connector from msm_dsi in this function.
>
> drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> index 0c1b7dde377c..9f6af0f0fe00 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
> @@ -638,7 +638,7 @@ struct drm_connector *msm_dsi_manager_connector_init(u8 id)
> return connector;
>
> fail:
> - connector->funcs->destroy(msm_dsi->connector);
> + connector->funcs->destroy(connector);
> return ERR_PTR(ret);
> }
>
>
> base-commit: 05afd57f4d34602a652fdaf58e0a2756b3c20fd4

2022-04-12 21:09:02

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH] drm/msm/dsi: Use connector directly in msm_dsi_manager_connector_init()

On 18/03/2022 03:07, Stephen Boyd wrote:
> The member 'msm_dsi->connector' isn't assigned until
> msm_dsi_manager_connector_init() returns (see msm_dsi_modeset_init() and
> how it assigns the return value). Therefore this pointer is going to be
> NULL here. Let's use 'connector' which is what was intended.
>
> Cc: Dmitry Baryshkov <[email protected]>
> Cc: Sean Paul <[email protected]>
> Fixes: 6d5e78406991 ("drm/msm/dsi: Move dsi panel init into modeset init path")
> Signed-off-by: Stephen Boyd <[email protected]>

Reviewed-by: Dmitry Baryshkov <[email protected]>


--
With best wishes
Dmitry