[PATCH 5/6] drm/bridge: tc358767: fix AUXDATAn registers access

Philipp Zabel p.zabel at pengutronix.de
Tue Aug 1 13:12:39 UTC 2017


On Thu, 2017-07-27 at 15:47 +0300, Andrey Gusakov wrote:
> First four bytes should go to DP0_AUXWDATA0. Due to bug if
> len > 4 first four bytes was writen to DP0_AUXWDATA1 and all
> data get shifted by 4 bytes. Fix it.
> 
> Signed-off-by: Andrey Gusakov <andrey.gusakov at cogentembedded.com>
> ---
>  drivers/gpu/drm/bridge/tc358767.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
> index c657a00af508..84b0b0fff854 100644
> --- a/drivers/gpu/drm/bridge/tc358767.c
> +++ b/drivers/gpu/drm/bridge/tc358767.c
> @@ -318,7 +318,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux,
>  				tmp = (tmp << 8) | buf[i];
>  			i++;
>  			if (((i % 4) == 0) || (i == size)) {
> -				tc_write(DP0_AUXWDATA(i >> 2), tmp);
> +				tc_write(DP0_AUXWDATA((i - 1) >> 2), tmp);
>  				tmp = 0;
>  			}
>  		}

Acked-by: Philipp Zabel <p.zabel at pengutronix.de>

regards
Philipp



More information about the dri-devel mailing list