Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp32862img; Tue, 19 Mar 2019 14:59:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUdXpcePOSAyQASmnqC+WtJ5Q637YHNYF78UV7LgwuKchp1nXisStmHufwGKy26sVtXIJD X-Received: by 2002:a63:5159:: with SMTP id r25mr129181pgl.112.1553032740200; Tue, 19 Mar 2019 14:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553032740; cv=none; d=google.com; s=arc-20160816; b=jOLu/xM21DVLKus7XLTLFNOy3hboAvzAqOlLULPDSBt+K0THC6ZpZKJo2EiSPgbT57 K9DNehXxf2FhdOsRS3fr5Sx19gBiPT3czFC6dbEA2dU19Ic17aQgCOlvHEvyKNGQ80bY THnsSP2tz+V9O7bjT+/p3WPwZTEjCZ64ARuZwKsg7JvtXLlcdDDQvAkdFqcEKr3l/CJE SBVBArNwV24pUqXHJsm6dXQJB5WnVogBmln7Ir8BCTyFa4Xs+LEzHqEJcc8mwmXNSpvd mN4uOmnYQQo0djTthscvLA47tD+1LwVh3RvqnClE9j/vvxEXDLgp8jMq/YVYUzlDPxDj EQ6A== 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=Xaben8gQowFyTP2Prx1HafYNapQ38AGuV7NisbZyaZE=; b=An4UeBhWw7a3sLIHCeyYqcTGLsNH6OKv+21QSeHQQ5IgUMIGBI0XxmarXTwtfRdBwU PTls24B0hMXHTuVOz718LeTZM2pP78ZWjMSUzndC10drsAJTEG78YCYRjH+3BgtBGzkY 33tjWHCVaZVcqE+cI/pkEMDiRe/hAJPcDt7I8BJ5EsO7p8C97RSr8D29neXxUVs73LRy v4rkWGEZuIwGxDzO31C0gm6Q3FHEM4aTHKfENaBdUstByuEpm3yfuh2b7jvcrLnU3i92 j7cqpwDYetCt9wlAMvyrqNrlBslA8YCTKNf3bQlUmqLZykAh7HfTdOEZRqOEVMJoTsmK /JGQ== 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 l127si47129pfl.2.2019.03.19.14.58.44; Tue, 19 Mar 2019 14:59:00 -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 S1727701AbfCSV5u (ORCPT + 99 others); Tue, 19 Mar 2019 17:57:50 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:36907 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727601AbfCSV5r (ORCPT ); Tue, 19 Mar 2019 17:57:47 -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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 3A8DC40008; Tue, 19 Mar 2019 21:57:43 +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 05/20] drm: Replace instances of drm_format_info by drm_get_format_info Date: Tue, 19 Mar 2019 22:57:10 +0100 Message-Id: <2c4461e827cf9a64326962094f7420bfafc5e13b.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 drm_get_format_info directly calls into drm_format_info, but takes directly a struct drm_mode_fb_cmd2 pointer, instead of the fourcc directly. It's shorter to not dereference it, and we can customise the behaviour at the driver level if we want to, so let's switch to it where it makes sense. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index c934b3df1f81..46f0078f7a91 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c @@ -232,7 +232,7 @@ static int psb_framebuffer_init(struct drm_device *dev, * Reject unknown formats, YUV formats, and formats with more than * 4 bytes per pixel. */ - info = drm_format_info(mode_cmd->pixel_format); + info = drm_get_format_info(dev, mode_cmd); if (!info || !info->depth || info->cpp[0] > 4) return -EINVAL; diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c index cfb641363a32..6557b2d6e16e 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.c +++ b/drivers/gpu/drm/omapdrm/omap_fb.c @@ -339,7 +339,7 @@ struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, dev, mode_cmd, mode_cmd->width, mode_cmd->height, (char *)&mode_cmd->pixel_format); - format = drm_format_info(mode_cmd->pixel_format); + format = drm_get_format_info(dev, mode_cmd); for (i = 0; i < ARRAY_SIZE(formats); i++) { if (formats[i] == mode_cmd->pixel_format) -- git-series 0.9.1