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/vfb.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/vfb.c')
-rw-r--r-- | drivers/video/vfb.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/video/vfb.c b/drivers/video/vfb.c index cc919ae46571..050d432c7d95 100644 --- a/drivers/video/vfb.c +++ b/drivers/video/vfb.c | |||
@@ -318,13 +318,16 @@ static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, | |||
318 | * {hardwarespecific} contains width of RAMDAC | 318 | * {hardwarespecific} contains width of RAMDAC |
319 | * cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset) | 319 | * cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset) |
320 | * RAMDAC[X] is programmed to (red, green, blue) | 320 | * RAMDAC[X] is programmed to (red, green, blue) |
321 | * | 321 | * |
322 | * Pseudocolor: | 322 | * Pseudocolor: |
323 | * uses offset = 0 && length = RAMDAC register width. | 323 | * var->{color}.offset is 0 unless the palette index takes less than |
324 | * var->{color}.offset is 0 | 324 | * bits_per_pixel bits and is stored in the upper |
325 | * var->{color}.length contains widht of DAC | 325 | * bits of the pixel value |
326 | * var->{color}.length is set so that 1 << length is the number of available | ||
327 | * palette entries | ||
326 | * cmap is not used | 328 | * cmap is not used |
327 | * RAMDAC[X] is programmed to (red, green, blue) | 329 | * RAMDAC[X] is programmed to (red, green, blue) |
330 | * | ||
328 | * Truecolor: | 331 | * Truecolor: |
329 | * does not use DAC. Usually 3 are present. | 332 | * does not use DAC. Usually 3 are present. |
330 | * var->{color}.offset contains start of bitfield | 333 | * var->{color}.offset contains start of bitfield |