lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1569243230-183568-2-git-send-email-hjc@rock-chips.com>
Date:   Mon, 23 Sep 2019 20:53:46 +0800
From:   Sandy Huang <hjc@...k-chips.com>
To:     dri-devel@...ts.freedesktop.org,
        Linus Walleij <linus.walleij@...aro.org>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>
Cc:     hjc@...k-chips.com, linux-kernel@...r.kernel.org
Subject: [PATCH 32/36] drm/mcde: use bpp instead of cpp for drm_format_info

cpp[BytePerPlane] can't describe the 10bit data format correctly,
So we use bpp[BitPerPlane] to instead cpp.

Signed-off-by: Sandy Huang <hjc@...k-chips.com>
---
 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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ