Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3943477yba; Wed, 17 Apr 2019 00:56:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjsog1+kUexz/t2W30aPeIgIj2bhumcTqDaHB2HRxSfTP7F8q6iXtT9Lzym0ckFBAwH1BE X-Received: by 2002:a17:902:1e2:: with SMTP id b89mr88259746plb.278.1555487819334; Wed, 17 Apr 2019 00:56:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555487819; cv=none; d=google.com; s=arc-20160816; b=oaMhE4IFlrdQxoImEACF83b1KR+2cVsDVZ7chby1W0Fnt8z4Rf+Vng6RAY0gm3K5Vc /XZdP8/OysXV/DBcnq9KUNIctAGuFE4Dg6QcaaSWsMc7pLy3753jw8ryka62dlVu3zLN j988zcbI7u1f7j0/8CqvQrnhTNRwRwgoLH93SVXfhJG/MxRw07IlyYQsbC9G+40pcttI yeOy7vd1N/Sbb80C/XdpmWGgM258AEWJt8VcegdsrKfDcTthzuCWZUvr/smf3ix1YwxQ B8mgoCbhyFMko8278t9BovcB8C7lWf2hUk2l7r86lp+H9FdyilRXPVTQpERfOTUjcvvV Marw== 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=zxPGLmSlB3kbQ/0Yb+6kjri7nWlMLm5N2HDs1ohatvFu29gAmcLUhyNWXDmZIouYhs mD6JLD+oPPRlF4KzONhZypJhaZi81T+bMJj8VURo/XleV01x4FK1gE8uxMwFOktxbG1v fgtyam+AyOFTRuBZ7owoH7w0geqcwrl4A7t0sUPmv8x0DfXTCtojbJtdZdX+nxPrlEN3 ePncxYpIwYdfXiG9zYhIPOJo7JfnFudy32n/ckSRv/FISO9aIYePNwksGa2aCPK3EzQn nHZu2dXM12LoZkchj8/UFl+VnaRIeujgpeTfwaL6/PvqeB1le0GJq4POVtFNQVWqPcj1 WHeg== 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 i15si20361756pfj.115.2019.04.17.00.56.44; Wed, 17 Apr 2019 00:56:59 -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 S1731397AbfDQHzf (ORCPT + 99 others); Wed, 17 Apr 2019 03:55:35 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:41683 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731380AbfDQHza (ORCPT ); Wed, 17 Apr 2019 03:55:30 -0400 Received: from localhost (aaubervilliers-681-1-42-238.w90-88.abo.wanadoo.fr [90.88.160.238]) (Authenticated sender: maxime.ripard@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 66EE3240014; Wed, 17 Apr 2019 07:55:27 +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: [PATCH 10/20] drm/exynos: Convert to generic image format library Date: Wed, 17 Apr 2019 09:54:36 +0200 Message-Id: <77b68a688cf9970f14b97a87b19be0b309788e30.1555487650.git-series.maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.21.0 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