* Re: [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector
2022-07-06 19:32 [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector Kuogee Hsieh
@ 2022-07-06 19:48 ` Abhinav Kumar
2022-07-06 23:18 ` Doug Anderson
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Abhinav Kumar @ 2022-07-06 19:48 UTC (permalink / raw)
To: Kuogee Hsieh, robdclark, sean, swboyd, dianders, vkoul, daniel,
airlied, agross, dmitry.baryshkov, bjorn.andersson
Cc: quic_aravindh, quic_sbillaka, freedreno, dri-devel,
linux-arm-msm, linux-kernel
On 7/6/2022 12:32 PM, Kuogee Hsieh wrote:
> Some userspace presumes that the first connected connector is the main
> display, where it's supposed to display e.g. the login screen. For
> laptops, this should be the main panel.
>
> This patch call drm_helper_move_panel_connectors_to_head() after
> drm_bridge_connector_init() to make sure eDP stay at head of
> connected connector list. This fixes unexpected corruption happen
> at eDP panel if eDP is not placed at head of connected connector
> list.
>
> Changes in v2:
> -- move drm_helper_move_panel_connectors_to_head() to
> dpu_kms_drm_obj_init()
>
> Changes in v4:
> -- move drm_helper_move_panel_connectors_to_head() to msm_drm_init()
>
> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 4a3dda2..4d518c2 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -419,6 +419,8 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
> }
> }
>
> + drm_helper_move_panel_connectors_to_head(ddev);
> +
> ddev->mode_config.funcs = &mode_config_funcs;
> ddev->mode_config.helper_private = &mode_config_helper_funcs;
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector
2022-07-06 19:32 [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector Kuogee Hsieh
2022-07-06 19:48 ` Abhinav Kumar
@ 2022-07-06 23:18 ` Doug Anderson
2022-07-07 20:51 ` Dmitry Baryshkov
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Doug Anderson @ 2022-07-06 23:18 UTC (permalink / raw)
To: Kuogee Hsieh
Cc: Rob Clark, Sean Paul, Stephen Boyd, Vinod Koul, Daniel Vetter,
David Airlie, Andy Gross, Dmitry Baryshkov, Bjorn Andersson,
Abhinav Kumar (QUIC), Aravind Venkateswaran (QUIC),
Sankeerth Billakanti, freedreno, dri-devel, linux-arm-msm, LKML
Hi,
On Wed, Jul 6, 2022 at 12:32 PM Kuogee Hsieh <quic_khsieh@quicinc.com> wrote:
>
> Some userspace presumes that the first connected connector is the main
> display, where it's supposed to display e.g. the login screen. For
> laptops, this should be the main panel.
>
> This patch call drm_helper_move_panel_connectors_to_head() after
> drm_bridge_connector_init() to make sure eDP stay at head of
> connected connector list. This fixes unexpected corruption happen
> at eDP panel if eDP is not placed at head of connected connector
> list.
>
> Changes in v2:
> -- move drm_helper_move_panel_connectors_to_head() to
> dpu_kms_drm_obj_init()
>
> Changes in v4:
> -- move drm_helper_move_panel_connectors_to_head() to msm_drm_init()
>
> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
NOTE: I tested this upstream with these two trees merged together:
msm-next: 1ff1da40d6fc Merge branches 'msm-next-lumag-core'...
qcom/for-next: d014f9463260 Merge branches 'arm64-for-5.20'...
...plus a revert to make things boot again [1]. I booted this on a
sc7280-herobrine running Chrome OS. When I do this, the original
reported glitching is fixed (yay) and I think we should land it.
...but I'm not convinced that all glitching is fixed by this. In
particular I've occasionally seen an underrun at bootup (blue color)
followed by a temporary glitch. With the above plus ${SUBJECT} patch I
also reliably see a glitch on my external (DP) display every time I
plug in. I don't see either on the downstream Chrome OS kernel,
though...
[1] https://lore.kernel.org/r/20220706144706.1.I48f35820bf3670d54940110462555c2d0a6d5eb2@changeid
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector
2022-07-06 19:32 [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector Kuogee Hsieh
2022-07-06 19:48 ` Abhinav Kumar
2022-07-06 23:18 ` Doug Anderson
@ 2022-07-07 20:51 ` Dmitry Baryshkov
2022-07-07 23:55 ` Stephen Boyd
2022-07-20 18:47 ` Abhinav Kumar
4 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2022-07-07 20:51 UTC (permalink / raw)
To: Kuogee Hsieh, robdclark, sean, swboyd, dianders, vkoul, daniel,
airlied, agross, bjorn.andersson
Cc: quic_abhinavk, quic_aravindh, quic_sbillaka, freedreno,
dri-devel, linux-arm-msm, linux-kernel
On 06/07/2022 22:32, Kuogee Hsieh wrote:
> Some userspace presumes that the first connected connector is the main
> display, where it's supposed to display e.g. the login screen. For
> laptops, this should be the main panel.
>
> This patch call drm_helper_move_panel_connectors_to_head() after
> drm_bridge_connector_init() to make sure eDP stay at head of
> connected connector list. This fixes unexpected corruption happen
> at eDP panel if eDP is not placed at head of connected connector
> list.
>
> Changes in v2:
> -- move drm_helper_move_panel_connectors_to_head() to
> dpu_kms_drm_obj_init()
>
> Changes in v4:
> -- move drm_helper_move_panel_connectors_to_head() to msm_drm_init()
>
> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/gpu/drm/msm/msm_drv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 4a3dda2..4d518c2 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -419,6 +419,8 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
> }
> }
>
> + drm_helper_move_panel_connectors_to_head(ddev);
> +
> ddev->mode_config.funcs = &mode_config_funcs;
> ddev->mode_config.helper_private = &mode_config_helper_funcs;
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector
2022-07-06 19:32 [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector Kuogee Hsieh
` (2 preceding siblings ...)
2022-07-07 20:51 ` Dmitry Baryshkov
@ 2022-07-07 23:55 ` Stephen Boyd
2022-07-20 18:47 ` Abhinav Kumar
4 siblings, 0 replies; 7+ messages in thread
From: Stephen Boyd @ 2022-07-07 23:55 UTC (permalink / raw)
To: Kuogee Hsieh, agross, airlied, bjorn.andersson, daniel, dianders,
dmitry.baryshkov, robdclark, sean, vkoul
Cc: quic_abhinavk, quic_aravindh, quic_sbillaka, freedreno,
dri-devel, linux-arm-msm, linux-kernel
Quoting Kuogee Hsieh (2022-07-06 12:32:08)
> Some userspace presumes that the first connected connector is the main
> display, where it's supposed to display e.g. the login screen. For
> laptops, this should be the main panel.
>
> This patch call drm_helper_move_panel_connectors_to_head() after
> drm_bridge_connector_init() to make sure eDP stay at head of
> connected connector list. This fixes unexpected corruption happen
> at eDP panel if eDP is not placed at head of connected connector
> list.
>
> Changes in v2:
> -- move drm_helper_move_panel_connectors_to_head() to
> dpu_kms_drm_obj_init()
>
> Changes in v4:
> -- move drm_helper_move_panel_connectors_to_head() to msm_drm_init()
>
> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
> ---
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector
2022-07-06 19:32 [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector Kuogee Hsieh
` (3 preceding siblings ...)
2022-07-07 23:55 ` Stephen Boyd
@ 2022-07-20 18:47 ` Abhinav Kumar
2022-07-20 19:01 ` Abhinav Kumar
4 siblings, 1 reply; 7+ messages in thread
From: Abhinav Kumar @ 2022-07-20 18:47 UTC (permalink / raw)
To: Kuogee Hsieh, robdclark, sean, swboyd, dianders, vkoul, daniel,
airlied, agross, dmitry.baryshkov, bjorn.andersson
Cc: quic_aravindh, quic_sbillaka, freedreno, dri-devel,
linux-arm-msm, linux-kernel
On 7/6/2022 12:32 PM, Kuogee Hsieh wrote:
> Some userspace presumes that the first connected connector is the main
> display, where it's supposed to display e.g. the login screen. For
> laptops, this should be the main panel.
>
> This patch call drm_helper_move_panel_connectors_to_head() after
> drm_bridge_connector_init() to make sure eDP stay at head of
> connected connector list. This fixes unexpected corruption happen
> at eDP panel if eDP is not placed at head of connected connector
> list.
>
> Changes in v2:
> -- move drm_helper_move_panel_connectors_to_head() to
> dpu_kms_drm_obj_init()
>
> Changes in v4:
> -- move drm_helper_move_panel_connectors_to_head() to msm_drm_init()
>
> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon")
> ---
> drivers/gpu/drm/msm/msm_drv.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index 4a3dda2..4d518c2 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -419,6 +419,8 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
> }
> }
>
> + drm_helper_move_panel_connectors_to_head(ddev);
> +
> ddev->mode_config.funcs = &mode_config_funcs;
> ddev->mode_config.helper_private = &mode_config_helper_funcs;
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v4] drm/msm/dp: make eDP panel as the first connected connector
2022-07-20 18:47 ` Abhinav Kumar
@ 2022-07-20 19:01 ` Abhinav Kumar
0 siblings, 0 replies; 7+ messages in thread
From: Abhinav Kumar @ 2022-07-20 19:01 UTC (permalink / raw)
To: Kuogee Hsieh, robdclark, sean, swboyd, dianders, vkoul, daniel,
airlied, agross, dmitry.baryshkov, bjorn.andersson
Cc: quic_aravindh, quic_sbillaka, freedreno, dri-devel,
linux-arm-msm, linux-kernel
On 7/20/2022 11:47 AM, Abhinav Kumar wrote:
>
>
> On 7/6/2022 12:32 PM, Kuogee Hsieh wrote:
>> Some userspace presumes that the first connected connector is the main
>> display, where it's supposed to display e.g. the login screen. For
>> laptops, this should be the main panel.
>>
>> This patch call drm_helper_move_panel_connectors_to_head() after
>> drm_bridge_connector_init() to make sure eDP stay at head of
>> connected connector list. This fixes unexpected corruption happen
>> at eDP panel if eDP is not placed at head of connected connector
>> list.
>>
>> Changes in v2:
>> -- move drm_helper_move_panel_connectors_to_head() to
>> dpu_kms_drm_obj_init()
>>
>> Changes in v4:
>> -- move drm_helper_move_panel_connectors_to_head() to msm_drm_init()
>>
>> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
> Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon")
Lets drop the previous fixes tag and use this one as its more recent and
appropriate as it added eDP support for sc7280.
Fixes: ef7837ff091c ("drm/msm/dp: Add DP controllers for sc7280")
>> ---
>> drivers/gpu/drm/msm/msm_drv.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/msm/msm_drv.c
>> b/drivers/gpu/drm/msm/msm_drv.c
>> index 4a3dda2..4d518c2 100644
>> --- a/drivers/gpu/drm/msm/msm_drv.c
>> +++ b/drivers/gpu/drm/msm/msm_drv.c
>> @@ -419,6 +419,8 @@ static int msm_drm_init(struct device *dev, const
>> struct drm_driver *drv)
>> }
>> }
>> + drm_helper_move_panel_connectors_to_head(ddev);
>> +
>> ddev->mode_config.funcs = &mode_config_funcs;
>> ddev->mode_config.helper_private = &mode_config_helper_funcs;
^ permalink raw reply [flat|nested] 7+ messages in thread