From: Lyude Paul <lyude@redhat.com>
To: Fangzhi Zuo <Jerry.Zuo@amd.com>, Daniel Vetter <daniel@ffwll.ch>,
Ville Syrjala <ville.syrjala@linux.intel.com>,
David Airlie <airlied@linux.ie>,
Alex Deucher <alexander.deucher@amd.com>,
Harry Wentland <harry.wentland@amd.com>,
Leo Li <sunpeng.li@amd.com>,
Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/dp: Avoid Reading DPCD_REV Before Native Aux Read
Date: Fri, 02 Sep 2022 17:35:00 -0400 [thread overview]
Message-ID: <cde7369a1d078249244759662989427b1f853bdd.camel@redhat.com> (raw)
In-Reply-To: <20220831221321.748264-1-Jerry.Zuo@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
On Wed, 2022-08-31 at 18:13 -0400, Fangzhi Zuo wrote:
> The attempt to read DPCD_REV before any native aux read breaks
> majority of DP2 compliance.
>
> The spec. requires DP_SINK_STATUS to be polled for the reset status
> DP_INTRA_HOP_AUX_REPLY_INDICATION during the clear training stage.
>
> Polling DP_SINK_STATUS each time gets DPCD_REV read first
> that makes non link training regsiter DPCD_REV get read
> during UHBR link training. It violates DP2 compliance.
>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Lyude Paul <lyude@redhat.com>
> Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com>
> ---
> drivers/gpu/drm/display/drm_dp_helper.c | 18 ------------------
> 1 file changed, 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
> index e7c22c2ca90c..c7aa5bafa667 100644
> --- a/drivers/gpu/drm/display/drm_dp_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> @@ -571,24 +571,6 @@ ssize_t drm_dp_dpcd_read(struct drm_dp_aux *aux, unsigned int offset,
> {
> int ret;
>
> - /*
> - * HP ZR24w corrupts the first DPCD access after entering power save
> - * mode. Eg. on a read, the entire buffer will be filled with the same
> - * byte. Do a throw away read to avoid corrupting anything we care
> - * about. Afterwards things will work correctly until the monitor
> - * gets woken up and subsequently re-enters power save mode.
> - *
> - * The user pressing any button on the monitor is enough to wake it
> - * up, so there is no particularly good place to do the workaround.
> - * We just have to do it before any DPCD access and hope that the
> - * monitor doesn't power down exactly after the throw away read.
> - */
> - if (!aux->is_remote) {
> - ret = drm_dp_dpcd_probe(aux, DP_DPCD_REV);
> - if (ret < 0)
> - return ret;
> - }
> -
> if (aux->is_remote)
> ret = drm_dp_mst_dpcd_read(aux, offset, buffer, size);
> else
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
prev parent reply other threads:[~2022-09-02 21:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 22:13 Fangzhi Zuo
2022-09-02 21:35 ` Lyude Paul [this message]
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=cde7369a1d078249244759662989427b1f853bdd.camel@redhat.com \
--to=lyude@redhat.com \
--cc=Jerry.Zuo@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sunpeng.li@amd.com \
--cc=ville.syrjala@linux.intel.com \
/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®