From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BDFEC4360F for ; Tue, 19 Mar 2019 21:58:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EFE6A2085A for ; Tue, 19 Mar 2019 21:58:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727971AbfCSV6d (ORCPT ); Tue, 19 Mar 2019 17:58:33 -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