Re: Question on struct fb_videomode.name

From
Geert Uytterhoeven <geert@linux-m68k.org>
Date
2011-09-27 12:22:53
Reply to
Timur Tabi, 2011-09-26
On Mon, Sep 26, 2011 at 22:55, Timur Tabi [off-list ref] 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Η+‰·�®‰­†+%�Λ�±ιέ¶¥�w�Ί{.nΗ+‰·¥�{±ύφέz�β�Ψ^n‡r΅φ¦zΛ�λh™¨θ­Ϊ&£ϋΰzΏδzΉή—ϊ+€Κ+zf£Ά·h��§~†­†Ϋi��ο�κ�‘κηz_θ®ζj:+v‰¨ώ)ί£ψm
Thread (2 messages) 2 messages, 2 authors, last reply 2011-09-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help