Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp34121img; Tue, 19 Mar 2019 15:00:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNo2l/x4xVR5iyp3ql5qeS6HY7aSKvEKbV4qPI5HveLWM8OwYWp12k6S4b/DV5GIhVxEFy X-Received: by 2002:a63:4383:: with SMTP id q125mr4066951pga.370.1553032855320; Tue, 19 Mar 2019 15:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553032855; cv=none; d=google.com; s=arc-20160816; b=YKyn93U7osZjI1WFFcp+xEO1OSWgUV3t2+ndgmJ3VlVVPUWFkNN1n9+vpCDSvNzPyj guKy4bBvoFsrqJU93Hbtw7+vS6gEa/rbuGo91F20P6QcQBEFzpJbHWtxgQqLkNStOBnT 7tUnIC/T6+fyc7+mdtmYyb4/T0iewJU76WEaiLakUMGjet21ouNTwlqt1nw4Dj1ngvpQ p/1Mk461v7P4mVZ1YQBIdZGyWccW7yr/MT6kIjSH2H04AtTJHEK1dQEeXs3BREb/7PPu MpuxeUgIwhdqm6Ak9ElNvQuzE+bQJ+5C/3jPFxclOxvxyHJMqh78LKKucL+jvc7/MQ9a mnKw== 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=j6F4+gLEDVFGhMwQVnBYUUJM1t+aDlodn3levZZrZGg=; b=nOTJZCFYsulba2bCO84f/FrC8yv1sUesf0yL0c470oQcK78nl7dpAmldxNNv/GSiAf vf6qXK2J2TaFLqgAUOuS1GPp7GvhS+ghYJxjYU85+EgVXZFUl8HXXcjqC5D5QN0aF9Hn q7N5gxUEQcxmXnHRdCP8Dg8omVEAgrcUPRofGs+YInHfTz3JW96hn57nJqgFIsBKCdcA c2Ta+0iBhnkaRB5PybBGChcgQWGyTYykCSWpuHybWGRVipU7wp+ToZIfxKNnKnFpiNGx f1huhW/GTrLBjoXNLZBb/qNH9GwyC8N4hEjAo3NRSFeb1gjOrYl+LM5IUB/G/vnGvuoW Clmg== 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 38si170828pln.90.2019.03.19.15.00.40; Tue, 19 Mar 2019 15:00:55 -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 S1727735AbfCSV5y (ORCPT + 99 others); Tue, 19 Mar 2019 17:57:54 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:42919 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727601AbfCSV5w (ORCPT ); Tue, 19 Mar 2019 17:57:52 -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 A42DE40006; Tue, 19 Mar 2019 21:57:48 +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 08/20] drm/malidp: Convert to generic image format library Date: Tue, 19 Mar 2019 22:57:13 +0100 Message-Id: <93737da7ef4ae99082ac8735a7713f68c017c535.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/arm/malidp_drv.c | 3 ++- drivers/gpu/drm/arm/malidp_hw.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index fec4fe15a71b..1fcbe364a137 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 @@ -314,7 +315,7 @@ malidp_verify_afbc_framebuffer_size(struct drm_device *dev, const struct drm_mode_fb_cmd2 *mode_cmd) { int n_superblocks = 0; - const struct drm_format_info *info; + const struct image_format_info *info; struct drm_gem_object *objs = NULL; u32 afbc_superblock_size = 0, afbc_superblock_height = 0; u32 afbc_superblock_width = 0, afbc_size = 0; diff --git a/drivers/gpu/drm/arm/malidp_hw.c b/drivers/gpu/drm/arm/malidp_hw.c index 07971ad53b29..d25bc4af1bc9 100644 --- a/drivers/gpu/drm/arm/malidp_hw.c +++ b/drivers/gpu/drm/arm/malidp_hw.c @@ -326,14 +326,14 @@ static void malidp500_modeset(struct malidp_hw_device *hwdev, struct videomode * static int malidp500_rotmem_required(struct malidp_hw_device *hwdev, u16 w, u16 h, u32 fmt) { - const struct drm_format_info *info = drm_format_info(fmt); + const struct image_format_info *info = image_format_drm_lookup(fmt); /* * Each layer needs enough rotation memory to fit 8 lines * worth of pixel data. Required size is then: * size = rotated_width * (bpp / 8) * 8; */ - return w * drm_format_plane_cpp(info, 0) * 8; + return w * image_format_plane_cpp(info, 0) * 8; } static void malidp500_se_write_pp_coefftab(struct malidp_hw_device *hwdev, -- git-series 0.9.1