Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp32960img; Tue, 19 Mar 2019 14:59:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKKaKYdEC5hZv/+eARSLXQ9eBf8FvzsasPsNJtJs/g/C1fsNyCJa6+phLppQ2C6VPw79N1 X-Received: by 2002:a63:cd13:: with SMTP id i19mr4378784pgg.317.1553032753742; Tue, 19 Mar 2019 14:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553032753; cv=none; d=google.com; s=arc-20160816; b=wdk4TcAWhd6sCijxdmwxc7hS8DmHymMkPtJOnTMnDOcedTEDd1qVo/BQZkvDHsUijp PYmTbaGrQ7Skf7eORI1EfeG9sV9oV7Dx+oWN+X0p2eq7QbHEpzqnUBLHrKQ1vZ9gTIQ3 o6p/6q4GSL2u29uD5lc2nStMi6G/uOo3hJA394Joh+1hEO5Vu0PJfoN61UqymEa+qjY0 J3oiFLoBbflxnyOz6NonYlYSs7svGDPvJLO0Ot1KEyoO1zvE+EZqfGpPHLtiFpbXzVmv /xcnNuGH83xJcDnLoNqoYJsQxDWojSdfAOFTrdXbCZOycu/q/15qc2JzvT6N4KkRobOL Z+7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Ea+d7lL8j9LMjOjUSz79qriTqlliIhb8eT3bTUJjM6I=; b=W+WDxgBojpyx4kxQkTm6/xv5Bt2Wv0oThWup/LawJYhVqyNAUtG5hzocKYlpjoxMnd IcVIO3BWIhWHUkNs0sejMuBAc3bsf6zNiZT35llodJyKMYe5+nv0kjBZIkZU1jCSN8wM WviAOTs6Fz+kuGfRpTSyx0hJYJjseVLa19PHY34LiK/7RtefdD93pmel1sIYG6V1dwmh Pu0PjXQRmkYY0L5EXKaBIv6z4aNe1QoAbHGhL5sD5ECNoY2a7sAzmzWWdQLNancoq0rX xFpwdrEnG/xzDCqfKcL7WZ4opO6NL7CLepEfMo02bgZblPKj2a5gPxCobzG5qy+iN033 L05w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si143466plq.430.2019.03.19.14.58.58; Tue, 19 Mar 2019 14:59:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727791AbfCSV6B (ORCPT + 99 others); Tue, 19 Mar 2019 17:58:01 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:56831 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727766AbfCSV56 (ORCPT ); Tue, 19 Mar 2019 17:57:58 -0400 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (Authenticated sender: maxime.ripard@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id EEA5A240004; Tue, 19 Mar 2019 21:57:54 +0000 (UTC) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Sean Paul , Maxime Ripard , Mauro Carvalho Chehab Cc: Sakari Ailus , Hans Verkuil , Laurent Pinchart , Thomas Petazzoni , Paul Kocialkowski , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [RFC PATCH 10/20] drm/exynos: Convert to generic image format library Date: Tue, 19 Mar 2019 22:57:15 +0100 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 --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 #include #include +#include #include #include #include @@ -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 */ -- git-series 0.9.1