mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Douglas Anderson <dianders@chromium.org>,
	Rob Clark <robdclark@gmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Bjorn Andersson <quic_bjorande@quicinc.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
	Guenter Roeck <groeck@chromium.org>,
	Kuogee Hsieh <quic_khsieh@quicinc.com>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Sean Paul <sean@poorly.run>, Stephen Boyd <swboyd@chromium.org>,
	Vara Reddy <quic_varar@quicinc.com>,
	<dri-devel@lists.freedesktop.org>,
	<freedreno@lists.freedesktop.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/4] drm/msm/dp: Avoid a long timeout for AUX transfer if nothing connected
Date: Mon, 18 Mar 2024 11:16:45 -0700	[thread overview]
Message-ID: <ab9161d5-1cb9-4929-9f34-a7371832fea4@quicinc.com> (raw)
In-Reply-To: <20240315143621.v2.1.I16aff881c9fe82b5e0fc06ca312da017aa7b5b3e@changeid>



On 3/15/2024 2:36 PM, Douglas Anderson wrote:
> As documented in the description of the transfer() function of
> "struct drm_dp_aux", the transfer() function can be called at any time
> regardless of the state of the DP port. Specifically if the kernel has
> the DP AUX character device enabled and userspace accesses
> "/dev/drm_dp_auxN" directly then the AUX transfer function will be
> called regardless of whether a DP device is connected.
> 
> For eDP panels we have a special rule where we wait (with a 5 second
> timeout) for HPD to go high. This rule was important before all panels
> drivers were converted to call wait_hpd_asserted() and actually can be
> removed in a future commit.
> 
> For external DP devices we never checked for HPD. That means that
> trying to access the DP AUX character device (AKA `hexdump -C
> /dev/drm_dp_auxN`) would very, very slowly timeout. Specifically on my
> system:
>    $ time hexdump -C /dev/drm_dp_aux0
>    hexdump: /dev/drm_dp_aux0: Connection timed out
>    real    0m8.200s
> We want access to the drm_dp_auxN character device to fail faster than
> 8 seconds when no DP cable is plugged in.
> 
> Let's add a test to make transfers fail right away if a device isn't
> plugged in. Rather than testing the HPD line directly, we have the
> dp_display module tell us when AUX transfers should be enabled so we
> can handle cases where HPD is signaled out of band like with Type C.
> 
> Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support")
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> Changes in v2:
> - Don't look at the HPD line directly; have dp_display call us.
> 
>   drivers/gpu/drm/msm/dp/dp_aux.c     | 20 ++++++++++++++++++++
>   drivers/gpu/drm/msm/dp/dp_aux.h     |  1 +
>   drivers/gpu/drm/msm/dp/dp_display.c |  4 ++++
>   3 files changed, 25 insertions(+)
> 

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

  parent reply	other threads:[~2024-03-18 18:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 21:36 [PATCH v2 0/4] drm/msm/dp: Improve DP AUX transfer vs. HPD interactions Douglas Anderson
2024-03-15 21:36 ` [PATCH v2 1/4] drm/msm/dp: Avoid a long timeout for AUX transfer if nothing connected Douglas Anderson
2024-03-15 22:19   ` Guenter Roeck
2024-03-18 18:16   ` Abhinav Kumar [this message]
2024-03-15 21:36 ` [PATCH v2 2/4] drm/msm/dp: Account for the timeout in wait_hpd_asserted() callback Douglas Anderson
2024-03-18 18:18   ` Abhinav Kumar
2024-03-15 21:36 ` [PATCH v2 3/4] drm/msm/dp: Delete the old 500 ms wait for eDP HPD in aux transfer Douglas Anderson
2024-03-19  0:19   ` Abhinav Kumar
2024-03-19  0:55     ` Dmitry Baryshkov
2024-03-19 17:13       ` Abhinav Kumar
2024-03-19 17:27         ` Dmitry Baryshkov
2024-03-19 18:15           ` Doug Anderson
2024-03-19 18:27             ` Abhinav Kumar
2024-03-15 21:36 ` [PATCH v2 4/4] drm/msm/dp: Fix typo in static function (ststus => status) Douglas Anderson
2024-03-18 19:26   ` Stephen Boyd
2024-03-18 19:37     ` Doug Anderson
2024-03-19  0:22       ` 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=ab9161d5-1cb9-4929-9f34-a7371832fea4@quicinc.com \
    --to=quic_abhinavk@quicinc.com \
    --cc=airlied@gmail.com \
    --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=groeck@chromium.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_bjorande@quicinc.com \
    --cc=quic_khsieh@quicinc.com \
    --cc=quic_varar@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

all inboxes | Powered by JetHome®