mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Rob Herring <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	<linux-arm-msm@vger.kernel.org>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 6/7] drm/msm/mdp4: switch LVDS to use drm_bridge/_connector
Date: Fri, 25 Apr 2025 13:01:10 -0700	[thread overview]
Message-ID: <99e0d2b9-d866-4b52-bde8-a6d89f35aadd@quicinc.com> (raw)
In-Reply-To: <CAO9ioeXhjrOyKz3N3oU6QxW+u6WUC4R5XXqWgb=7iF7Hk0Q_nQ@mail.gmail.com>



On 4/25/2025 2:27 AM, Dmitry Baryshkov wrote:
> On Fri, 25 Apr 2025 at 00:00, Abhinav Kumar <quic_abhinavk@quicinc.com> wrote:
>>
>>
>>
>> On 4/24/2025 3:23 AM, Dmitry Baryshkov wrote:
>>> On Wed, Apr 23, 2025 at 07:04:16PM -0700, Abhinav Kumar wrote:
>>>>
>>>>
>>>> On 2/26/2025 6:25 PM, Dmitry Baryshkov wrote:
>>>>> LVDS support in MDP4 driver makes use of drm_connector directly. However
>>>>> LCDC encoder and LVDS connector are wrappers around drm_panel. Switch
>>>>> them to use drm_panel_bridge/drm_bridge_connector. This allows using
>>>>> standard interface for the drm_panel and also inserting additional
>>>>> bridges between encoder and panel.
>>>>>
>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>> ---
>>>>>     drivers/gpu/drm/msm/Makefile                       |   1 -
>>>>>     drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c           |  34 +++++--
>>>>>     drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.h           |   6 +-
>>>>>     drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c  |  20 +----
>>>>>     .../gpu/drm/msm/disp/mdp4/mdp4_lvds_connector.c    | 100 ---------------------
>>>>>     5 files changed, 28 insertions(+), 133 deletions(-)
>>>>>
>>>>> @@ -199,27 +201,43 @@ static int mdp4_modeset_init_intf(struct mdp4_kms *mdp4_kms,
>>>>>               * bail out early if there is no panel node (no need to
>>>>>               * initialize LCDC encoder and LVDS connector)
>>>>>               */
>>>>> -           panel_node = of_graph_get_remote_node(dev->dev->of_node, 0, 0);
>>>>> -           if (!panel_node)
>>>>> -                   return 0;
>>>>> +           next_bridge = devm_drm_of_get_bridge(dev->dev, dev->dev->of_node, 0, 0);
>>>>> +           if (IS_ERR(next_bridge)) {
>>>>> +                   ret = PTR_ERR(next_bridge);
>>>>> +                   if (ret == -ENODEV)
>>>>> +                           return 0;
>>>>> +                   return ret;
>>>>> +           }
>>>>> -           encoder = mdp4_lcdc_encoder_init(dev, panel_node);
>>>>> +           encoder = mdp4_lcdc_encoder_init(dev);
>>>>>              if (IS_ERR(encoder)) {
>>>>>                      DRM_DEV_ERROR(dev->dev, "failed to construct LCDC encoder\n");
>>>>> -                   of_node_put(panel_node);
>>>>>                      return PTR_ERR(encoder);
>>>>>              }
>>>>>              /* LCDC can be hooked to DMA_P (TODO: Add DMA_S later?) */
>>>>>              encoder->possible_crtcs = 1 << DMA_P;
>>>>> -           connector = mdp4_lvds_connector_init(dev, panel_node, encoder);
>>>>> +           ret = drm_bridge_attach(encoder, next_bridge, NULL, DRM_BRIDGE_ATTACH_NO_CONNECTOR);
>>>>> +           if (ret) {
>>>>> +                   DRM_DEV_ERROR(dev->dev, "failed to attach LVDS panel/bridge: %d\n", ret);
>>>>> +
>>>>> +                   return ret;
>>>>> +           }
>>>>
>>>> Can you pls point me to the lvds bridge used with this apq8064 board? I was
>>>> unable to find it. Just wanted to compare that against this while reviewing.
>>>
>>> It's the panel bridge, wrapping one of the LVDS panels.
>>>
>>
>> Yes but what I wanted to check was which LVDS panel was being used so
>> far. Looks like for arm32 the dts is missing? As I couldnt find the lvds
>> out endpoint. So can you pls point me to the lvds panel you verified
>> this with?
> 
> I used the AUO b101xtn01 panel connected to the LVDS connector on the
> IFC6410. I'm not posting DT bits since the panel is not a part of the
> kit.
> 

Ok, so at this point of time, this is just the driver piece which does 
not have a real HW in the tree to be verified with.


>>
>>
>>>>> +
>>>>> +           connector = drm_bridge_connector_init(dev, encoder);
>>>>>              if (IS_ERR(connector)) {
>>>>>                      DRM_DEV_ERROR(dev->dev, "failed to initialize LVDS connector\n");
>>>>> -                   of_node_put(panel_node);
>>>>>                      return PTR_ERR(connector);
>>>>>              }
>>>>> +           ret = drm_connector_attach_encoder(connector, encoder);
>>>>> +           if (ret) {
>>>>> +                   DRM_DEV_ERROR(dev->dev, "failed to attach LVDS connector: %d\n", ret);
>>>>> +
>>>>> +                   return ret;
>>>>> +           }
>>>>> +
>>>>>              break;
>>>>>      case DRM_MODE_ENCODER_TMDS:
>>>>>              encoder = mdp4_dtv_encoder_init(dev);
>>>
>>
> 
> 


  reply	other threads:[~2025-04-25 20:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-27  2:25 [PATCH v3 0/7] drm/msm/mdp4: rework LVDS/LCDC panel support Dmitry Baryshkov
2025-02-27  2:25 ` [PATCH v3 1/7] dt-bindings: display: msm: mdp4: add LCDC clock and PLL source Dmitry Baryshkov
2025-02-27  2:25 ` [PATCH v3 2/7] drm/msm/mdp4: drop mpd4_lvds_pll_init stub Dmitry Baryshkov
2025-04-23 22:18   ` Abhinav Kumar
2025-02-27  2:25 ` [PATCH v3 3/7] drm/msm/mdp4: register the LVDS PLL as a clock provider Dmitry Baryshkov
2025-04-23 22:54   ` Abhinav Kumar
2025-04-24 10:22     ` Dmitry Baryshkov
2025-04-24 19:41       ` Abhinav Kumar
2025-02-27  2:25 ` [PATCH v3 4/7] drm/msm/mdp4: use parent_data for LVDS PLL Dmitry Baryshkov
2025-03-08 17:50   ` Konrad Dybcio
2025-04-23 22:54   ` Abhinav Kumar
2025-02-27  2:25 ` [PATCH v3 5/7] drm/msm/mdp4: move move_valid callback to lcdc_encoder Dmitry Baryshkov
2025-04-23 23:28   ` Abhinav Kumar
2025-02-27  2:25 ` [PATCH v3 6/7] drm/msm/mdp4: switch LVDS to use drm_bridge/_connector Dmitry Baryshkov
2025-04-24  2:04   ` Abhinav Kumar
2025-04-24 10:23     ` Dmitry Baryshkov
2025-04-24 21:00       ` Abhinav Kumar
2025-04-25  9:27         ` Dmitry Baryshkov
2025-04-25 20:01           ` Abhinav Kumar [this message]
2025-04-25 22:05             ` Dmitry Baryshkov
2025-02-27  2:25 ` [PATCH v3 7/7] arm: dts: qcom: apq8064: link LVDS clocks 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=99e0d2b9-d866-4b52-bde8-a6d89f35aadd@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mripard@kernel.org \
    --cc=robdclark@gmail.com \
    --cc=robh@kernel.org \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®