Skip to content

Commit 8431fff

Browse files
Wojciech MacekChun-Kuang Hu
authored andcommitted
drm/mediatek: dp: Fix mtk_dp_aux_transfer return value
In case there is no DP device attached to the port the transfer function should return IO error, similar to what other drivers do. In case EAGAIN is returned then any read from /dev/drm_dp_aux device ends up in an infinite loop as the upper layers constantly repeats the transfer request. Fixes: f70ac09 ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") Signed-off-by: Wojciech Macek <wmacek@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Link: https://patchwork.kernel.org/project/dri-devel/patch/20240417103819.990512-1-wmacek@chromium.org/ Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
1 parent 499eb51 commit 8431fff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/mediatek/mtk_dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,7 @@ static ssize_t mtk_dp_aux_transfer(struct drm_dp_aux *mtk_aux,
21042104

21052105
if (mtk_dp->bridge.type != DRM_MODE_CONNECTOR_eDP &&
21062106
!mtk_dp->train_info.cable_plugged_in) {
2107-
ret = -EAGAIN;
2107+
ret = -EIO;
21082108
goto err;
21092109
}
21102110

0 commit comments

Comments
 (0)