diff mbox series

[10/20] drm/exynos: Convert to generic image format library

Message ID 77b68a688cf9970f14b97a87b19be0b309788e30.1555487650.git-series.maxime.ripard@bootlin.com (mailing list archive)
State New, archived
Headers show
Series drm: Split out the formats API and move it to a common place | expand

Commit Message

Maxime Ripard April 17, 2019, 7:54 a.m. UTC
Now that we have a generic image format libary, let's convert drivers to
use it so that we can deprecate the old DRM one.

Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
---
 drivers/gpu/drm/exynos/exynos_drm_ipp.c    | 2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.h    | 4 +++-
 drivers/gpu/drm/exynos/exynos_drm_scaler.c | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index 23226a0212e8..ba012840fe07 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -562,7 +562,7 @@  static int exynos_drm_ipp_check_format(struct exynos_drm_ipp_task *task,
 	if (buf->buf.width == 0 || buf->buf.height == 0)
 		return -EINVAL;
 
-	buf->format = drm_format_info(buf->buf.fourcc);
+	buf->format = image_format_drm_lookup(buf->buf.fourcc);
 	for (i = 0; i < buf->format->num_planes; i++) {
 		unsigned int width = (i == 0) ? buf->buf.width :
 			     DIV_ROUND_UP(buf->buf.width, buf->format->hsub);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.h b/drivers/gpu/drm/exynos/exynos_drm_ipp.h
index 0b27d4a9bf94..c6cd21f185e6 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.h
@@ -71,12 +71,14 @@  struct exynos_drm_ipp {
 	wait_queue_head_t done_wq;
 };
 
+struct image_format_info;
+
 struct exynos_drm_ipp_buffer {
 	struct drm_exynos_ipp_task_buffer buf;
 	struct drm_exynos_ipp_task_rect rect;
 
 	struct exynos_drm_gem *exynos_gem[MAX_FB_BUFFER];
-	const struct drm_format_info *format;
+	const struct image_format_info *format;
 	dma_addr_t dma_addr[MAX_FB_BUFFER];
 };
 
diff --git a/drivers/gpu/drm/exynos/exynos_drm_scaler.c b/drivers/gpu/drm/exynos/exynos_drm_scaler.c
index ed1dd1aec902..c9791a2013cf 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_scaler.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_scaler.c
@@ -11,6 +11,7 @@ 
 #include <linux/kernel.h>
 #include <linux/component.h>
 #include <linux/err.h>
+#include <linux/image-formats.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/platform_device.h>
@@ -301,7 +302,7 @@  static inline void scaler_set_rotation(struct scaler_context *scaler,
 }
 
 static inline void scaler_set_csc(struct scaler_context *scaler,
-	const struct drm_format_info *fmt)
+	const struct image_format_info *fmt)
 {
 	static const u32 csc_mtx[2][3][3] = {
 		{ /* YCbCr to RGB */