Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3943726yba; Wed, 17 Apr 2019 00:57:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqz36e9MIo8nVXgg2JunzkWKSHQFy6yMFu/rGmGNkiVaPN3F2umNy52L33RgPhqZC57Taybd X-Received: by 2002:a17:902:e48c:: with SMTP id cj12mr85604766plb.93.1555487842872; Wed, 17 Apr 2019 00:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555487842; cv=none; d=google.com; s=arc-20160816; b=xNyq5bEIhQqAe2pFWHNKx8Gtw1YHSK2QNNPoWgPHgfm4J7OXhkeeVD3ZyLqN6kDqXZ aai8YxVA7jQrgHMwpjiexeyG2ADqDVujre1U3DJlUB1kI83wrrgIv5iabH60AcIz4w5E SddUMRgl8slIcrXsPPZYgG4psZkbLyJxVAmhiujtGonzTCv43/xcszXIa7S6KvpNpP7G RdxL73oRadx3WzHJNFQ+OVY4bVKyGNxWNQDLNMnFuSlxXa3D1qqwQZlXGb5j0lhBAO9g vDpkLHfkuLFG93mF7mnfp4YyWbmPfBL1ITq7pkzJsfWyhBzDVp1aCTV0/P4QwlAXjTO1 Qg1w== 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=t+1SDqPq81IdzVJV4iq2ZjpUVIJNUzJZm7wIwb9i7q+oYu4Kma9tCRLEL9dBeDGbFH hU1sQm0Pn22KPzvEbbE0a4gzieyj3xdcENpSiRgUWRF2f5vaBkTbO6gpqkjmvF9S9K98 HWvGR/gr6b4fEzMO2RHPbjNM4HEiNs+OehXIiuly0reGIOZ35s+cyJrmgu6mea6LyeAn 770CrqTmq9XjZ17HMbOjZGZNAedzhMPzFW1t0jpgp27UaDqJx3eoEJvFOwsW0TVyPI3G 71weD5GSN0rYgJtrgXO8hI+U40VEpovIgh8tKLtYsc0Ib4foFVK73/53BpI7+iSa3/SV IWRw== 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 k10si52478885pfj.132.2019.04.17.00.57.08; Wed, 17 Apr 2019 00:57:22 -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 S1731459AbfDQHzv (ORCPT + 99 others); Wed, 17 Apr 2019 03:55:51 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:35851 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731392AbfDQHzr (ORCPT ); Wed, 17 Apr 2019 03:55:47 -0400 X-Originating-IP: 90.88.160.238 Received: from localhost (aaubervilliers-681-1-42-238.w90-88.abo.wanadoo.fr [90.88.160.238]) (Authenticated sender: maxime.ripard@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id BDF3D240005; Wed, 17 Apr 2019 07:55:42 +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 14/20] drm/omap: Convert to generic image format library Date: Wed, 17 Apr 2019 09:54:40 +0200 Message-Id: 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/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