From: Kuogee Hsieh <quic_khsieh@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
<robdclark@gmail.com>, <sean@poorly.run>, <swboyd@chromium.org>,
<dianders@chromium.org>, <vkoul@kernel.org>, <daniel@ffwll.ch>,
<airlied@linux.ie>, <agross@kernel.org>,
<bjorn.andersson@linaro.org>
Cc: <quic_abhinavk@quicinc.com>, <quic_aravindh@quicinc.com>,
<quic_sbillaka@quicinc.com>, <freedreno@lists.freedesktop.org>,
<dri-devel@lists.freedesktop.org>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] drm/msm/dp: make eDP panel as the first connected connector
Date: Wed, 6 Jul 2022 10:54:19 -0700 [thread overview]
Message-ID: <cdbfbad1-83a3-b15d-3000-eec425ae140c@quicinc.com> (raw)
In-Reply-To: <b85a7423-44ec-1f58-7465-e5322bc32cd3@linaro.org>
On 7/6/2022 10:41 AM, Dmitry Baryshkov wrote:
> On 06/07/2022 20:38, Kuogee Hsieh wrote:
>>
>> On 7/6/2022 10:25 AM, Dmitry Baryshkov wrote:
>>> On 06/07/2022 20:24, 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()
>>>>
>>>> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
>>>> ---
>>>> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 ++
>>>> 1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>>> b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>>> index 2b9d931..50ff666 100644
>>>> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>>> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
>>>> @@ -763,6 +763,8 @@ static int _dpu_kms_drm_obj_init(struct dpu_kms
>>>> *dpu_kms)
>>>> if (ret)
>>>> return ret;
>>>> + drm_helper_move_panel_connectors_to_head(dev);
>>>
>>> This should be in msm_drv.c unless you have a strong reason to have
>>> it here.
>> Can you please provide more info why should be in msm_drv.c?
>
> Let me quote my message from v1 review:
>
> Please move this call to the msm_drm_init(). Calling this function
> somewhere after the ->kms_init() would make sure that all panel
> connectors are close to the top of the list, whichever MDP/DPU driver
> is used and whichever actual interface is bound to this panel.
>
Below are the call flow in timing order, ->kms_init does not create
connectors/interfaces, hw_init does that.
1) ->kms_init
2) ->hw_init -> dpu_kms_hw_init --> _dpu_kms_drm_obj_init() -->
_dpu_kms_setup_displays()--> msm_dp_modeset_init() --> creator
connectors/interfaces
3) drm_helper_move_panel_connectors_to_head() <== add here??
>>> _dpu_kms_drm_obj_init() create and initialize drm obj one by one and
>>> _dpu_kms_setup_displays() had created system wide
>>> connectors/interfaces .
>>
>> After that should be fine to move edp to head of connector list.
>>
>>>> +
>>>> num_encoders = 0;
>>>> drm_for_each_encoder(encoder, dev)
>>>> num_encoders++;
>>>
>>>
>
>
next prev parent reply other threads:[~2022-07-06 17:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 17:24 [PATCH v3] drm/msm/dp: make eDP panel as the first connected connector Kuogee Hsieh
2022-07-06 17:25 ` Dmitry Baryshkov
2022-07-06 17:38 ` Kuogee Hsieh
2022-07-06 17:41 ` Dmitry Baryshkov
2022-07-06 17:54 ` Kuogee Hsieh [this message]
2022-07-06 17:57 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cdbfbad1-83a3-b15d-3000-eec425ae140c@quicinc.com \
--to=quic_khsieh@quicinc.com \
--cc=agross@kernel.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_aravindh@quicinc.com \
--cc=quic_sbillaka@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox