diff mbox series

[v2,2/5] drm: bridge: dw_hdmi: default enable workaround to clear the overflow

Message ID 39592fee39610c544058e6b8f9af4b4ea8dc4cdc.1649412256.git.Sandor.yu@nxp.com (mailing list archive)
State New, archived
Headers show
Series DRM: Bridge: DW_HDMI: Add new features and bug fix | expand

Commit Message

Sandor Yu April 8, 2022, 10:32 a.m. UTC
i.MX8MPlus (v2.13a) has verified need the workaround to clear the
overflow with one iteration.
Only i.MX6Q(v1.30a) need the workaround with 4 iterations,
the others versions later than v1.3a have been identified as needing
the workaround with a single iteration.

Default enable the workaround with one iteration for all versions
later than v1.30a.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 23 +++++++----------------
 1 file changed, 7 insertions(+), 16 deletions(-)

Comments

Neil Armstrong April 8, 2022, 12:20 p.m. UTC | #1
On 08/04/2022 12:32, Sandor Yu wrote:
> i.MX8MPlus (v2.13a) has verified need the workaround to clear the
> overflow with one iteration.
> Only i.MX6Q(v1.30a) need the workaround with 4 iterations,
> the others versions later than v1.3a have been identified as needing
> the workaround with a single iteration.
> 
> Default enable the workaround with one iteration for all versions
> later than v1.30a.
> 
> Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
> ---
>   drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 23 +++++++----------------
>   1 file changed, 7 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 4befc104d220..02d8f7e08814 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2086,30 +2086,21 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
>   	 * then write one of the FC registers several times.
>   	 *
>   	 * The number of iterations matters and depends on the HDMI TX revision
> -	 * (and possibly on the platform). So far i.MX6Q (v1.30a), i.MX6DL
> -	 * (v1.31a) and multiple Allwinner SoCs (v1.32a) have been identified
> -	 * as needing the workaround, with 4 iterations for v1.30a and 1
> -	 * iteration for others.
> -	 * The Amlogic Meson GX SoCs (v2.01a) have been identified as needing
> -	 * the workaround with a single iteration.
> -	 * The Rockchip RK3288 SoC (v2.00a) and RK3328/RK3399 SoCs (v2.11a) have
> -	 * been identified as needing the workaround with a single iteration.
> +	 * (and possibly on the platform).
> +	 * 4 iterations for i.MX6Q(v1.30a) and 1 iteration for others.
> +	 * i.MX6DL (v1.31a), Allwinner SoCs (v1.32a), Rockchip RK3288 SoC (v2.00a),
> +	 * Amlogic Meson GX SoCs (v2.01a), RK3328/RK3399 SoCs (v2.11a)
> +	 * and i.MX8MPlus (v2.13a) have been identified as needing the workaround
> +	 * with a single iteration.
>   	 */
>   
>   	switch (hdmi->version) {
>   	case 0x130a:
>   		count = 4;
>   		break;
> -	case 0x131a:
> -	case 0x132a:
> -	case 0x200a:
> -	case 0x201a:
> -	case 0x211a:
> -	case 0x212a:
> +	default:
>   		count = 1;
>   		break;
> -	default:
> -		return;
>   	}
>   
>   	/* TMDS software reset */

Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Jernej Škrabec April 10, 2022, 10:20 a.m. UTC | #2
Dne petek, 08. april 2022 ob 12:32:25 CEST je Sandor Yu napisal(a):
> i.MX8MPlus (v2.13a) has verified need the workaround to clear the
> overflow with one iteration.
> Only i.MX6Q(v1.30a) need the workaround with 4 iterations,
> the others versions later than v1.3a have been identified as needing
> the workaround with a single iteration.
> 
> Default enable the workaround with one iteration for all versions
> later than v1.30a.
> 
> Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 23 +++++++----------------
>  1 file changed, 7 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index
> 4befc104d220..02d8f7e08814 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2086,30 +2086,21 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi
> *hdmi) * then write one of the FC registers several times.
>  	 *
>  	 * The number of iterations matters and depends on the HDMI TX 
revision
> -	 * (and possibly on the platform). So far i.MX6Q (v1.30a), i.MX6DL
> -	 * (v1.31a) and multiple Allwinner SoCs (v1.32a) have been 
identified
> -	 * as needing the workaround, with 4 iterations for v1.30a and 1
> -	 * iteration for others.
> -	 * The Amlogic Meson GX SoCs (v2.01a) have been identified as 
needing
> -	 * the workaround with a single iteration.
> -	 * The Rockchip RK3288 SoC (v2.00a) and RK3328/RK3399 SoCs 
(v2.11a) have
> -	 * been identified as needing the workaround with a single 
iteration.
> +	 * (and possibly on the platform).
> +	 * 4 iterations for i.MX6Q(v1.30a) and 1 iteration for others.
> +	 * i.MX6DL (v1.31a), Allwinner SoCs (v1.32a), Rockchip RK3288 SoC
> (v2.00a), +	 * Amlogic Meson GX SoCs (v2.01a), RK3328/RK3399 SoCs (v2.11a)
> +	 * and i.MX8MPlus (v2.13a) have been identified as needing the 
workaround
> +	 * with a single iteration.
>  	 */

It would be easier to read and modify later if platforms/controllers/variants 
are given as list, one per line, but it could be done later.

Best regards,
Jernej

> 
>  	switch (hdmi->version) {
>  	case 0x130a:
>  		count = 4;
>  		break;
> -	case 0x131a:
> -	case 0x132a:
> -	case 0x200a:
> -	case 0x201a:
> -	case 0x211a:
> -	case 0x212a:
> +	default:
>  		count = 1;
>  		break;
> -	default:
> -		return;
>  	}
> 
>  	/* TMDS software reset */
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 4befc104d220..02d8f7e08814 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2086,30 +2086,21 @@  static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
 	 * then write one of the FC registers several times.
 	 *
 	 * The number of iterations matters and depends on the HDMI TX revision
-	 * (and possibly on the platform). So far i.MX6Q (v1.30a), i.MX6DL
-	 * (v1.31a) and multiple Allwinner SoCs (v1.32a) have been identified
-	 * as needing the workaround, with 4 iterations for v1.30a and 1
-	 * iteration for others.
-	 * The Amlogic Meson GX SoCs (v2.01a) have been identified as needing
-	 * the workaround with a single iteration.
-	 * The Rockchip RK3288 SoC (v2.00a) and RK3328/RK3399 SoCs (v2.11a) have
-	 * been identified as needing the workaround with a single iteration.
+	 * (and possibly on the platform).
+	 * 4 iterations for i.MX6Q(v1.30a) and 1 iteration for others.
+	 * i.MX6DL (v1.31a), Allwinner SoCs (v1.32a), Rockchip RK3288 SoC (v2.00a),
+	 * Amlogic Meson GX SoCs (v2.01a), RK3328/RK3399 SoCs (v2.11a)
+	 * and i.MX8MPlus (v2.13a) have been identified as needing the workaround
+	 * with a single iteration.
 	 */
 
 	switch (hdmi->version) {
 	case 0x130a:
 		count = 4;
 		break;
-	case 0x131a:
-	case 0x132a:
-	case 0x200a:
-	case 0x201a:
-	case 0x211a:
-	case 0x212a:
+	default:
 		count = 1;
 		break;
-	default:
-		return;
 	}
 
 	/* TMDS software reset */