diff options
author | Julien Masson <jmasson@baylibre.com> | 2019-06-24 16:47:56 +0200 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2019-08-09 11:37:30 +0200 |
commit | f237bf2de82eafd224eb981c6c0bca8a9e039af6 (patch) | |
tree | 46e4685bfc08a2c8f759a81596e97e89badb5ad0 /drivers | |
parent | d8a0d6a3b7810fe3de723505c75f7f34ee6891df (diff) | |
download | linux-f237bf2de82eafd224eb981c6c0bca8a9e039af6.tar.bz2 |
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@baylibre.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/86y31r82fo.fsf@baylibre.com
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/meson/meson_registers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/meson/meson_registers.h b/drivers/gpu/drm/meson/meson_registers.h index 057453ce027c..f8dd1be0131e 100644 --- a/drivers/gpu/drm/meson/meson_registers.h +++ b/drivers/gpu/drm/meson/meson_registers.h @@ -12,7 +12,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 |