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

2005-07-29 Thread James Simmons
> > No, bits_per_pixel can be (much) larger than the color map size. E.g. a > > simple > > ARGB directcolor mode has bits_per_pixel = 32 and color map size = 256. > > So I have the bits_per_pixel attribute wrong in sysfs. It needs to be > bits_per_color and then let the driver sort it out.

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

2005-07-29 Thread James Simmons
> > 3) Add another file in sysfs which specifies at what index and how many > > entries will be read or written from or to the cmap. With this additional > > sysfs file, it should be able to handle any reasonable cmap length, but > > it will take more than one reading of the color_map file. Anot

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

2005-07-29 Thread Jon Smirl
On 7/29/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > On Fri, 29 Jul 2005, Antonino A. Daplas wrote: > > Jon Smirl wrote: > > > On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > > > On Thu, 28 Jul 2005, Jon Smirl wrote: > > > > > I've verified now that all ATI R300+ chips have 10b

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

2005-07-29 Thread Geert Uytterhoeven
On Fri, 29 Jul 2005, Antonino A. Daplas wrote: > Jon Smirl wrote: > > On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > > On Thu, 28 Jul 2005, Jon Smirl wrote: > > > > I've verified now that all ATI R300+ chips have 10bit cmaps. These are > > > > pretty common so I'd be in favor of maki

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

2005-07-28 Thread Antonino A. Daplas
Geert Uytterhoeven wrote: On Thu, 28 Jul 2005, Antonino A. Daplas wrote: Jon Smirl wrote: On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: On Wed, 27 Jul 2005, Linux Kernel Mailing List wrote: There are a couple of ways to fix this. 1) Add a check to limit use of the sysfs attributes

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

2005-07-28 Thread Antonino A. Daplas
Jon Smirl wrote: On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: On Thu, 28 Jul 2005, Jon Smirl wrote: I've verified now that all ATI R300+ chips have 10bit cmaps. These are pretty common so I'd be in favor of making this into a binary attribute where I can get/set the whole table at

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

2005-07-28 Thread Antonino A. Daplas
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

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

2005-07-28 Thread Jon Smirl
On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > On Thu, 28 Jul 2005, Jon Smirl wrote: > > I've verified now that all ATI R300+ chips have 10bit cmaps. These are > > pretty common so I'd be in favor of making this into a binary > > attribute where I can get/set the whole table at once. G

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

2005-07-28 Thread Geert Uytterhoeven
On Thu, 28 Jul 2005, Jon Smirl wrote: > I've verified now that all ATI R300+ chips have 10bit cmaps. These are > pretty common so I'd be in favor of making this into a binary > attribute where I can get/set the whole table at once. Given that > OpenGL is already supporting 12 and 16 bits these tabl

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

2005-07-28 Thread Jon Smirl
On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > On Thu, 28 Jul 2005, Jon Smirl wrote: > > I can't see a way to query how long of cmap the device supports using > > the current fbdev ioctls. > > Look at the lengths of the color bitfields? Which color bitfields? Does hardware that suppo

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

2005-07-28 Thread Jon Smirl
I've verified now that all ATI R300+ chips have 10bit cmaps. These are pretty common so I'd be in favor of making this into a binary attribute where I can get/set the whole table at once. Given that OpenGL is already supporting 12 and 16 bits these tables are only going to get much larger. 1024 en

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

2005-07-28 Thread Jon Smirl
On 7/28/05, Jon Smirl <[EMAIL PROTECTED]> wrote: > On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > On Thu, 28 Jul 2005, Jon Smirl wrote: > > > I can't see a way to query how long of cmap the device supports using > > > the current fbdev ioctls. > > > > Look at the lengths of the color

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

2005-07-28 Thread Geert Uytterhoeven
On Thu, 28 Jul 2005, Jon Smirl wrote: > I can't see a way to query how long of cmap the device supports using > the current fbdev ioctls. Look at the lengths of the color bitfields? > I wouldn't even be messing with cmap except for the true/direct color > support and gamma ramps. Don't I need to

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

2005-07-28 Thread Jon Smirl
I can't see a way to query how long of cmap the device supports using the current fbdev ioctls. I wouldn't even be messing with cmap except for the true/direct color support and gamma ramps. Don't I need to know how long the cmap is in order to set the right gamma ramp? If I set a 256 entry gamma

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

2005-07-28 Thread Jon Smirl
On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > On Thu, 28 Jul 2005, Antonino A. Daplas wrote: > > Jon Smirl wrote: > > > On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > > > On Wed, 27 Jul 2005, Linux Kernel Mailing List wrote: > > > > > > There are a couple of ways to fix

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

2005-07-28 Thread Geert Uytterhoeven
On Thu, 28 Jul 2005, Antonino A. Daplas wrote: > Jon Smirl wrote: > > On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > > On Wed, 27 Jul 2005, Linux Kernel Mailing List wrote: > > > > There are a couple of ways to fix this. > > 1) Add a check to limit use of the sysfs attributes to 25

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

2005-07-28 Thread Antonino A. Daplas
Jon Smirl wrote: On 7/28/05, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: On Wed, 27 Jul 2005, Linux Kernel Mailing List wrote: There are a couple of ways to fix this. 1) Add a check to limit use of the sysfs attributes to 256 entries. If you want more you have to use /dev/fb0 and the ioct