From patchwork Mon Sep 23 12:47:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?6buE5a626ZKX?= X-Patchwork-Id: 11156831 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5CD514ED for ; Mon, 23 Sep 2019 12:56:18 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8DFE120820 for ; Mon, 23 Sep 2019 12:56:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8DFE120820 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rock-chips.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C80706E8DC; Mon, 23 Sep 2019 12:56:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lucky1.263xmail.com (lucky1.263xmail.com [211.157.147.134]) by gabe.freedesktop.org (Postfix) with ESMTPS id 393466E8D7 for ; Mon, 23 Sep 2019 12:56:04 +0000 (UTC) Received: from localhost (unknown [192.168.167.227]) by lucky1.263xmail.com (Postfix) with ESMTP id 109A842F3B; Mon, 23 Sep 2019 20:48:19 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-ANTISPAM-LEVEL: 2 X-ABS-CHECKED: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P14169T140710336407296S1569242883858959_; Mon, 23 Sep 2019 20:48:19 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: X-RL-SENDER: hjc@rock-chips.com X-SENDER: hjc@rock-chips.com X-LOGIN-NAME: hjc@rock-chips.com X-FST-TO: dri-devel@lists.freedesktop.org X-SENDER-IP: 58.22.7.114 X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Sandy Huang To: dri-devel@lists.freedesktop.org, Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter Subject: [PATCH 14/36] drm/tegra: use bpp instead of cpp for drm_format_info Date: Mon, 23 Sep 2019 20:47:38 +0800 Message-Id: <1569242880-182878-4-git-send-email-hjc@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1569242880-182878-1-git-send-email-hjc@rock-chips.com> References: <1569242880-182878-1-git-send-email-hjc@rock-chips.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" cpp[BytePerPlane] can't describe the 10bit data format correctly, So we use bpp[BitPerPlane] to instead cpp. Signed-off-by: Sandy Huang --- drivers/gpu/drm/tegra/dc.c | 2 +- drivers/gpu/drm/tegra/drm.c | 2 +- drivers/gpu/drm/tegra/fb.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index fbf57bc..850aef2 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -705,7 +705,7 @@ static void tegra_plane_atomic_update(struct drm_plane *plane, window.dst.y = plane->state->dst.y1; window.dst.w = drm_rect_width(&plane->state->dst); window.dst.h = drm_rect_height(&plane->state->dst); - window.bits_per_pixel = fb->format->cpp[0] * 8; + window.bits_per_pixel = fb->format->bpp[0]; window.bottom_up = tegra_fb_is_bottom_up(fb) || state->bottom_up; /* copy from state */ diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index 6fb7d74..ec6c5a2 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu/drm/tegra/drm.c @@ -973,7 +973,7 @@ static int tegra_debugfs_framebuffers(struct seq_file *s, void *data) seq_printf(s, "%3d: user size: %d x %d, depth %d, %d bpp, refcount %d\n", fb->base.id, fb->width, fb->height, fb->format->depth, - fb->format->cpp[0] * 8, + fb->format->bpp[0], drm_framebuffer_read_refcount(fb)); } diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c index e34325c..d5f5e1a 100644 --- a/drivers/gpu/drm/tegra/fb.c +++ b/drivers/gpu/drm/tegra/fb.c @@ -148,7 +148,7 @@ struct drm_framebuffer *tegra_fb_create(struct drm_device *drm, goto unreference; } - bpp = info->cpp[i]; + bpp = info->bpp[i] / 8; size = (height - 1) * cmd->pitches[i] + width * bpp + cmd->offsets[i];