[PATCH] drm/i2c/tda9950.c: set MAX_RETRIES for errors only

Gustavo Padovan gustavo at padovan.org
Thu Sep 13 09:26:07 UTC 2018


Hi Hans,

Thanks for the patch.

On Mon, Aug 27, 2018 at 02:28:50PM +0200, Hans Verkuil wrote:
> The CEC_TX_STATUS_MAX_RETRIES should be set for errors only to
> prevent the CEC framework from retrying the transmit. If the
> transmit was successful, then don't set this flag.
> 
> Found by running 'cec-compliance -A' on a beaglebone box.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil at cisco.com>
> ---
>  drivers/gpu/drm/i2c/tda9950.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/gpu/drm/i2c/tda9950.c
> index 5d2f0d548469..4a14fc3b5011 100644
> --- a/drivers/gpu/drm/i2c/tda9950.c
> +++ b/drivers/gpu/drm/i2c/tda9950.c
> @@ -191,7 +191,8 @@ static irqreturn_t tda9950_irq(int irq, void *data)
>  			break;
>  		}
>  		/* TDA9950 executes all retries for us */
> -		tx_status |= CEC_TX_STATUS_MAX_RETRIES;
> +		if (tx_status != CEC_TX_STATUS_OK)
> +			tx_status |= CEC_TX_STATUS_MAX_RETRIES;
>  		cec_transmit_done(priv->adap, tx_status, arb_lost_cnt,
>  				  nack_cnt, 0, err_cnt);
>  		break;

Reviewed-by: Gustavo Padovan <gustavo.padovan at collabora.com>

> -- 
> 2.18.0
> 
> 


More information about the dri-devel mailing list