drm/sun4i: frontend: Add support for the BGRX8888 output format
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fri, 23 Nov 2018 09:24:54 +0000 (10:24 +0100)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 27 Nov 2018 09:04:11 +0000 (10:04 +0100)
This introduces support for the BGRX8888 output format for the frontend,
with its associated output format value definition.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-23-paul.kocialkowski@bootlin.com
drivers/gpu/drm/sun4i/sun4i_frontend.c
drivers/gpu/drm/sun4i/sun4i_frontend.h

index 72e0f1b1624bd19d07fdfc38615c82ac2d8db5b3..5d765764bff9271bdcbeb9c568a3851b1584d866 100644 (file)
@@ -145,6 +145,10 @@ static int sun4i_frontend_drm_format_to_input_sequence(uint32_t fmt, u32 *val)
 static int sun4i_frontend_drm_format_to_output_fmt(uint32_t fmt, u32 *val)
 {
        switch (fmt) {
+       case DRM_FORMAT_BGRX8888:
+               *val = SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_BGRX8888;
+               return 0;
+
        case DRM_FORMAT_XRGB8888:
                *val = SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_XRGB8888;
                return 0;
index 2ee1bccf378a2b63aff7ec663cafee2d9d5e36df..800a193eebc255495e28ff9e91e2cc46c47362c3 100644 (file)
@@ -32,6 +32,7 @@
 #define SUN4I_FRONTEND_INPUT_FMT_DATA_PS_XRGB          1
 
 #define SUN4I_FRONTEND_OUTPUT_FMT_REG          0x05c
+#define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_BGRX8888    1
 #define SUN4I_FRONTEND_OUTPUT_FMT_DATA_FMT_XRGB8888    2
 
 #define SUN4I_FRONTEND_CH0_INSIZE_REG          0x100