diff mbox series

[3/3] DRM: ingenic: Add support for panels with 8-bit serial bus

Message ID 20190627182114.27299-3-paul@crapouillou.net (mailing list archive)
State New, archived
Headers show
Series [1/3] DRM: ingenic: Use devm_platform_ioremap_resource | expand

Commit Message

Paul Cercueil June 27, 2019, 6:21 p.m. UTC
Add support for the LCD panels with a serial 8-bit bus, where the color
components of each 24-bit pixel are sent sequentially.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/gpu/drm/ingenic/ingenic-drm.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Sam Ravnborg June 30, 2019, 8:21 a.m. UTC | #1
On Thu, Jun 27, 2019 at 08:21:14PM +0200, Paul Cercueil wrote:
> Add support for the LCD panels with a serial 8-bit bus, where the color
> components of each 24-bit pixel are sent sequentially.

There are strange bus formats...

> 
> Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  drivers/gpu/drm/ingenic/ingenic-drm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
> index da966f3dc1f7..ce1fae3a78a9 100644
> --- a/drivers/gpu/drm/ingenic/ingenic-drm.c
> +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
> @@ -426,6 +426,9 @@ static void ingenic_drm_encoder_atomic_mode_set(struct drm_encoder *encoder,
>  			case MEDIA_BUS_FMT_RGB888_1X24:
>  				cfg |= JZ_LCD_CFG_MODE_GENERIC_24BIT;
>  				break;
> +			case MEDIA_BUS_FMT_RGB888_3X8:
> +				cfg |= JZ_LCD_CFG_MODE_8BIT_SERIAL;
> +				break;
>  			default:
>  				break;
>  			}
> @@ -451,6 +454,7 @@ static int ingenic_drm_encoder_atomic_check(struct drm_encoder *encoder,
>  	case MEDIA_BUS_FMT_RGB565_1X16:
>  	case MEDIA_BUS_FMT_RGB666_1X18:
>  	case MEDIA_BUS_FMT_RGB888_1X24:
> +	case MEDIA_BUS_FMT_RGB888_3X8:
>  		return 0;
>  	default:
>  		return -EINVAL;
> -- 
> 2.21.0.593.g511ec345e18
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
index da966f3dc1f7..ce1fae3a78a9 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -426,6 +426,9 @@  static void ingenic_drm_encoder_atomic_mode_set(struct drm_encoder *encoder,
 			case MEDIA_BUS_FMT_RGB888_1X24:
 				cfg |= JZ_LCD_CFG_MODE_GENERIC_24BIT;
 				break;
+			case MEDIA_BUS_FMT_RGB888_3X8:
+				cfg |= JZ_LCD_CFG_MODE_8BIT_SERIAL;
+				break;
 			default:
 				break;
 			}
@@ -451,6 +454,7 @@  static int ingenic_drm_encoder_atomic_check(struct drm_encoder *encoder,
 	case MEDIA_BUS_FMT_RGB565_1X16:
 	case MEDIA_BUS_FMT_RGB666_1X18:
 	case MEDIA_BUS_FMT_RGB888_1X24:
+	case MEDIA_BUS_FMT_RGB888_3X8:
 		return 0;
 	default:
 		return -EINVAL;