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 <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: CK Hu <[email protected]> Link: https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/ Signed-off-by: Chun-Kuang Hu <[email protected]>
1 parent 499eb51 commit 8431fff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)