From: Jani Nikula <jani.nikula@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Lyude Paul <lyude@redhat.com>
Subject: Re: [PATCH 1/2] drm/dp_mst: Fix GUID DPCD write to non-root MST branch devices
Date: Tue, 01 Apr 2025 17:43:13 +0300 [thread overview]
Message-ID: <87ikno2b9a.fsf@intel.com> (raw)
In-Reply-To: <20250401103846.686408-1-imre.deak@intel.com>
On Tue, 01 Apr 2025, Imre Deak <imre.deak@intel.com> wrote:
> The return value on success of drm_dp_send_dpcd_write() called for
> non-root MST branch devices from drm_dp_check_mstb_guid() is the number
> of bytes transferred. Atm this return value (in case of a complete read)
> will be regarded incorrectly as an error by the caller of
> drm_dp_check_mstb_guid(). Fix this by converting the return value for a
> complete read to the expected success code (0) and for a partial read to
> a failure code (-EPROTO).
>
> Fixes: 2554da0de3e8 ("drm/display: dp-mst-topology: use new DCPD access helpers")
> Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> Cc: Lyude Paul <lyude@redhat.com>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/display/drm_dp_mst_topology.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index de3fc6090c906..619f461e02f76 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -2200,6 +2200,8 @@ static int drm_dp_check_mstb_guid(struct drm_dp_mst_branch *mstb, guid_t *guid)
> ret = drm_dp_send_dpcd_write(mstb->mgr,
> mstb->port_parent,
> DP_GUID, sizeof(buf), buf);
> + if (ret >= 0)
> + ret = ret == sizeof(buf) ? 0 : -EPROTO;
> } else {
> ret = drm_dp_dpcd_write_data(mstb->mgr->aux,
> DP_GUID, buf, sizeof(buf));
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-04-01 14:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 10:38 [PATCH 1/2] drm/dp_mst: Fix GUID DPCD write to non-root MST branch devices Imre Deak
2025-04-01 10:38 ` [PATCH 2/2] drm/dp_mst: Use drm_dp_dpcd_write_data() to write GUID for " Imre Deak
2025-04-01 10:43 ` ✓ CI.Patch_applied: success for series starting with [1/2] drm/dp_mst: Fix GUID DPCD write to " Patchwork
2025-04-01 10:43 ` ✓ CI.checkpatch: " Patchwork
2025-04-01 10:44 ` ✓ CI.KUnit: " Patchwork
2025-04-01 11:01 ` ✓ CI.Build: " Patchwork
2025-04-01 11:03 ` ✓ CI.Hooks: " Patchwork
2025-04-01 11:05 ` ✓ CI.checksparse: " Patchwork
2025-04-01 11:40 ` ✓ Xe.CI.BAT: " Patchwork
2025-04-01 11:46 ` ✓ i915.CI.BAT: " Patchwork
2025-04-01 13:54 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-01 14:43 ` Jani Nikula [this message]
2025-04-01 15:47 ` ✗ i915.CI.Full: " Patchwork
2025-04-03 18:49 ` Imre Deak
2025-04-02 21:13 ` [PATCH 1/2] " Lyude Paul
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=87ikno2b9a.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=lyude@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.