drm/amd/display: make dm_dp_aux_transfer return payload bytes instead of size
authorShirish S <shirish.s@amd.com>
Fri, 23 Feb 2018 10:40:13 +0000 (16:10 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 28 Feb 2018 20:38:40 +0000 (15:38 -0500)
commitcc195141133ac3e767d930bedd8294ceebf1f10b
tree01a41c8eb736fb6ea9ef63d7998cb5cbcfd968ab
parent9f0178fb67699992d38601cb923b434f9986dd68
drm/amd/display: make dm_dp_aux_transfer return payload bytes instead of size

The drm layer expects aux->transfer() to return the payload bytes read.
Currently dm_dp_aux_transfer() returns the payload size which does not
gets updated during the read, hence not giving the right data for the
drm layer to pars edid. This leads to the drm layer to conclude as the
edid is BAD and hence some monitors/devices dont get detected properly.

This patch changes the return type of dm_dp_aux_transfer() to actual
bytes read during DP_AUX_NATIVE_READ & DP_AUX_I2C_READ.

Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.c
drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
drivers/gpu/drm/amd/display/dc/inc/dc_link_ddc.h