]> git.baikalelectronics.ru Git - kernel.git/commit
fbcon: fix monochrome color value calculation
authorDavid Winn <q-newsgroup@qypea.com>
Thu, 2 Oct 2008 21:50:11 +0000 (14:50 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 2 Oct 2008 22:53:13 +0000 (15:53 -0700)
commitb3474cba15d9aeaead1d14567640785000fa8309
tree0698a09e45bf4e9c814dd0b5fef71f7424853c6c
parentc84025d3bbf778d40d8b8dade29d8dec512b938b
fbcon: fix monochrome color value calculation

Commit 7f55d13452187bd9f5d552852f9ada0cc3d240c2 ("fbcon: replace mono_col
macro with static inline") changed the order of operations for computing
monochrome color values.  This generates 0xffff000f instead of 0x0000000f
for a 4 bit monochrome color, leading to image corruption if it is passed
to cfb_imageblit or other similar functions.  Fix it up.

Cc: Harvey Harrison <harvey.harrison@gmail.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/console/fbcon.h