diff options
author | Michal Januszewski <spock@gentoo.org> | 2009-04-13 17:39:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-13 18:04:29 -0400 |
commit | ebde441177da3bad156701d351509f34295282ab (patch) | |
tree | 816eca54fcde1e42d4ba81ab80533188724a64ee /drivers/video/skeletonfb.c | |
parent | 513adb58685615b0b1d47a3f0d40f5352beff189 (diff) |
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 <spock@gentoo.org>
Acked-by: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: <syrjala@sci.fi>
Acked-by: Geert Uytterhoeven <geert.uytterhoeven@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/skeletonfb.c')
-rw-r--r-- | drivers/video/skeletonfb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/skeletonfb.c b/drivers/video/skeletonfb.c index a439159204a8..89158bc71da2 100644 --- a/drivers/video/skeletonfb.c +++ b/drivers/video/skeletonfb.c | |||
@@ -308,9 +308,11 @@ static int xxxfb_setcolreg(unsigned regno, unsigned red, unsigned green, | |||
308 | * color depth = SUM(var->{color}.length) | 308 | * color depth = SUM(var->{color}.length) |
309 | * | 309 | * |
310 | * Pseudocolor: | 310 | * Pseudocolor: |
311 | * var->{color}.offset is 0 | 311 | * var->{color}.offset is 0 unless the palette index takes less than |
312 | * var->{color}.length contains width of DAC or the number of unique | 312 | * bits_per_pixel bits and is stored in the upper |
313 | * colors available (color depth) | 313 | * bits of the pixel value |
314 | * var->{color}.length is set so that 1 << length is the number of | ||
315 | * available palette entries | ||
314 | * pseudo_palette is not used | 316 | * pseudo_palette is not used |
315 | * RAMDAC[X] is programmed to (red, green, blue) | 317 | * RAMDAC[X] is programmed to (red, green, blue) |
316 | * color depth = var->{color}.length | 318 | * color depth = var->{color}.length |