Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp33322img; Tue, 19 Mar 2019 14:59:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyrn9JDONS01vfwc2b/dYIvRRISfzSOwZ2ZZZvW9nAWbn8vvkqEFp4wdGE2ruQr1JjVbqS4 X-Received: by 2002:a65:4981:: with SMTP id r1mr3952136pgs.62.1553032791752; Tue, 19 Mar 2019 14:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553032791; cv=none; d=google.com; s=arc-20160816; b=xh+evwq41YPET6P7nSKZoHBMvFsuA8W1GlxpJjbbMtuK2/haT+Y4wjbI0weLmHcvNN Xu4mKf9E4e+BvbpqTE3ZDnPvKjPzbgvxT5P1iYbIQn4+ys5XBgMOFQr6ydzg0gLzN/zO 8eWGIuKjMxXm6vj7wm5WE7M0U+8JrbSatMhRP8UVs1iM3woTklJJ0GVWr8RtSvHtDhho Tss6fv8+UtLfn61EcytZhw/9Di1g/83cAJO/RAP1jAKicVDg/SVT7np2MC1tX2ThJOfQ D+sBtvdnYYT/vqlTmAv+d7sUh7ZGXN4ZJ0rMEPVKyyVqWvkJpI0W+G6qMHK/RcZMfIZx lx/g== 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=zrSJdkzssh2plo5roWeky4T/MGFJO8ZxDpmp/7WcRbU=; b=cLlHyNU1iUzkyfm1rW3P2f9GOjXwmq3cMkpS3EqDPgjcEG5UWM3vEoqtIKebVHymQp FCr3LZPu8QNedJxd5EHyomR4C+w5jgx7i3O5Nk4/nBhoi9sJ5jt5KaSMvRmFiXxGZ8tl JbMFtARYzR3YZiQYeC0AIF94Dn4Sq4U5lgNp7k+Cw7L3L4vhAP9dBukNWLPHRWS2Cjtj gsOsVSGJlfz6w8zfKQcFyBUl2N4eOmB8AKq2nBZ0Iu6+TbxVZWoEA/v7vSoSCQ8A3vjb wHHfXDdQFDsWVhgJ1srBzuMXa7yXLd92WkRBeBqhfPo8XyWJaX9ZTFWYBjMUgk5kRbsK 62Nw== 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 j4si10349pgq.170.2019.03.19.14.59.36; Tue, 19 Mar 2019 14:59:51 -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 S1727967AbfCSV6c (ORCPT + 99 others); Tue, 19 Mar 2019 17:58:32 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:44625 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727936AbfCSV61 (ORCPT ); Tue, 19 Mar 2019 17:58:27 -0400 X-Originating-IP: 90.89.68.76 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (Authenticated sender: maxime.ripard@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 30364240003; Tue, 19 Mar 2019 21:58:24 +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 14/20] drm/omap: Convert to generic image format library Date: Tue, 19 Mar 2019 22:57:19 +0100 Message-Id: <49fd5e9fe1712ca4c6aee2e376ffda2cec11bc13.1553032382.git-series.maxime.ripard@bootlin.com> 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/omapdrm/dss/dispc.c | 9 +++++---- drivers/gpu/drm/omapdrm/omap_fb.c | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index ba82d916719c..bf60d49ad6ca 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -1898,9 +1899,9 @@ static void dispc_ovl_set_scaling_uv(struct dispc_device *dispc, int scale_x = out_width != orig_width; int scale_y = out_height != orig_height; bool chroma_upscale = plane != OMAP_DSS_WB; - const struct drm_format_info *info; + const struct image_format_info *info; - info = drm_format_info(fourcc); + info = image_format_drm_lookup(fourcc); if (!dispc_has_feature(dispc, FEAT_HANDLE_UV_SEPARATE)) return; @@ -2623,9 +2624,9 @@ static int dispc_ovl_setup_common(struct dispc_device *dispc, bool ilace = !!(vm->flags & DISPLAY_FLAGS_INTERLACED); unsigned long pclk = dispc_plane_pclk_rate(dispc, plane); unsigned long lclk = dispc_plane_lclk_rate(dispc, plane); - const struct drm_format_info *info; + const struct image_format_info *info; - info = drm_format_info(fourcc); + info = image_format_drm_lookup(fourcc); /* when setting up WB, dispc_plane_pclk_rate() returns 0 */ if (plane == OMAP_DSS_WB) diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index 1d4143adf829..8caecfc8d1db 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.c +++ b/drivers/gpu/drm/omapdrm/omap_fb.c @@ -15,6 +15,7 @@ * this program. If not, see . */ +#include #include #include @@ -60,7 +61,7 @@ struct plane { struct omap_framebuffer { struct drm_framebuffer base; int pin_count; - const struct drm_format_info *format; + const struct image_format_info *format; struct plane planes[2]; /* lock for pinning (pin_count and planes.dma_addr) */ struct mutex lock; @@ -72,7 +73,7 @@ static const struct drm_framebuffer_funcs omap_framebuffer_funcs = { }; static u32 get_linear_addr(struct drm_framebuffer *fb, - const struct drm_format_info *format, int n, int x, int y) + const struct image_format_info *format, int n, int x, int y) { struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); struct plane *plane = &omap_fb->planes[n]; @@ -126,7 +127,7 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer *fb, struct drm_plane_state *state, struct omap_overlay_info *info) { struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb); - const struct drm_format_info *format = omap_fb->format; + const struct image_format_info *format = omap_fb->format; struct plane *plane = &omap_fb->planes[0]; u32 x, y, orient = 0; -- git-series 0.9.1