Re: [Linux-fbdev-devel] Re: [PATCH] fbdev: colormap fixes

Antonino A. Daplas
2005-07-28T22:17:03Z

Jon Smirl wrote:
> Can you review this fix for the issues below? I fixed things to
> automatically adjust the number of entries to whatever fits in
> PAGE_SIZE.
>
> diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
> --- a/drivers/video/fbsysfs.c
> +++ b/drivers/video/fbsysfs.c
> @@ -244,15 +244,15 @@ static ssize_t show_virtual(struct class
>
> /* Format for cmap is "%02x%c%4x%4x%4x\n" */
>
Why is the alpha channel not given the same weight as the RGB? Wouldn't
it be correct to also give it 4 bytes (16 bits) Also, what would happen if
you exceed 256 entries, you've only alloted a maximum of 256 for the
index? This will also be a problem because you cannot access cmap entries
past 255.

So, 4 bytes per channel + 4 bytes for the index will be needed per entry,

Tony