diff mbox series

[5/5] omapdrm/dss/hdmi4_cec.c: don't set the retransmit count

Message ID 20181004090900.32915-6-hverkuil@xs4all.nl (mailing list archive)
State New, archived
Headers show
Series cec/adv/omap: fixes and new status flags | expand

Commit Message

Hans Verkuil Oct. 4, 2018, 9:09 a.m. UTC
From: Hans Verkuil <hans.verkuil@cisco.com>

The HDMI_CEC_DBG_3 register does have a retransmit count, but you
can't write to it, those bits are read-only.

So drop the attempt to set the retransmit count, since it doesn't
work.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Tomi Valkeinen Oct. 8, 2018, 12:47 p.m. UTC | #1
On 04/10/18 12:09, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> The HDMI_CEC_DBG_3 register does have a retransmit count, but you
> can't write to it, those bits are read-only.
> 
> So drop the attempt to set the retransmit count, since it doesn't
> work.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
>  drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> index dee66a5101b5..00407f1995a8 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> @@ -280,9 +280,6 @@ static int hdmi_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
>  	hdmi_write_reg(core->base, HDMI_CEC_INT_STATUS_1,
>  		       HDMI_CEC_RETRANSMIT_CNT_INT_MASK);
>  
> -	/* Set the retry count */
> -	REG_FLD_MOD(core->base, HDMI_CEC_DBG_3, attempts - 1, 6, 4);
> -

I presume there's no harm in having a different retry count in the HW
than what was requested via the API?

Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi
Hans Verkuil Oct. 8, 2018, 1:01 p.m. UTC | #2
On 10/08/2018 02:47 PM, Tomi Valkeinen wrote:
> On 04/10/18 12:09, Hans Verkuil wrote:
>> From: Hans Verkuil <hans.verkuil@cisco.com>
>>
>> The HDMI_CEC_DBG_3 register does have a retransmit count, but you
>> can't write to it, those bits are read-only.
>>
>> So drop the attempt to set the retransmit count, since it doesn't
>> work.
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>> ---
>>  drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 3 ---
>>  1 file changed, 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
>> index dee66a5101b5..00407f1995a8 100644
>> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
>> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
>> @@ -280,9 +280,6 @@ static int hdmi_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
>>  	hdmi_write_reg(core->base, HDMI_CEC_INT_STATUS_1,
>>  		       HDMI_CEC_RETRANSMIT_CNT_INT_MASK);
>>  
>> -	/* Set the retry count */
>> -	REG_FLD_MOD(core->base, HDMI_CEC_DBG_3, attempts - 1, 6, 4);
>> -
> 
> I presume there's no harm in having a different retry count in the HW
> than what was requested via the API?

Correct.

Some CEC HW implementations expect that the software calculates the retry count,
but the omap4 does this in hardware (not quite optimally, I'm afraid) and those
just ignore the argument.

Regards,

	Hans

> 
> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> 
>  Tomi
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
index dee66a5101b5..00407f1995a8 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
@@ -280,9 +280,6 @@  static int hdmi_cec_adap_transmit(struct cec_adapter *adap, u8 attempts,
 	hdmi_write_reg(core->base, HDMI_CEC_INT_STATUS_1,
 		       HDMI_CEC_RETRANSMIT_CNT_INT_MASK);
 
-	/* Set the retry count */
-	REG_FLD_MOD(core->base, HDMI_CEC_DBG_3, attempts - 1, 6, 4);
-
 	/* Set the initiator addresses */
 	hdmi_write_reg(core->base, HDMI_CEC_TX_INIT, cec_msg_initiator(msg));