[RFC 6/6] drm/exynos: mixer: add more pixel formats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The mixer natively support RGB565, ARGB4444 and ARGB1555
so expose these formats. Also, since being of 16-bit size,
these formats have a lower bandwidth requirement, making
them useful in situations where this is a bottleneck.

Signed-off-by: Tobias Jakobi <tjakobi@xxxxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/exynos/exynos_mixer.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
index 512f7b3..7dec7c7 100644
--- a/drivers/gpu/drm/exynos/exynos_mixer.c
+++ b/drivers/gpu/drm/exynos/exynos_mixer.c
@@ -127,6 +127,11 @@ static const u8 filter_cr_horiz_tap4[] = {
 static const uint32_t mixer_formats[] = {
 	DRM_FORMAT_XRGB8888,
 	DRM_FORMAT_ARGB8888,
+	DRM_FORMAT_RGB565,
+	DRM_FORMAT_XRGB1555,
+	DRM_FORMAT_ARGB1555,
+	DRM_FORMAT_XRGB4444,
+	DRM_FORMAT_ARGB4444,
 };
 
 static const uint32_t vp_formats[] = {
@@ -556,30 +561,32 @@ static void mixer_graph_buffer(struct mixer_context *ctx, int win)
 	unsigned int x_ratio = 0, y_ratio = 0;
 	unsigned int src_x_offset, src_y_offset, dst_x_offset, dst_y_offset;
 	dma_addr_t dma_addr;
-	unsigned int fmt, blend;
+	unsigned int fmt, blend = 0;
 	u32 val;
 
 	plane = &ctx->planes[win];
 
 	switch (plane->pixel_format) {
 	case DRM_FORMAT_ARGB4444:
-		fmt = MIXER_PIXELFORMAT_ARGB4444;
 		blend = 1;
+	case DRM_FORMAT_XRGB4444:
+		fmt = MIXER_PIXELFORMAT_ARGB4444;
 		break;
 
 	case DRM_FORMAT_ARGB8888:
-		fmt = MIXER_PIXELFORMAT_ARGB8888;
 		blend = 1;
-		break;
-
 	case DRM_FORMAT_XRGB8888:
 		fmt = MIXER_PIXELFORMAT_ARGB8888;
-		blend = 0;
+		break;
+
+	case DRM_FORMAT_ARGB1555:
+		blend = 1;
+	case DRM_FORMAT_XRGB1555:
+		fmt = MIXER_PIXELFORMAT_ARGB1555;
 		break;
 
 	case DRM_FORMAT_RGB565:
 		fmt = MIXER_PIXELFORMAT_RGB565;
-		blend = 0;
 		break;
 
 	default:
-- 
2.0.5

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux