Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: sm750fb: Fix bugs introduced by early commits

Early commit 30ca5cb63c56965 ("staging: sm750fb: change definition of
PANEL_PLANE_TL fields") and 27b047bbe1ee9c0 ("staging: sm750fb: change
definition of PANEL_PLANE_BR fields") modify the register bit fields
definitions. But the modifications are wrong, because the bit mask of
"bit field 10:0" is not 0xeff, but 0x7ff. The wrong definition bugs
makes display very strange.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Cc: stable <stable@vger.kernel.org> # 4.6+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Huacai Chen and committed by
Greg Kroah-Hartman
33c027ae 371c6d97

+4 -4
+4 -4
drivers/staging/sm750fb/ddk750_reg.h
··· 601 601 602 602 #define PANEL_PLANE_TL 0x08001C 603 603 #define PANEL_PLANE_TL_TOP_SHIFT 16 604 - #define PANEL_PLANE_TL_TOP_MASK (0xeff << 16) 605 - #define PANEL_PLANE_TL_LEFT_MASK 0xeff 604 + #define PANEL_PLANE_TL_TOP_MASK (0x7ff << 16) 605 + #define PANEL_PLANE_TL_LEFT_MASK 0x7ff 606 606 607 607 #define PANEL_PLANE_BR 0x080020 608 608 #define PANEL_PLANE_BR_BOTTOM_SHIFT 16 609 - #define PANEL_PLANE_BR_BOTTOM_MASK (0xeff << 16) 610 - #define PANEL_PLANE_BR_RIGHT_MASK 0xeff 609 + #define PANEL_PLANE_BR_BOTTOM_MASK (0x7ff << 16) 610 + #define PANEL_PLANE_BR_RIGHT_MASK 0x7ff 611 611 612 612 #define PANEL_HORIZONTAL_TOTAL 0x080024 613 613 #define PANEL_HORIZONTAL_TOTAL_TOTAL_SHIFT 16