mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
fbdev: fix color component field length documentation
The documentation about the meaning of the color component bitfield lengths in pseudocolor modes is inconsistent. Fix it, so that it indicates the correct interpretation everywhere, i.e. that 1 << length is the number of palette entries. Signed-off-by: Michal Januszewski <[email protected]> Acked-by: Krzysztof Helt <[email protected]> Cc: <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
513adb5868
commit
ebde441177
3 changed files with 18 additions and 9 deletions
|
|
@ -308,9 +308,11 @@ static int xxxfb_setcolreg(unsigned regno, unsigned red, unsigned green,
|
|||
* color depth = SUM(var->{color}.length)
|
||||
*
|
||||
* Pseudocolor:
|
||||
* var->{color}.offset is 0
|
||||
* var->{color}.length contains width of DAC or the number of unique
|
||||
* colors available (color depth)
|
||||
* var->{color}.offset is 0 unless the palette index takes less than
|
||||
* bits_per_pixel bits and is stored in the upper
|
||||
* bits of the pixel value
|
||||
* var->{color}.length is set so that 1 << length is the number of
|
||||
* available palette entries
|
||||
* pseudo_palette is not used
|
||||
* RAMDAC[X] is programmed to (red, green, blue)
|
||||
* color depth = var->{color}.length
|
||||
|
|
|
|||
|
|
@ -318,13 +318,16 @@ static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
|||
* {hardwarespecific} contains width of RAMDAC
|
||||
* cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset)
|
||||
* RAMDAC[X] is programmed to (red, green, blue)
|
||||
*
|
||||
*
|
||||
* Pseudocolor:
|
||||
* uses offset = 0 && length = RAMDAC register width.
|
||||
* var->{color}.offset is 0
|
||||
* var->{color}.length contains widht of DAC
|
||||
* var->{color}.offset is 0 unless the palette index takes less than
|
||||
* bits_per_pixel bits and is stored in the upper
|
||||
* bits of the pixel value
|
||||
* var->{color}.length is set so that 1 << length is the number of available
|
||||
* palette entries
|
||||
* cmap is not used
|
||||
* RAMDAC[X] is programmed to (red, green, blue)
|
||||
*
|
||||
* Truecolor:
|
||||
* does not use DAC. Usually 3 are present.
|
||||
* var->{color}.offset contains start of bitfield
|
||||
|
|
|
|||
Loading…
Reference in a new issue