Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Stephen Boyd <swboyd@chromium.org>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Kuogee Hsieh <quic_khsieh@quicinc.com>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org
Subject: Re: [RFC PATCH v2 1/5] drm/msm/dp: fix panel bridge attachment
Date: Sat, 19 Feb 2022 05:26:58 +0300	[thread overview]
Message-ID: <a1b1d3ef-4131-b8a9-5300-89092bce271b@linaro.org> (raw)
In-Reply-To: <CAE-0n52iHFtHppZj-g0V1UP5oWzXjbNDjpOd-hgR+F=TqFzjVg@mail.gmail.com>

On 19/02/2022 02:56, Stephen Boyd wrote:
> Quoting Dmitry Baryshkov (2022-02-11 14:40:02)
>> In commit 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display
>> enable and disable") the DP driver received a drm_bridge instance, which
>> is always attached to the encoder as a root bridge. However it conflicts
>> with the panel_bridge support for eDP panels. The panel bridge attaches
>> to the encoder before the "dp" bridge has a chace to do so. Change
> 
> s/chace/chance/
> 
>> panel_bridge attachment to come after dp_bridge attachment.
> 
> s/panel_bridge/panel bridge/ possibly? And maybe clarify that dp_bridge
> is the "DP driver's drm_bridge instance created in
> msm_dp_bridge_init()"?
> 
> My understanding is that we want to pass the bridge created in
> msm_dp_bridge_init() as the 'previous' bridge so that it attaches the
> panel bridge to the output of the DP bridge that's attached to the
> encoder.

Thanks! I'll update the commit log when pushing the patches.

> 
>>
>> Fixes: 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable")
>> Cc: Kuogee Hsieh <quic_khsieh@quicinc.com>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
> 
> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
> 
>>   drivers/gpu/drm/msm/dp/dp_drm.c | 21 +++++++++++----------
>>   1 file changed, 11 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/dp/dp_drm.c b/drivers/gpu/drm/msm/dp/dp_drm.c
>> index d4d360d19eba..26ef41a4c1b6 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_drm.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_drm.c
>> @@ -169,16 +169,6 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display)
>>
>>          drm_connector_attach_encoder(connector, dp_display->encoder);
>>
>> -       if (dp_display->panel_bridge) {
>> -               ret = drm_bridge_attach(dp_display->encoder,
>> -                                       dp_display->panel_bridge, NULL,
>> -                                       DRM_BRIDGE_ATTACH_NO_CONNECTOR);
>> -               if (ret < 0) {
>> -                       DRM_ERROR("failed to attach panel bridge: %d\n", ret);
>> -                       return ERR_PTR(ret);
>> -               }
>> -       }
>> -
>>          return connector;
>>   }
>>
>> @@ -246,5 +236,16 @@ struct drm_bridge *msm_dp_bridge_init(struct msm_dp *dp_display, struct drm_devi
>>                  return ERR_PTR(rc);
>>          }
>>
>> +       if (dp_display->panel_bridge) {
>> +               rc = drm_bridge_attach(dp_display->encoder,
>> +                                       dp_display->panel_bridge, bridge,
>> +                                       DRM_BRIDGE_ATTACH_NO_CONNECTOR);
>> +               if (rc < 0) {
>> +                       DRM_ERROR("failed to attach panel bridge: %d\n", rc);
>> +                       drm_bridge_remove(bridge);
>> +                       return ERR_PTR(rc);
>> +               }
>> +       }
>> +
>>          return bridge;
> 
> Not a problem with this patch, but what is this pointer used for? I see
> it's assigned to priv->bridges and num_bridges is incremented but nobody
> seems to look at that.


That's on my todo list. to remove connectors array and to destroy 
created bridges during drm device destruction.

-- 
With best wishes
Dmitry

  reply	other threads:[~2022-02-19  2:27 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11 22:40 [RFC PATCH v2 0/5] Simplify and correct msm/dp bridge implementation Dmitry Baryshkov
2022-02-11 22:40 ` [RFC PATCH v2 1/5] drm/msm/dp: fix panel bridge attachment Dmitry Baryshkov
2022-02-18 21:14   ` Kuogee Hsieh
2022-02-18 23:56   ` Stephen Boyd
2022-02-19  2:26     ` Dmitry Baryshkov [this message]
2022-02-24 18:25       ` [Freedreno] " Abhinav Kumar
2022-02-24 20:41         ` Dmitry Baryshkov
2022-02-25  2:01           ` Abhinav Kumar
2022-02-25  4:22             ` Dmitry Baryshkov
2022-02-25  4:45               ` Abhinav Kumar
2022-02-25  9:04                 ` Dmitry Baryshkov
2022-02-25 17:11                   ` Abhinav Kumar
2022-02-25 17:25                     ` Dmitry Baryshkov
2022-02-11 22:40 ` [RFC PATCH v2 2/5] drm/msm/dp: support attaching bridges to the DP encoder Dmitry Baryshkov
2022-02-18 21:28   ` Kuogee Hsieh
2022-02-18 21:31     ` Dmitry Baryshkov
2022-02-18 23:38   ` Stephen Boyd
2022-02-23 17:47   ` Kuogee Hsieh
2022-02-24 19:56   ` Abhinav Kumar
2022-02-11 22:40 ` [RFC PATCH v2 3/5] drm/msm/dp: support finding next bridge even for DP interfaces Dmitry Baryshkov
2022-02-18 21:29   ` Kuogee Hsieh
2022-02-19  0:34   ` Stephen Boyd
2022-02-24 20:13   ` Abhinav Kumar
2022-02-24 20:49     ` Dmitry Baryshkov
2022-02-24 21:09       ` Abhinav Kumar
2022-02-11 22:40 ` [RFC PATCH v2 4/5] drm/msm/dp: replace dp_connector with drm_bridge_connector Dmitry Baryshkov
2022-02-18 21:31   ` Kuogee Hsieh
2022-02-18 21:52     ` Dmitry Baryshkov
2022-02-18 22:32     ` Dmitry Baryshkov
2022-02-19  0:55       ` Stephen Boyd
2022-02-19  2:22         ` Dmitry Baryshkov
2022-02-23 17:21           ` Kuogee Hsieh
2022-02-23 18:22             ` Dmitry Baryshkov
2022-02-23 18:27               ` Kuogee Hsieh
2022-02-23 18:45                 ` Dmitry Baryshkov
2022-02-23 21:33                 ` Stephen Boyd
2022-02-24  0:40                   ` Kuogee Hsieh
     [not found]                     ` <64a5ae1a-df65-b0a5-5d0d-cfb1d4da3bf7@quicinc.com>
2022-03-16 16:45                       ` Sankeerth Billakanti (QUIC)
2022-04-14 20:17                         ` Abhinav Kumar
2022-02-11 22:40 ` [RFC PATCH v2 5/5] drm/msm/dp: remove extra wrappers and public functions Dmitry Baryshkov
     [not found]   ` <26549f55-6195-a7ec-5896-de5f986ad716@quicinc.com>
2022-03-16 16:31     ` Sankeerth Billakanti (QUIC)
2022-04-14 20:17       ` Abhinav Kumar

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=a1b1d3ef-4131-b8a9-5300-89092bce271b@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_khsieh@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.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