Re: [PATCH] drm/bridge: ps8640: Add software to support aux defer

From: Doug Anderson
Date: Thu Sep 29 2022 - 11:42:32 EST


Hi,

On Wed, Sep 28, 2022 at 6:29 PM Jason Yen
<jason.yen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> 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: Jason Yen <jason.yen@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
> ---
>
> drivers/gpu/drm/bridge/parade-ps8640.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
> index 31e88cb39f8a..967dec840b91 100644
> --- a/drivers/gpu/drm/bridge/parade-ps8640.c
> +++ b/drivers/gpu/drm/bridge/parade-ps8640.c
> @@ -303,6 +303,14 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
> case SWAUX_STATUS_ACKM:
> len = data & SWAUX_M_MASK;
> 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;

Overall this looks OK to me, but please send a v2 that removes the
line above that states:

/* Ignore the DEFER cases as they are already handled in hardware */

-Doug