Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3944097yba; Wed, 17 Apr 2019 00:57:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqzf9qOrXZmtddiM4KOCZMymkMKuIWH6RrdFdX6TFrf0AKmgRr237jFxzvF23a8Hw3JvsGtD X-Received: by 2002:a65:5687:: with SMTP id v7mr2537228pgs.299.1555487879513; Wed, 17 Apr 2019 00:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555487879; cv=none; d=google.com; s=arc-20160816; b=rf+2fDNyYevjsc4mcX5o0SVljxXr7aztJhxgC/zxalq9vPNqXolkq866TkoC6bL4p0 ScKnzlFoscOXZPG1km4QFVf0ocHz6+v8CATYSC48+iJiTLqSUht0cQK5xymjBEBseH82 aJpF/Pwy2QtulU3m3Tkuhtv3RdMYCRUitAR4EwsvApIvamw7om483uGxuOfxQiIhf6AU JMU0LR5/9WrMiRROfrBLmf41jWk4DC/hD4kfTiLGvh1PVRdspxYG71wNR1NWZtx+ICJZ WOpRBRCwQej0aoA8zps+otOrPxOOGNnDSoKKfQlFGDbN3y9bBif7CkjB3nMuYpf/kWzM T6zA== 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=1JXHqOGx3gYo16D5G2oHag/1u1dLiVFFsROcVJHSRDQ=; b=0yZA0qqUiWTqeRiQls5qOu6M9MmaTc3O7Cj6d8sN/mDNjVIuw42cDDu6kQzeqZD5yZ hLF0A7vbEzdjESudNIMMaU6Xrq+x5FnuDgV5RudepCxMZtkFE76axEVNsyk/WNdEtt0L 8BO8nBoD1ZE35iX2UjcN4ymNYQZ7BSO8Oumurxbfe2tDDbWEyN1LW/eX6HXErjtGxE20 zfYU4IZDPwwjAx4bWOCEcV8aZfv+VCMcr+TS9UJsTqHY35De9ckWCytZJlChg5x/Relt HdDjmGfcQdJhA+56qHOJAVkDZCgtprLn3FdyNN8CWADOOjXYruhuMUierGqX1Ef8/fk7 4qWQ== 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 p22si50358983pgi.449.2019.04.17.00.57.44; Wed, 17 Apr 2019 00:57:59 -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 S1731351AbfDQHz2 (ORCPT + 99 others); Wed, 17 Apr 2019 03:55:28 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:53383 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731328AbfDQHzZ (ORCPT ); Wed, 17 Apr 2019 03:55:25 -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 147FA240016; Wed, 17 Apr 2019 07:55:21 +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 08/20] drm/malidp: Convert to generic image format library Date: Wed, 17 Apr 2019 09:54:34 +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/arm/malidp_drv.c | 1 + drivers/gpu/drm/arm/malidp_hw.c | 4 ++-- drivers/gpu/drm/arm/malidp_planes.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index 9e5240c2d5c7..6fddb70894cb 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -10,6 +10,7 @@ * ARM Mali DP500/DP550/DP650 KMS/DRM driver */ +#include #include #include #include diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index 1c9e869f4c52..24c01ff458d5 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c @@ -382,8 +382,8 @@ static void malidp500_modeset(struct malidp_hw_device *hwdev, struct videomode * int malidp_format_get_bpp(u32 fmt) { - const struct drm_format_info *info = drm_format_info(fmt); - int bpp = drm_format_info_plane_cpp(info, 0) * 8; + const struct image_format_info *info = image_format_drm_lookup(fmt); + int bpp = image_format_info_plane_cpp(info, 0) * 8; if (bpp == 0) { switch (fmt) { diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 9874f98f2aa5..b9d4d7d9a960 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -150,7 +150,7 @@ static void malidp_plane_atomic_print_state(struct drm_printer *p, bool malidp_format_mod_supported(struct drm_device *drm, u32 format, u64 modifier) { - const struct drm_format_info *info; + const struct image_format_info *info; const u64 *modifiers; struct malidp_drm *malidp = drm->dev_private; const struct malidp_hw_regmap *map = &malidp->dev->hw->map; @@ -201,7 +201,7 @@ bool malidp_format_mod_supported(struct drm_device *drm, return false; } - info = drm_format_info(format); + info = image_format_drm_lookup(format); if (info->num_planes != 1) { DRM_DEBUG_KMS("AFBC buffers expect one plane\n"); @@ -227,7 +227,7 @@ bool malidp_format_mod_supported(struct drm_device *drm, if (modifier & AFBC_SPLIT) { if (!info->is_yuv) { - if (drm_format_info_plane_cpp(info, 0) <= 2) { + if (image_format_info_plane_cpp(info, 0) <= 2) { DRM_DEBUG_KMS("RGB formats <= 16bpp are not supported with SPLIT\n"); return false; } -- git-series 0.9.1