Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp720516ybn; Wed, 25 Sep 2019 06:47:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwIJ2NqTvVljD/pSytd36VoBHmaDOL2YbSJZnFhDRgQT7MKvD37hYDIbxwT0ncNpwRSEzbD X-Received: by 2002:a17:906:b6d0:: with SMTP id ec16mr4170088ejb.206.1569419227453; Wed, 25 Sep 2019 06:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569419227; cv=none; d=google.com; s=arc-20160816; b=oUi30OPT4AVVC/49IQmwoAZcYPtI34Pdlkb3bSUlOCwAoqwvC3Kg/N+wtZgGgsrzjH iDKZYe/+Nuk9cfr7Vpvg1WhAIaF1aYjxmu0TMkVDM67RFa+LpvL6qPtadSWa8C1KJKdM tmYhdKqjy/VIM9U1tyZNLQuWhgjmilUGND2Kucz6/hQtvO2NTzbFGD30YGZmAMFwS+bE /rsMaoxwd2FugkfNKS2f6H3O9ltT+BUcpmhdj6TyYPCdJGc6UHRmtj41E6j1WMFO9/18 Hi9zOnY2c8Pz5I0UKJsym6kiFJpKLsF/94ClxrZBghSIIdjzm5zDGz2iXsWLWaboLQaF 9hXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=XS4sXE3Y5gaYcqZ4/Db+U7wQn/a5c4utZbWdiCQ39uU=; b=mnS07HAP+ZFNfjYE0hdNsKq5kBALvR7oTIk9N6UafM4eKpey/B17QVFrSViBssiwC2 bkENxvXYg1KUeNOfI2ViFUpVOTCDXs16gFETxanMhdQ4MxEognZNa6AD2sWFZe1ffq82 8XBk9QOVLaRWk2jYUHjTTl786azOehtWy5Md+nYxh0UueKfXXTV8uKS5ggbU73d4scfR /oJMeBIFybh5rVjQ66XSWJoeaIvW/md/ePcIPOn0vJr0QMTo735X/mvLof+AQCVqY/n4 AxzT7BQrgE8Or27R24pG7bP8rFnXd5njQBr9m8BZtQ2PgR4rpbX8gxTgeyDllUClGN94 pUTQ== 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 v57si3348576edc.171.2019.09.25.06.46.43; Wed, 25 Sep 2019 06:47:07 -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 S2394313AbfIWMyE (ORCPT + 99 others); Mon, 23 Sep 2019 08:54:04 -0400 Received: from regular1.263xmail.com ([211.150.70.204]:39930 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392215AbfIWMyE (ORCPT ); Mon, 23 Sep 2019 08:54:04 -0400 Received: from hjc?rock-chips.com (unknown [192.168.167.236]) by regular1.263xmail.com (Postfix) with ESMTP id 30BDF275; Mon, 23 Sep 2019 20:53:55 +0800 (CST) X-263anti-spam: KSV:0;BIG:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ADDR-CHECKED4: 1 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (postfix) whith ESMTP id P17988T139868132738816S1569243231409431_; Mon, 23 Sep 2019 20:53:54 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <454a4a62b894b008478819c2497f3d21> 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, Linus Walleij , David Airlie , Daniel Vetter Cc: hjc@rock-chips.com, linux-kernel@vger.kernel.org Subject: [PATCH 32/36] drm/mcde: use bpp instead of cpp for drm_format_info Date: Mon, 23 Sep 2019 20:53:46 +0800 Message-Id: <1569243230-183568-2-git-send-email-hjc@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1569243230-183568-1-git-send-email-hjc@rock-chips.com> References: <1569243230-183568-1-git-send-email-hjc@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/mcde/mcde_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_display.c b/drivers/gpu/drm/mcde/mcde_display.c index 751454a..da2a3db 100644 --- a/drivers/gpu/drm/mcde/mcde_display.c +++ b/drivers/gpu/drm/mcde/mcde_display.c @@ -168,7 +168,7 @@ static int mcde_display_check(struct drm_simple_display_pipe *pipe, * There's no pitch register, the mode's hdisplay * controls this. */ - if (fb->pitches[0] != mode->hdisplay * fb->format->cpp[0]) { + if (fb->pitches[0] != mode->hdisplay * fb->format->bpp[0] / 8) { DRM_DEBUG_KMS("can't handle pitches\n"); return -EINVAL; } @@ -823,7 +823,7 @@ static void mcde_display_enable(struct drm_simple_display_pipe *pipe, u32 formatter_ppl = mode->hdisplay; /* pixels per line */ u32 formatter_lpf = mode->vdisplay; /* lines per frame */ int pkt_size, fifo_wtrmrk; - int cpp = fb->format->cpp[0]; + int cpp = fb->format->bpp[0] / 8; int formatter_cpp; struct drm_format_name_buf tmp; u32 formatter_frame; -- 2.7.4