[PATCH 6/9] gpu: ipu-cpmem: Add missing YVU422 case to ipu_cpmem_set_yuv_planar

Philipp Zabel p.zabel at pengutronix.de
Tue Oct 18 16:07:54 UTC 2016


ipu_cpmem_set_fmt is already prepared to handle DRM_FORMAT_YVU422.

Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
---
 drivers/gpu/ipu-v3/ipu-cpmem.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c
index fcb7dc8..e6b8bae 100644
--- a/drivers/gpu/ipu-v3/ipu-cpmem.c
+++ b/drivers/gpu/ipu-v3/ipu-cpmem.c
@@ -440,6 +440,11 @@ void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch,
 		u_offset = stride * height;
 		v_offset = u_offset + (uv_stride * height);
 		break;
+	case DRM_FORMAT_YVU422:
+		uv_stride = stride / 2;
+		v_offset = stride * height;
+		u_offset = v_offset + (uv_stride * height);
+		break;
 	case DRM_FORMAT_NV12:
 	case DRM_FORMAT_NV16:
 		uv_stride = stride;
-- 
2.9.3



More information about the dri-devel mailing list