Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp33066img; Tue, 19 Mar 2019 14:59:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJl9twlOYcTLYJ3pWiv3nXG3MqaHQQUKYK/lTc0OmCTHjKcweYUQjpQv0Q/F86eyPwQmWO X-Received: by 2002:a17:902:6b04:: with SMTP id o4mr4233693plk.323.1553032767073; Tue, 19 Mar 2019 14:59:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553032767; cv=none; d=google.com; s=arc-20160816; b=DvACdHWy2quwctKQOAWBi2YHE1QWjh/QwbK+4QE/+dGRix4yca6/tmUA9eqwNccL2T MGg2M36H+HBtLs7QJTnxWVopd1Na2S8YsZB4jPWF8NTw41sDQAqglNHfI5GJcQf7eOD0 IlKSYenwERNVRLjKs01C/v4Enk3NfE9RRPkyMzQiEaCjyIynuZEty+OcOMydY4OPHfYO vODjuKP9RUMarK4uQt8tl2vgtJ3PQfoXGIsSuBpyxmWMsOzlD9HvzwPW+0penZNmiYWN vl+5NqaG6XrttjA0+KLjKPk8d3b1hE/s11sWzomt+8fhKNQAHvku4efEeYy5JckvYFel Oovw== 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=MUWSHmLgpVeEdBbILMKSVt3jwig5yOuYZhzqrsStHlk=; b=MNZEx/CKgv4X+9SWUkb4MPacfMUKlpgY8IG/LFlKfVvkIsddPwTgq9ihCYYqslZ+kb 9RDLhglP+ZdF9rm1DRyU8LUw2ILUqdctGNVuBvCo+/QA7j4lg3WyiMaXvRanwSon67N9 hWY9CpkMyE3LfkfUCZg/gm60iH3QE4Shqlfmb+E5/nCz1ihoCd7sWRK2+7ZGJdXtIPGz olGbSj1glcj4GUFI3ltZz4oebYCuito+3SAwsB0ggvD0jYpOe4CmsgF2su0ABEpBvqao vryfetgZQiV50YQROt6yUwaTWqc/heLo6Qw/4VBfKXcjUpRYfbyUT5kgu3OUGC+QVyBc RNfQ== 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 i38si12646pgl.94.2019.03.19.14.59.12; Tue, 19 Mar 2019 14:59:27 -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 S1727817AbfCSV6F (ORCPT + 99 others); Tue, 19 Mar 2019 17:58:05 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:41921 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbfCSV6B (ORCPT ); Tue, 19 Mar 2019 17:58:01 -0400 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (Authenticated sender: maxime.ripard@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 86C67100005; Tue, 19 Mar 2019 21:57:57 +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 11/20] drm/i915: Convert to generic image format library Date: Tue, 19 Mar 2019 22:57:16 +0100 Message-Id: <37ad4786835372353c4479065e0f17f95e2d6953.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/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_sprite.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 86febe2ee510..37c7f6bbf650 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -7997,7 +7997,7 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc, pixel_format = val & DISPPLANE_PIXFORMAT_MASK; fourcc = i9xx_format_to_fourcc(pixel_format); - fb->format = drm_format_info(fourcc); + fb->format = image_format_drm_lookup(fourcc); if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) { offset = I915_READ(DSPOFFSET(i9xx_plane)); @@ -9078,7 +9078,7 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc, fourcc = skl_format_to_fourcc(pixel_format, val & PLANE_CTL_ORDER_RGBX, alpha); - fb->format = drm_format_info(fourcc); + fb->format = image_format_drm_lookup(fourcc); tiling = val & PLANE_CTL_TILED_MASK; switch (tiling) { diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index ee0e99b13532..aaae2bd4ed05 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -297,8 +297,8 @@ skl_plane_max_stride(struct intel_plane *plane, u32 pixel_format, u64 modifier, unsigned int rotation) { - const struct drm_format_info *info = drm_format_info(pixel_format); - int cpp = drm_format_plane_cpp(info, 0); + const struct image_format_info *info = image_format_drm_lookup(pixel_format); + int cpp = image_format_plane_cpp(info, 0); /* * "The stride in bytes must not exceed the -- git-series 0.9.1