[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86y31r82fo.fsf@baylibre.com>
Date: Mon, 24 Jun 2019 16:47:56 +0200
From: Julien Masson <jmasson@...libre.com>
To: Neil Armstrong <narmstrong@...libre.com>
Cc: linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, Julien Masson <jmasson@...libre.com>
Subject: [PATCH 1/9] drm: meson: mask value when writing bits relaxed
The value used in the macro writel_bits_relaxed has to be masked since
we don't want change the bits outside the mask.
Signed-off-by: Julien Masson <jmasson@...libre.com>
---
drivers/gpu/drm/meson/meson_registers.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/meson/meson_registers.h b/drivers/gpu/drm/meson/meson_registers.h
index cfaf90501bb1..c7dfbd7454e5 100644
--- a/drivers/gpu/drm/meson/meson_registers.h
+++ b/drivers/gpu/drm/meson/meson_registers.h
@@ -20,7 +20,7 @@
#define _REG(reg) ((reg) << 2)
#define writel_bits_relaxed(mask, val, addr) \
- writel_relaxed((readl_relaxed(addr) & ~(mask)) | (val), addr)
+ writel_relaxed((readl_relaxed(addr) & ~(mask)) | ((val) & (mask)), addr)
/* vpp2 */
#define VPP2_DUMMY_DATA 0x1900
--
2.17.1
Powered by blists - more mailing lists