* Question on struct fb_videomode.name
@ 2011-09-26 20:55 Timur Tabi
2011-09-27 12:22 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Timur Tabi @ 2011-09-26 20:55 UTC (permalink / raw)
To: linux-fbdev
In my fb driver, I have an array of fb_videomode structs, like this:
static struct fb_videomode __devinitdata fsl_diu_mode_db[] = {
{
.name = "1024x768-60",
.refresh = 60,
.xres = 1024,
.yres = 768,
.pixclock = 15385,
.left_margin = 160,
.right_margin = 24,
.upper_margin = 29,
.lower_margin = 3,
.hsync_len = 136,
.vsync_len = 6,
.sync = FB_SYNC_COMP_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
.vmode = FB_VMODE_NONINTERLACED
},
...
Is there any value in specifying the .name field as "<xres>x<yres>-<ref>"? I
know the .name field is optional, but what happens if I don't specify it? It
just seems redundant to generate the name based on other data in the same structure.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question on struct fb_videomode.name
2011-09-26 20:55 Question on struct fb_videomode.name Timur Tabi
@ 2011-09-27 12:22 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2011-09-27 12:22 UTC (permalink / raw)
To: linux-fbdev
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1253", Size: 1912 bytes --]
On Mon, Sep 26, 2011 at 22:55, Timur Tabi <timur@freescale.com> wrote:
> In my fb driver, I have an array of fb_videomode structs, like this:
>
> static struct fb_videomode __devinitdata fsl_diu_mode_db[] = {
> Â Â Â Â {
>         .name      = "1024x768-60",
>         .refresh     = 60,
>         .xres      = 1024,
>         .yres      = 768,
>         .pixclock    = 15385,
>         .left_margin   = 160,
>         .right_margin  = 24,
>         .upper_margin  = 29,
>         .lower_margin  = 3,
>         .hsync_len    = 136,
>         .vsync_len    = 6,
>         .sync      = FB_SYNC_COMP_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
>         .vmode      = FB_VMODE_NONINTERLACED
> Â Â Â Â },
> Â Â Â Â ...
>
> Is there any value in specifying the .name field as "<xres>x<yres>-<ref>"? Â I
> know the .name field is optional, but what happens if I don't specify it? Â It
> just seems redundant to generate the name based on other data in the same structure.
If the name is just "<xres>x<yres>-<ref>", you can leave it NULL.
The name only adds value if it's something different, cfr. the modes
in macmodes.c,
amifb.c, or ps3fb.c.
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
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±ýöÝzÿâØ^nr¡ö¦zË\x1aëh¨èÚ&£ûàz¿äz¹Þú+Ê+zf£¢·h§~Ûiÿÿïêÿêçz_è®\x0fæj:+v¨þ)ߣøm
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-27 12:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26 20:55 Question on struct fb_videomode.name Timur Tabi
2011-09-27 12:22 ` 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.