diff options
-rw-r--r-- | drivers/video/skeletonfb.c | 8 | ||||
-rw-r--r-- | drivers/video/vfb.c | 11 | ||||
-rw-r--r-- | include/linux/fb.h | 8 |
3 files changed, 18 insertions, 9 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 |
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 |
diff --git a/include/linux/fb.h b/include/linux/fb.h index f563c5013932..330c4b1bfcaa 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -173,8 +173,12 @@ struct fb_fix_screeninfo { | |||
173 | /* Interpretation of offset for color fields: All offsets are from the right, | 173 | /* Interpretation of offset for color fields: All offsets are from the right, |
174 | * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you | 174 | * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you |
175 | * can use the offset as right argument to <<). A pixel afterwards is a bit | 175 | * can use the offset as right argument to <<). A pixel afterwards is a bit |
176 | * stream and is written to video memory as that unmodified. This implies | 176 | * stream and is written to video memory as that unmodified. |
177 | * big-endian byte order if bits_per_pixel is greater than 8. | 177 | * |
178 | * For pseudocolor: offset and length should be the same for all color | ||
179 | * components. Offset specifies the position of the least significant bit | ||
180 | * of the pallette index in a pixel value. Length indicates the number | ||
181 | * of available palette entries (i.e. # of entries = 1 << length). | ||
178 | */ | 182 | */ |
179 | struct fb_bitfield { | 183 | struct fb_bitfield { |
180 | __u32 offset; /* beginning of bitfield */ | 184 | __u32 offset; /* beginning of bitfield */ |