Commit 562d2dd8 authored by Jason Yen's avatar Jason Yen Committed by Douglas Anderson

drm/bridge: ps8640: Add software to support aux defer

This chip can not handle aux defer if the host directly program
its aux registers to access edid/dpcd. So we need let software
to handle the aux defer situation.
Signed-off-by: default avatarJason Yen <jason.yen@paradetech.corp-partner.google.com>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220930042506.2529522-1-jason.yen@paradetech.corp-partner.google.com
parent 65b698bf
...@@ -286,7 +286,6 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux, ...@@ -286,7 +286,6 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
} }
switch (data & SWAUX_STATUS_MASK) { switch (data & SWAUX_STATUS_MASK) {
/* Ignore the DEFER cases as they are already handled in hardware */
case SWAUX_STATUS_NACK: case SWAUX_STATUS_NACK:
case SWAUX_STATUS_I2C_NACK: case SWAUX_STATUS_I2C_NACK:
/* /*
...@@ -303,6 +302,14 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux, ...@@ -303,6 +302,14 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
case SWAUX_STATUS_ACKM: case SWAUX_STATUS_ACKM:
len = data & SWAUX_M_MASK; len = data & SWAUX_M_MASK;
break; break;
case SWAUX_STATUS_DEFER:
case SWAUX_STATUS_I2C_DEFER:
if (is_native_aux)
msg->reply |= DP_AUX_NATIVE_REPLY_DEFER;
else
msg->reply |= DP_AUX_I2C_REPLY_DEFER;
len = data & SWAUX_M_MASK;
break;
case SWAUX_STATUS_INVALID: case SWAUX_STATUS_INVALID:
return -EOPNOTSUPP; return -EOPNOTSUPP;
case SWAUX_STATUS_TIMEOUT: case SWAUX_STATUS_TIMEOUT:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment