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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1470279597-60453-7-git-send-email-bibby.hsieh@mediatek.com>
Date:	Thu, 4 Aug 2016 10:59:56 +0800
From:	Bibby Hsieh <bibby.hsieh@...iatek.com>
To:	David Airlie <airlied@...ux.ie>,
	Matthias Brugger <matthias.bgg@...il.com>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	<dri-devel@...ts.freedesktop.org>,
	<linux-mediatek@...ts.infradead.org>
CC:	Yingjoe Chen <yingjoe.chen@...iatek.com>,
	Cawa Cheng <cawa.cheng@...iatek.com>,
	Daniel Kurtz <djkurtz@...omium.org>,
	Bibby Hsieh <bibby.hsieh@...iatek.com>,
	Philipp Zabel <p.zabel@...gutronix.de>,
	YT Shen <yt.shen@...iatek.com>,
	Thierry Reding <thierry.reding@...il.com>,
	CK Hu <ck.hu@...iatek.com>, Mao Huang <littlecvr@...omium.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>,
	Sascha Hauer <kernel@...gutronix.de>
Subject: [PATCH v2 6/7] drm/mediatek: plane: Use FB's format's cpp to compute x offset

From: Daniel Kurtz <djkurtz@...omium.org>

Use the framebuffer's format to compute its cpp, and use it when
calculating the address shift value.

Signed-off-by: Bibby Hsieh <bibby.hsieh@...iatek.com>
---
 drivers/gpu/drm/mediatek/mtk_drm_plane.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
index b3ddb20..c461a23 100644
--- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
+++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
@@ -135,7 +135,7 @@ static void mtk_plane_atomic_update(struct drm_plane *plane,
 	pitch = fb->pitches[0];
 	format = fb->pixel_format;
 
-	addr += (plane->state->src.x1 >> 16) * 4;
+	addr += (plane->state->src.x1 >> 16) * drm_format_plane_cpp(format, 0);
 	addr += (plane->state->src.y1 >> 16) * pitch;
 
 	state->pending.enable = true;
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ