Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3944155yba; Wed, 17 Apr 2019 00:58:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzblCuQl5Pbr6lvPplLtjXeNiO3JyPlW3lVP2Jz/N1byGO3j4LnDRDKcyapv0FHptL8gDia X-Received: by 2002:a17:902:26a:: with SMTP id 97mr47549804plc.263.1555487885915; Wed, 17 Apr 2019 00:58:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555487885; cv=none; d=google.com; s=arc-20160816; b=ymlx0YLsPwABbmlDprnJGMKzT1fCMQlNiBTuOyaxqqvht58RNGp2mRNkGRxNDptsuh R3SyACrye2TBZZUA5D2Kya3lXJ4H1NJx7QmfxdrtGvrRf+RhWNe45VJGstDMwyBvMRDU cAga62SkXEFooAwF0Ed6R1BygfvTXGtSiiN+KHhr6NR+Dt14hHfJtHn4i/a96XPDs5Yx NPizVj6YRd33cz5I0hsypSlABW5FcNQ2h+40qiBoBofiWhpYGf8q1Iaof3Gi/xfXrA7P EKFHDgJcnCOhQOvROaoB2fsYi/2sdX0HV/Z7e+jSTzZ5H1hYl88B66Xg9L6nbuMJ/mct cMNw== 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=Ifscp8eR9bDq5A6QDlKIxfso0mQtiJeGr0ZNndamxcY=; b=ceDG12aB7c1Fhnl/GjcUonKamuex3FHKB3IdvQ842rfzzuAm4U07WTwcdqVuN9ZHSa O8gzmnSzUrG0tC8ApKfnFIgrxKZvb8A+oa4lETnex2O3Q9LywKsYxgObaLTqXkp2c7g+ QyVzt9eeZ5jfrThLivYHkUd4CKiUtGhdgVKQwMa0cWZUCNXgDa77Hec/rMBaN4D3u9nv w31uwwkQ1iirebE4bGeILM5hKhduSw5ZBa2zP6fFuaCSV3DH6E7L/Cwf2Bq6nxbIuSLb btA5ksOaXd7a1A8zTl7EueLHaqSMHF0rOICa1UzM8TZPwB2m2Xezqk4PvOejwSYjtwfx F/sQ== 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 n80si14763876pfb.169.2019.04.17.00.57.50; Wed, 17 Apr 2019 00:58:05 -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 S1731383AbfDQHza (ORCPT + 99 others); Wed, 17 Apr 2019 03:55:30 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:47371 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731336AbfDQHz1 (ORCPT ); Wed, 17 Apr 2019 03:55:27 -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 relay12.mail.gandi.net (Postfix) with ESMTPSA id 481C0200009; Wed, 17 Apr 2019 07:55:24 +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 09/20] drm/client: Convert to generic image format library Date: Wed, 17 Apr 2019 09:54:35 +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 the rest of the DRM core to use it so that we can deprecate the old DRM one. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index 169d8eeaa662..89e1f7bc5a30 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -243,7 +243,7 @@ static void drm_client_buffer_delete(struct drm_client_buffer *buffer) static struct drm_client_buffer * drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u32 format) { - const struct drm_format_info *info = drm_format_info(format); + const struct image_format_info *info = image_format_drm_lookup(format); struct drm_mode_create_dumb dumb_args = { }; struct drm_device *dev = client->dev; struct drm_client_buffer *buffer; @@ -259,7 +259,7 @@ drm_client_buffer_create(struct drm_client_dev *client, u32 width, u32 height, u dumb_args.width = width; dumb_args.height = height; - dumb_args.bpp = drm_format_info_plane_cpp(info, 0) * 8; + dumb_args.bpp = image_format_info_plane_cpp(info, 0) * 8; ret = drm_mode_create_dumb(dev, &dumb_args, client->file); if (ret) goto err_delete; @@ -319,10 +319,10 @@ static int drm_client_buffer_addfb(struct drm_client_buffer *buffer, { struct drm_client_dev *client = buffer->client; struct drm_mode_fb_cmd fb_req = { }; - const struct drm_format_info *info; + const struct image_format_info *info; int ret; - info = drm_format_info(format); + info = image_format_drm_lookup(format); fb_req.bpp = info->cpp[0] * 8; fb_req.depth = info->depth; fb_req.width = width; -- git-series 0.9.1