Commit 2a98bad7 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Thomas Zimmermann

drm: shmobile: Add support for DRM_FORMAT_XRGB8888

DRM_FORMAT_XRGB8888 aka XR24 is the modus francus of DRM, and should be
supported by all drivers.

The handling for DRM_FORMAT_XRGB8888 is similar to DRM_FORMAT_ARGB8888,
just ignore the alpha channel.
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/888cde6d1f70f1610931c4a89801060bb6765ff2.1684854992.git.geert+renesas@glider.be
parent d92b057f
...@@ -232,6 +232,7 @@ static void shmob_drm_crtc_start(struct shmob_drm_crtc *scrtc) ...@@ -232,6 +232,7 @@ static void shmob_drm_crtc_start(struct shmob_drm_crtc *scrtc)
value = LDDDSR_LS | LDDDSR_WS | LDDDSR_BS; value = LDDDSR_LS | LDDDSR_WS | LDDDSR_BS;
break; break;
case DRM_FORMAT_ARGB8888: case DRM_FORMAT_ARGB8888:
case DRM_FORMAT_XRGB8888:
default: default:
value = LDDDSR_LS; value = LDDDSR_LS;
break; break;
......
...@@ -39,6 +39,11 @@ static const struct shmob_drm_format_info shmob_drm_format_infos[] = { ...@@ -39,6 +39,11 @@ static const struct shmob_drm_format_info shmob_drm_format_infos[] = {
.bpp = 32, .bpp = 32,
.yuv = false, .yuv = false,
.lddfr = LDDFR_PKF_ARGB32, .lddfr = LDDFR_PKF_ARGB32,
}, {
.fourcc = DRM_FORMAT_XRGB8888,
.bpp = 32,
.yuv = false,
.lddfr = LDDFR_PKF_ARGB32,
}, { }, {
.fourcc = DRM_FORMAT_NV12, .fourcc = DRM_FORMAT_NV12,
.bpp = 12, .bpp = 12,
......
...@@ -80,6 +80,7 @@ static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane, ...@@ -80,6 +80,7 @@ static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane,
format |= LDBBSIFR_SWPL | LDBBSIFR_SWPW | LDBBSIFR_SWPB; format |= LDBBSIFR_SWPL | LDBBSIFR_SWPW | LDBBSIFR_SWPB;
break; break;
case DRM_FORMAT_ARGB8888: case DRM_FORMAT_ARGB8888:
case DRM_FORMAT_XRGB8888:
default: default:
format |= LDBBSIFR_SWPL; format |= LDBBSIFR_SWPL;
break; break;
...@@ -95,6 +96,9 @@ static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane, ...@@ -95,6 +96,9 @@ static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane,
case DRM_FORMAT_ARGB8888: case DRM_FORMAT_ARGB8888:
format |= LDBBSIFR_AL_PK | LDBBSIFR_RY | LDDFR_PKF_ARGB32; format |= LDBBSIFR_AL_PK | LDBBSIFR_RY | LDDFR_PKF_ARGB32;
break; break;
case DRM_FORMAT_XRGB8888:
format |= LDBBSIFR_AL_1 | LDBBSIFR_RY | LDDFR_PKF_ARGB32;
break;
case DRM_FORMAT_NV12: case DRM_FORMAT_NV12:
case DRM_FORMAT_NV21: case DRM_FORMAT_NV21:
format |= LDBBSIFR_AL_1 | LDBBSIFR_CHRR_420; format |= LDBBSIFR_AL_1 | LDBBSIFR_CHRR_420;
...@@ -231,6 +235,7 @@ static const uint32_t formats[] = { ...@@ -231,6 +235,7 @@ static const uint32_t formats[] = {
DRM_FORMAT_RGB565, DRM_FORMAT_RGB565,
DRM_FORMAT_RGB888, DRM_FORMAT_RGB888,
DRM_FORMAT_ARGB8888, DRM_FORMAT_ARGB8888,
DRM_FORMAT_XRGB8888,
DRM_FORMAT_NV12, DRM_FORMAT_NV12,
DRM_FORMAT_NV21, DRM_FORMAT_NV21,
DRM_FORMAT_NV16, DRM_FORMAT_NV16,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment