[PATCH 40/54] drm/amd/display: Read AUX channel even if only status byte is returned
Harry Wentland
harry.wentland at amd.com
Tue Jul 10 00:37:18 UTC 2018
From: "Leo (Sunpeng) Li" <sunpeng.li at amd.com>
[Why]
get_channel_status() can return 0 in returned_bytes, and report a
successful operation result. This is because it prunes the first status
byte out. This was preventing read_channel_reply() from being called
(due to the faulty condition), and consequently preventing the AUX
reply status from being set.
[How]
Fix the conditional so that it accounts for when get_channel_status()
returns 0 bytes read.
[Fixes]
Fixes possible edid read failures during S3 resume, where we are now
relying on DRM's DP AUX handling. This was an regression introduced by:
Author: Harry Wentland <harry.wentland at amd.com>
drm/amd/display: Return aux replies directly to DRM
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li at amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland at amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
index d108ccfc5cf9..08c9d73b9ab7 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
@@ -671,7 +671,7 @@ int dc_link_aux_transfer(struct ddc_service *ddc,
case AUX_CHANNEL_OPERATION_SUCCEEDED:
res = returned_bytes;
- if (res <= size && res > 0)
+ if (res <= size && res >= 0)
res = engine->funcs->read_channel_reply(engine, size,
buffer, reply,
&status);
--
2.17.1
More information about the amd-gfx
mailing list