Skip to content

Commit

Permalink
drm: meson: mask value when writing bits relaxed
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Julien Masson authored and Neil Armstrong committed Aug 9, 2019
1 parent d8a0d6a commit f237bf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/meson/meson_registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f237bf2

Please sign in to comment.