FROMGIT: 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 <>
Reviewed-by: Harry Wentland <>
(cherry picked from commit a92adb0c81ccf2a2a317d226c84ac26f4c3c7157
git:// branch:amd-staging-drm-next

TEST=boot on kahlee,
     verified display_ServerChameleonConnection & display_EdidStress pass
     with DP connector.

 [shirish.s]fix trivial rebase conflicts.

Change-Id: I3e3edcb411031e67292ca36f17561d565083d6e8
Commit-Ready: Shirish S <>
Tested-by: Shirish S <>
Reviewed-by: Drew Davenport <>
5 files changed