linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i2c/tda9950.c: set MAX_RETRIES for errors only
@ 2018-08-27 12:28 Hans Verkuil
  2018-09-13  9:26 ` Gustavo Padovan
  2018-09-20 16:09 ` Russell King - ARM Linux
  0 siblings, 2 replies; 3+ messages in thread
From: Hans Verkuil @ 2018-08-27 12:28 UTC (permalink / raw)
  To: Linux Media Mailing List, dri-devel; +Cc: Russell King - ARM Linux

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@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;
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i2c/tda9950.c: set MAX_RETRIES for errors only
  2018-08-27 12:28 [PATCH] drm/i2c/tda9950.c: set MAX_RETRIES for errors only Hans Verkuil
@ 2018-09-13  9:26 ` Gustavo Padovan
  2018-09-20 16:09 ` Russell King - ARM Linux
  1 sibling, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2018-09-13  9:26 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Linux Media Mailing List, dri-devel, Russell King - ARM Linux

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@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@collabora.com>

> -- 
> 2.18.0
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i2c/tda9950.c: set MAX_RETRIES for errors only
  2018-08-27 12:28 [PATCH] drm/i2c/tda9950.c: set MAX_RETRIES for errors only Hans Verkuil
  2018-09-13  9:26 ` Gustavo Padovan
@ 2018-09-20 16:09 ` Russell King - ARM Linux
  1 sibling, 0 replies; 3+ messages in thread
From: Russell King - ARM Linux @ 2018-09-20 16:09 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List, dri-devel

Hi Hans,

Patch merged, thanks.

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@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;
> -- 
> 2.18.0
> 
> 

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 13.8Mbps down 630kbps up
According to speedtest.net: 13Mbps down 490kbps up

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-20 21:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-27 12:28 [PATCH] drm/i2c/tda9950.c: set MAX_RETRIES for errors only Hans Verkuil
2018-09-13  9:26 ` Gustavo Padovan
2018-09-20 16:09 ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).