All of lore.kernel.org
 help / color / mirror / Atom feed
* Use of 'reserved' fields in var_screeninfo
@ 2005-11-14 19:17 Kevin Hilman
  2005-11-14 19:30 ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Hilman @ 2005-11-14 19:17 UTC (permalink / raw)
  To: linux-fbdev-devel

Hello,

I've got a question about the purpose of the reserved fields in the
var_screeninfo struct:

struct fb_var_screeninfo {
	[ ... ]
	__u32 reserved[5];		/* Reserved for future compatibility */
};

What are these reserved for?  Is it appropriate for drivers to use these for
additional, HW-specific values that are then made available to the VSCREENINFO
ioctls?

If a driver does store state here, or attempt to pass info using an ioctl, the
data is promptly overwritten by fbcon during an fbcon_switch(), when it creates
a var_screeninfo struct, memsets it to zero, copies a couple fields and passes
it to fb_set_var().

I have a patch to copy the 'reserved' fields during an fbcon_switch() that
solves the problem but I'm not sure if this is the right thing to do.

-- 
Kevin Hilman
MontaVista Software -- http://www.mvista.com/



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Use of 'reserved' fields in var_screeninfo
  2005-11-14 19:17 Use of 'reserved' fields in var_screeninfo Kevin Hilman
@ 2005-11-14 19:30 ` Geert Uytterhoeven
  2005-11-14 19:46   ` Kevin Hilman
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2005-11-14 19:30 UTC (permalink / raw)
  To: Linux Frame Buffer Device Development

On Mon, 14 Nov 2005, Kevin Hilman wrote:
> I've got a question about the purpose of the reserved fields in the
> var_screeninfo struct:
> 
> struct fb_var_screeninfo {
> 	[ ... ]
> 	__u32 reserved[5];		/* Reserved for future compatibility */
> };
> 
> What are these reserved for?  Is it appropriate for drivers to use these for

They are reserved for future expansion.

> additional, HW-specific values that are then made available to the VSCREENINFO
> ioctls?

Not really, only for generic info that's useful for multiple drivers.
What do you want to export there?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Use of 'reserved' fields in var_screeninfo
  2005-11-14 19:30 ` Geert Uytterhoeven
@ 2005-11-14 19:46   ` Kevin Hilman
  2005-11-14 19:57     ` Kevin Hilman
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Hilman @ 2005-11-14 19:46 UTC (permalink / raw)
  To: linux-fbdev-devel

Geert Uytterhoeven wrote:
> On Mon, 14 Nov 2005, Kevin Hilman wrote:
> 
>>I've got a question about the purpose of the reserved fields in the
>>var_screeninfo struct:
>>
>>struct fb_var_screeninfo {
>>	[ ... ]
>>	__u32 reserved[5];		/* Reserved for future compatibility */
>>};
>>
>>What are these reserved for?  Is it appropriate for drivers to use these for
> 
> 
> They are reserved for future expansion.
> 
> 
>>additional, HW-specific values that are then made available to the VSCREENINFO
>>ioctls?
> 
> 
> Not really, only for generic info that's useful for multiple drivers.
> What do you want to export there?
> 

I'm just weighing the options of whether I should just add a new
device-specific ioctl, or try to export this as part of the var_screeninfo.

I've got some HW which has the ability display/blend up to 4 video/graphics
sources within a root display window.  I'd like to export this x,y offset
(which is independent of the xoffset,yoffset for the virtual/visual stuff).
Also, it has a per-source scaling factor I'd like to export.

Kevin




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Use of 'reserved' fields in var_screeninfo
  2005-11-14 19:46   ` Kevin Hilman
@ 2005-11-14 19:57     ` Kevin Hilman
  2005-11-14 20:00       ` Geert Uytterhoeven
  2005-11-14 20:04       ` Antonino A. Daplas
  0 siblings, 2 replies; 7+ messages in thread
From: Kevin Hilman @ 2005-11-14 19:57 UTC (permalink / raw)
  To: linux-fbdev-devel

Kevin Hilman wrote:
> Geert Uytterhoeven wrote:
> 
>>What do you want to export there?
>>
> 
> 
> I'm just weighing the options of whether I should just add a new
> device-specific ioctl, or try to export this as part of the var_screeninfo.
> 

Come to think of it, no matter what I added to the screeninfo struct,
fbcon_switch() would have to be hacked to not disrupt any new fields since it
does a memset-to-zero.

I think a device-specific ioctl is the way to go.

Thanks for  the help.
-- 
Kevin Hilman
MontaVista Software -- http://www.mvista.com/



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Use of 'reserved' fields in var_screeninfo
  2005-11-14 19:57     ` Kevin Hilman
@ 2005-11-14 20:00       ` Geert Uytterhoeven
  2005-11-14 20:04       ` Antonino A. Daplas
  1 sibling, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2005-11-14 20:00 UTC (permalink / raw)
  To: Linux Frame Buffer Device Development

On Mon, 14 Nov 2005, Kevin Hilman wrote:
> Kevin Hilman wrote:
> > Geert Uytterhoeven wrote:
> >>What do you want to export there?
> > 
> > I'm just weighing the options of whether I should just add a new
> > device-specific ioctl, or try to export this as part of the var_screeninfo.
> > 
> 
> Come to think of it, no matter what I added to the screeninfo struct,
> fbcon_switch() would have to be hacked to not disrupt any new fields since it
> does a memset-to-zero.
> 
> I think a device-specific ioctl is the way to go.

That's indeed the best solution for now, until we have a real API for handling
multiple planes.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Use of 'reserved' fields in var_screeninfo
  2005-11-14 19:57     ` Kevin Hilman
  2005-11-14 20:00       ` Geert Uytterhoeven
@ 2005-11-14 20:04       ` Antonino A. Daplas
  2005-11-14 20:14         ` Geert Uytterhoeven
  1 sibling, 1 reply; 7+ messages in thread
From: Antonino A. Daplas @ 2005-11-14 20:04 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: khilman

Kevin Hilman wrote:
> Kevin Hilman wrote:
>> Geert Uytterhoeven wrote:
> 
> I think a device-specific ioctl is the way to go.

Or sysfs.

Tony


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Use of 'reserved' fields in var_screeninfo
  2005-11-14 20:04       ` Antonino A. Daplas
@ 2005-11-14 20:14         ` Geert Uytterhoeven
  0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2005-11-14 20:14 UTC (permalink / raw)
  To: Linux Frame Buffer Device Development; +Cc: khilman

On Tue, 15 Nov 2005, Antonino A. Daplas wrote:
> Kevin Hilman wrote:
> > Kevin Hilman wrote:
> >> Geert Uytterhoeven wrote:
> > 
> > I think a device-specific ioctl is the way to go.
> 
> Or sysfs.

Even better!

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-11-14 20:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14 19:17 Use of 'reserved' fields in var_screeninfo Kevin Hilman
2005-11-14 19:30 ` Geert Uytterhoeven
2005-11-14 19:46   ` Kevin Hilman
2005-11-14 19:57     ` Kevin Hilman
2005-11-14 20:00       ` Geert Uytterhoeven
2005-11-14 20:04       ` Antonino A. Daplas
2005-11-14 20:14         ` Geert Uytterhoeven

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.