From: Ayushi Makhija <quic_amakhija@quicinc.com>
To: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Dmitry Baryshkov <lumag@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>, <robdclark@gmail.com>,
<dmitry.baryshkov@linaro.org>, <sean@poorly.run>,
<marijn.suijten@somainline.org>, <andersson@kernel.org>,
<robh@kernel.org>, <robh+dt@kernel.org>, <krzk+dt@kernel.org>,
<konradybcio@kernel.org>, <conor+dt@kernel.org>,
<andrzej.hajda@intel.com>, <neil.armstrong@linaro.org>,
<rfoss@kernel.org>, <Laurent.pinchart@ideasonboard.com>,
<jonas@kwiboo.se>, <jernej.skrabec@gmail.com>,
<quic_abhinavk@quicinc.com>, <quic_rajeevny@quicinc.com>,
<quic_vproddut@quicinc.com>, <quic_jesszhan@quicinc.com>
Subject: Re: [PATCH v2 09/10] drm/bridge: anx7625: update bridge_ops and sink detect logic
Date: Thu, 13 Mar 2025 12:14:04 +0530 [thread overview]
Message-ID: <2c10d5d2-a0bd-440d-b385-28ce3fea7d7c@quicinc.com> (raw)
In-Reply-To: <CALT56yP+UDF1YeotceqOevr_NTeGjDVw92NwtPDgRK6GvvkyHw@mail.gmail.com>
On 3/12/2025 4:33 PM, Dmitry Baryshkov wrote:
> On Wed, 12 Mar 2025 at 11:47, Ayushi Makhija <quic_amakhija@quicinc.com> wrote:
>>
>> On 3/11/2025 9:11 PM, Dmitry Baryshkov wrote:
>>> On Tue, Mar 11, 2025 at 05:54:44PM +0530, Ayushi Makhija wrote:
>>>> The anx7625_link_bridge() checks if a device is not a panel
>>>> bridge and add DRM_BRIDGE_OP_HPD and DRM_BRIDGE_OP_DETECT to
>>>> the bridge operations. However, on port 1 of the anx7625
>>>> bridge, any device added is always treated as a panel
>>>> bridge, preventing connector_detect function from being
>>>> called. To resolve this, instead of just checking if it is a
>>>> panel bridge, verify the type of panel bridge
>>>> whether it is a DisplayPort or eDP panel. If the panel
>>>> bridge is not of the eDP type, add DRM_BRIDGE_OP_HPD and
>>>> DRM_BRIDGE_OP_DETECT to the bridge operations.
>>>
>>> Are/were there any devices using anx7625, eDP panel _and_ not using the
>>> AUX bus? It would be better to use the precence of the 'aux' node to
>>> determine whether it is an eDP or a DP configuration.
>>>
>>>>
>>>> In the anx7625_sink_detect(), the device is checked to see
>>>> if it is a panel bridge, and it always sends a "connected"
>>>> status to the connector. When adding the DP port on port 1 of the
>>>> anx7625, it incorrectly treats it as a panel bridge and sends an
>>>> always "connected" status. Instead of checking the status on the
>>>> panel bridge, it's better to check the hpd_status for connectors
>>>> like DisplayPort. This way, it verifies the hpd_status variable
>>>> before sending the status to the connector.
>>>>
>>>> Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
>>>> ---
>>>> drivers/gpu/drm/bridge/analogix/anx7625.c | 10 ++++------
>>>> 1 file changed, 4 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
>>>> index 764da1c1dc11..ad99ad19653f 100644
>>>> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
>>>> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
>>>> @@ -1814,9 +1814,6 @@ static enum drm_connector_status anx7625_sink_detect(struct anx7625_data *ctx)
>>>>
>>>> DRM_DEV_DEBUG_DRIVER(dev, "sink detect\n");
>>>>
>>>> - if (ctx->pdata.panel_bridge)
>>>> - return connector_status_connected;
>>>> -
>>>> return ctx->hpd_status ? connector_status_connected :
>>>> connector_status_disconnected;
>>>> }
>>>> @@ -2608,9 +2605,10 @@ static int anx7625_link_bridge(struct drm_dp_aux *aux)
>>>> platform->bridge.of_node = dev->of_node;
>>>> if (!anx7625_of_panel_on_aux_bus(dev))
>>>> platform->bridge.ops |= DRM_BRIDGE_OP_EDID;
>>>> - if (!platform->pdata.panel_bridge)
>>>> - platform->bridge.ops |= DRM_BRIDGE_OP_HPD |
>>>> - DRM_BRIDGE_OP_DETECT;
>>>> + if (!platform->pdata.panel_bridge ||
>>>> + platform->pdata.panel_bridge->type != DRM_MODE_CONNECTOR_eDP) {
>>>> + platform->bridge.ops |= DRM_BRIDGE_OP_HPD | DRM_BRIDGE_OP_DETECT;
>>>> + }
>>
>> Hi Dmitry,
>>
>> Thanks, for the review.
>>
>> Yes, it is better to check the presence of the 'aux' node for eDP or DP configuration.
>> Will change it in next patch.
>>
>> - if (!platform->pdata.panel_bridge)
>> - platform->bridge.ops |= DRM_BRIDGE_OP_HPD |
>> - DRM_BRIDGE_OP_DETECT;
>> + if (!platform->pdata.panel_bridge || !anx7625_of_panel_on_aux_bus(dev)) {
>
> This is incorrect, if I'm not mistaken, please doublecheck it. I'd
> suggest following msm_dp_display_get_connector_type() (feel free to
> extract that to a helper function).
>
Hi Dmirty,
Thanks, for the review.
If we see definition of anx7625_of_panel_on_aux_bus() it is doing the same
thing as msm_dp_display_get_connector_type().
static bool anx7625_of_panel_on_aux_bus(struct device *dev)
{
struct device_node *bus, *panel;
bus = of_get_child_by_name(dev->of_node, "aux-bus");
// if aux-bus is not there it will return the false.
if (!bus)
return false;
panel = of_get_child_by_name(bus, "panel");
of_node_put(bus);
// if panel is not there it will return the false.
if (!panel)
return false;
of_node_put(panel);
return true;
}
Above function will return true in case of eDP and false in case of DP.
So we can use anx7625_of_panel_on_aux_bus() to check whether it
is DP or eDP configuration based on aux.
I don't think so we need extract msm_dp_display_get_connector_type() to check the eDP or DP configuration based on aux.
Let me know, if I am missing anything.
Thanks,
Ayushi
next prev parent reply other threads:[~2025-03-13 6:44 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 12:24 [PATCH v2 00/10] Add DSI display support for SA8775P target Ayushi Makhija
2025-03-11 12:24 ` [PATCH v2 01/10] dt-bindings: display: msm-dsi-phy-7nm: document the SA8775P DSI PHY Ayushi Makhija
2025-03-12 11:44 ` Krzysztof Kozlowski
2025-03-11 12:24 ` [PATCH v2 02/10] dt-bindings: msm: dsi-controller-main: document the SA8775P DSI CTRL Ayushi Makhija
2025-03-12 11:44 ` Krzysztof Kozlowski
2025-03-13 9:48 ` Ayushi Makhija
2025-03-11 12:24 ` [PATCH v2 03/10] dt-bindings: display: msm: document DSI controller and phy on SA8775P Ayushi Makhija
2025-03-11 15:36 ` Dmitry Baryshkov
2025-03-12 11:45 ` Krzysztof Kozlowski
2025-03-13 9:04 ` Ayushi Makhija
2025-04-08 10:38 ` Ayushi Makhija
2025-04-08 11:03 ` Krzysztof Kozlowski
2025-04-08 11:44 ` Dmitry Baryshkov
2025-04-08 18:42 ` Krzysztof Kozlowski
2025-04-08 20:26 ` Dmitry Baryshkov
2025-04-09 6:07 ` Krzysztof Kozlowski
2025-04-09 15:24 ` Dmitry Baryshkov
2025-04-10 6:08 ` Krzysztof Kozlowski
2025-04-10 9:16 ` Dmitry Baryshkov
2025-04-14 10:03 ` Ayushi Makhija
2025-03-11 12:24 ` [PATCH v2 04/10] drm/msm/dsi: add DSI PHY configuration " Ayushi Makhija
2025-03-11 15:37 ` Dmitry Baryshkov
2025-03-11 12:24 ` [PATCH v2 05/10] drm/msm/dsi: add DSI support for SA8775P Ayushi Makhija
2025-03-11 15:38 ` Dmitry Baryshkov
2025-03-11 12:24 ` [PATCH v2 06/10] arm64: dts: qcom: sa8775p: add Display Serial Interface device nodes Ayushi Makhija
2025-03-11 15:38 ` Dmitry Baryshkov
2025-03-11 12:24 ` [PATCH v2 07/10] arm64: dts: qcom: sa8775p-ride: add anx7625 DSI to DP bridge nodes Ayushi Makhija
2025-03-12 11:48 ` Krzysztof Kozlowski
2025-03-13 12:10 ` Ayushi Makhija
2025-03-28 9:43 ` Ayushi Makhija
2025-03-28 12:45 ` Dmitry Baryshkov
2025-03-28 14:22 ` Krzysztof Kozlowski
2025-03-28 19:45 ` Dmitry Baryshkov
2025-03-28 14:28 ` Krzysztof Kozlowski
2025-03-30 10:36 ` Dmitry Baryshkov
2025-04-03 9:48 ` Ayushi Makhija
2025-03-11 12:24 ` [PATCH v2 08/10] drm/bridge: anx7625: enable HPD interrupts Ayushi Makhija
2025-03-11 15:39 ` Dmitry Baryshkov
2025-03-20 21:06 ` Ayushi Makhija
2025-03-21 17:37 ` Dmitry Baryshkov
2025-03-11 12:24 ` [PATCH v2 09/10] drm/bridge: anx7625: update bridge_ops and sink detect logic Ayushi Makhija
2025-03-11 15:41 ` Dmitry Baryshkov
2025-03-12 9:47 ` Ayushi Makhija
2025-03-12 11:03 ` Dmitry Baryshkov
2025-03-13 6:44 ` Ayushi Makhija [this message]
2025-03-14 10:56 ` Dmitry Baryshkov
2025-03-11 12:24 ` [PATCH v2 10/10] drm/bridge: anx7625: change the gpiod_set_value API Ayushi Makhija
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=2c10d5d2-a0bd-440d-b385-28ce3fea7d7c@quicinc.com \
--to=quic_amakhija@quicinc.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=andersson@kernel.org \
--cc=andrzej.hajda@intel.com \
--cc=conor+dt@kernel.org \
--cc=dbaryshkov@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_jesszhan@quicinc.com \
--cc=quic_rajeevny@quicinc.com \
--cc=quic_vproddut@quicinc.com \
--cc=rfoss@kernel.org \
--cc=robdclark@gmail.com \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sean@poorly.run \
/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