Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp652007ybn; Wed, 25 Sep 2019 05:49:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqylXYR3cXT/XqcaCYBOy6W2H/jmegY5Kmf8AmSg7HLahyjq7MgY2DLnkzNDfrfJSksqKCtl X-Received: by 2002:a05:6000:12:: with SMTP id h18mr9193280wrx.156.1569415746484; Wed, 25 Sep 2019 05:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569415746; cv=none; d=google.com; s=arc-20160816; b=ZI8D9HFiZQUyDfm7vtPaLRJL/NiZTn1+8XEwpLd+BilWK2Uf9Ilpw716W5Wyi433jE LdvId3XI3dg+5Rt6N8EADaoQIp/BokAbmeYkXwb9i8aXBWKq0Uk1kW/FJL1KQzfiyPlA BoQjUflu/IR8iw37LP8T4QB3tvt24xatGiMsiLjDjUy+uviaFGc2HmF2NNCMiUyRkDu0 RjNW2t0ffiPypbz7SflQt9TOKhVnJjiZFUFoOjDx23u0jqfvrT9mnqrKeREYylMaoaSs 9dnUieQekLu5nJI8Ld5hSTHIs4/ojjOkgHIdX7uiLN3he3PJ0BrLNFEdqpHKIUXsPErL Yk3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=yHcdDNSTUFjmTKfO1YK369ul94rZxUvrUgbeV2JrOtE=; b=cvI/h57CKArf1i67Mwz4p2xBGgpL2JA/7/8BFoX51BaSEU0NTMo/ZhUUinApw5OO1T JQcbawdmbKEz5/KTMw5SkNg2vN6bCaX2+OBJENwi+xanqPp3Dn2Ake68SUt/C6jBpMwy LSJ8u5OulayCRahtbg+DNbO4DiYu/03b+TxYF5NFNlnPOZDPiFU0VNoBu0dde+IuE3OX D3Ewh0XpzVeL1Z0pBMAZZDJINbvsl0vla6zR764ZImHGnciRV9iqqtcoLquG+3hdF8ma edDFosVhd819KLBaz4IyIgcNn21Ec+JeMLXBr2uT13CQlzSmLwiTJ2jk5NLH/cKUy1cZ Htow== 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 o32si3394045edc.306.2019.09.25.05.48.41; Wed, 25 Sep 2019 05:49:06 -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 S2501984AbfIWMtf (ORCPT + 99 others); Mon, 23 Sep 2019 08:49:35 -0400 Received: from regular1.263xmail.com ([211.150.70.198]:34992 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728239AbfIWMtf (ORCPT ); Mon, 23 Sep 2019 08:49:35 -0400 Received: from hjc?rock-chips.com (unknown [192.168.167.175]) by regular1.263xmail.com (Postfix) with ESMTP id 78A7F1EB; Mon, 23 Sep 2019 20:49:31 +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 P28975T139999806740224S1569242970112868_; Mon, 23 Sep 2019 20:49:31 +0800 (CST) X-IP-DOMAINF: 1 X-UNIQUE-TAG: <81cc42a836c8ab33cf18b9b9ce045c3e> 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, Jyri Sarha , David Airlie , Daniel Vetter Cc: hjc@rock-chips.com, Tomi Valkeinen , linux-kernel@vger.kernel.org Subject: [PATCH 16/36] drm/tilcdc: use bpp instead of cpp for drm_format_info Date: Mon, 23 Sep 2019 20:49:08 +0800 Message-Id: <1569242968-183093-1-git-send-email-hjc@rock-chips.com> X-Mailer: git-send-email 2.7.4 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/tilcdc/tilcdc_crtc.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c index e9dd5e5..78c587d 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c @@ -71,7 +71,7 @@ static void set_scanout(struct drm_crtc *crtc, struct drm_framebuffer *fb) start = gem->paddr + fb->offsets[0] + crtc->y * fb->pitches[0] + - crtc->x * fb->format->cpp[0]; + crtc->x * fb->format->bpp[0] / 8; end = start + (crtc->mode.vdisplay * fb->pitches[0]); diff --git a/drivers/gpu/drm/tilcdc/tilcdc_plane.c b/drivers/gpu/drm/tilcdc/tilcdc_plane.c index 3abb964..fca7375 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_plane.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_plane.c @@ -55,7 +55,7 @@ static int tilcdc_plane_atomic_check(struct drm_plane *plane, } pitch = crtc_state->mode.hdisplay * - state->fb->format->cpp[0]; + state->fb->format->bpp[0] / 8; if (state->fb->pitches[0] != pitch) { dev_err(plane->dev->dev, "Invalid pitch: fb and crtc widths must be the same"); -- 2.7.4