<html><body><p>
<pre>
Hi, Liankun:
On Mon, 2024-09-30 at 17:17 +0800, Liankun Yang wrote:
> Returns the number of bytes transferred (1) on success.
> Check the return value to confirm that AUX communication is successful.
>
> Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
Fixes: d9e6ea02fc3f ("drm/mediatek: dp: Add MT8195 External DisplayPort support")
Regards,
CK
>
> Signed-off-by: Liankun Yang <liankun.yang@mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dp.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
> index d8796a904eca..3cab65345d1e 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dp.c
> @@ -2018,6 +2018,7 @@ static enum drm_connector_status mtk_dp_bdg_detect(struct drm_bridge *bridge)
> enum drm_connector_status ret = connector_status_disconnected;
> bool enabled = mtk_dp->enabled;
> u8 sink_count = 0;
> +size_t value;
>
> if (!mtk_dp->train_info.cable_plugged_in)
> return ret;
> @@ -2032,7 +2033,12 @@ static enum drm_connector_status mtk_dp_bdg_detect(struct drm_bridge *bridge)
> * function, we just need to check the HPD connection to check
> * whether we connect to a sink device.
> */
> -drm_dp_dpcd_readb(&mtk_dp->aux, DP_SINK_COUNT, &sink_count);
> +value = drm_dp_dpcd_readb(&mtk_dp->aux, DP_SINK_COUNT, &sink_count);
> +if (value < 0) {
> +drm_err(mtk_dp->drm_dev, "Failed to read DP Sink Count: %zd\n", value);
> +return ret;
> +}
> +
> if (DP_GET_SINK_COUNT(sink_count))
> ret = connector_status_connected;
>
</pre>
</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice
********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->