@@ -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);
@@ -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];
};
@@ -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 */
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(-)