Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3944028yba; Wed, 17 Apr 2019 00:57:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgkB/oSI6wdgp5zzG4tLi2wR/uQWmCOdzxGEy0D/Ll9Weq29zytZFobpYgAniqMkpfCHEg X-Received: by 2002:a63:5149:: with SMTP id r9mr78018711pgl.177.1555487874190; Wed, 17 Apr 2019 00:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555487874; cv=none; d=google.com; s=arc-20160816; b=075tsQX6xEA3AqZTrl1y8EW7KcNZ4G/6K88cLzDFZ1mXvoXj7ZmZyi8oC/jSf0q1g1 Gc4dSpIHOlxMuQQ+f2Lv1b9aFEDVH9iWIwTn/lfrQQ8JWYBipIBkHbkq79PCqZmIukNa m3qEBPm78qCKBTTfe531Y1uHAvWeAYwEtd6JvUgTmQjduOLeZwwOUvc96u7VBL6n0fGv FVA9RfnsRA6y261aTPJ6Wifw36CMxHPdmMUQpoBeu1x7tnSTkNHCfotAym0U0CPwLQnW FBmXJh5Mykm7LOTmcLZ4fBhYJoxDxIccxw7nl/h6heoSDXHru4n/FGQtwwgL2Aqa0TUR 7o/A== 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=NpCFK8Q+DlLzrHVD0Gz5nCdCqHRONlYmcp3T9z23LjU=; b=h7coBCA8tkPCZ3uUk/p8c0SXVctVoH50bHwiTvvwgYC+14eVqv8CYlIw6BNhQX3WEF JeikvsPYi48X222lJ1zGmrAY+rFu3hQJ7GIrZOzCXGn0HnfV+g4zp362ag6GUIImOVRl ZCh0MWnRK6MuehAPi5D8D3mVOAfGS2DRjQbeaviBAMxt+S8ZZQ5pzkQmdrxGweTt6VRq +ZZATBYxTqZasapNKbrc6Z6UINamO+y9D03oN2nbE2V3+QhZyKztL20Ki72Z75JODLdz 75G2zAwMSam8XLydCUJb55rHtXKOLRCfH4g1nWKLUKaM5Ghgg/aJ3engVXVhyCkphfRH bz5w== 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 y2si39550391pgq.170.2019.04.17.00.57.39; Wed, 17 Apr 2019 00:57:54 -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 S1731448AbfDQHzt (ORCPT + 99 others); Wed, 17 Apr 2019 03:55:49 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:43169 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731336AbfDQHze (ORCPT ); Wed, 17 Apr 2019 03:55:34 -0400 Received: from localhost (aaubervilliers-681-1-42-238.w90-88.abo.wanadoo.fr [90.88.160.238]) (Authenticated sender: maxime.ripard@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id C2C4F240006; Wed, 17 Apr 2019 07:55:29 +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 11/20] drm/i915: Convert to generic image format library Date: Wed, 17 Apr 2019 09:54:37 +0200 Message-Id: <9561d4a4a7c95e0c10c58a3a57f7bde9190fe1e8.1555487650.git-series.maxime.ripard@bootlin.com> 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/i915/intel_display.c | 4 ++-- drivers/gpu/drm/i915/intel_pm.c | 6 +++--- drivers/gpu/drm/i915/intel_sprite.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 6a0c4f505593..c745e1172dc9 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8094,7 +8094,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)); @@ -9194,7 +9194,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_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 7357bddf9ad9..3b490ea1baf0 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -3928,7 +3928,7 @@ skl_ddb_get_pipe_allocation_limits(struct drm_i915_private *dev_priv, } static int skl_compute_wm_params(const struct intel_crtc_state *crtc_state, - int width, const struct drm_format_info *format, + int width, const struct image_format_info *format, u64 modifier, unsigned int rotation, u32 plane_pixel_rate, struct skl_wm_params *wp, int color_plane); @@ -3949,7 +3949,7 @@ skl_cursor_allocation(const struct intel_crtc_state *crtc_state, struct skl_wm_params wp; ret = skl_compute_wm_params(crtc_state, 256, - drm_format_info(DRM_FORMAT_ARGB8888), + image_format_drm_lookup(DRM_FORMAT_ARGB8888), DRM_FORMAT_MOD_LINEAR, DRM_MODE_ROTATE_0, crtc_state->pixel_rate, &wp, 0); @@ -4644,7 +4644,7 @@ skl_adjusted_plane_pixel_rate(const struct intel_crtc_state *cstate, static int skl_compute_wm_params(const struct intel_crtc_state *crtc_state, - int width, const struct drm_format_info *format, + int width, const struct image_format_info *format, u64 modifier, unsigned int rotation, u32 plane_pixel_rate, struct skl_wm_params *wp, int color_plane) diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index e35601b1f878..152b58267671 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -325,8 +325,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_info_plane_cpp(info, 0); + const struct image_format_info *info = image_format_drm_lookup(pixel_format); + int cpp = image_format_info_plane_cpp(info, 0); /* * "The stride in bytes must not exceed the -- git-series 0.9.1