From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Sebastian Siewior <frame+buffer@ml.breakpoint.cc>
Cc: tglx@linutronix.de, linux-fbdev-devel@lists.sourceforge.net,
Andrew Morton <akpm@linux-foundation.org>,
Antonino Daplas <adaplas@gmail.com>
Subject: Re: [PATCH v2] [FB] Add the carmine FB driver.
Date: Mon, 21 Apr 2008 11:55:56 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0804211153520.31538@anakin> (raw)
In-Reply-To: <20080421090124.GA11534@Chamillionaire.breakpoint.cc>
On Mon, 21 Apr 2008, Sebastian Siewior wrote:
> +static int carmine_check_var(struct fb_var_screeninfo *var,
> + struct fb_info *info)
> +{
> +
> + if (var->xres_virtual < var->xres)
> + var->xres_virtual = var->xres;
> + if (var->yres_virtual < var->yres)
> + var->yres_virtual = var->yres;
> +
> + var->bits_per_pixel = 32;
> +
> +#ifdef __BIG_ENDIAN
> + var->transp.offset = 24;
> + var->red.offset = 0;
> + var->green.offset = 8;
> + var->blue.offset = 16;
> +#else
> + var->transp.offset = 24;
> + var->red.offset = 16;
> + var->green.offset = 8;
> + var->blue.offset = 0;
> +#endif
> +
> + var->red.length = 8;
> + var->green.length = 8;
> + var->blue.length = 8;
> + var->transp.length = 8;
> +
> + var->red.msb_right = 0;
> + var->green.msb_right = 0;
> + var->blue.msb_right = 0;
> + var->transp.msb_right = 0;
> +
> + return 0;
> +}
So carmine_check_var() always returns success, even if the user
requested for a video mode that is not supported?
> +static int carmine_set_par(struct fb_info *info)
> +{
> + struct carmine_fb *par = info->par;
> +
> + par->new_mode = carmine_find_mode(&info->var);
> +
> + if (par->cur_mode != par->new_mode) {
> +
> + par->cur_mode = par->new_mode;
> + par->res = &car_modes[par->new_mode];
> +
> + carmine_init_display_param(par);
> + set_display_parameters(par);
> + }
> +
> + info->fix.line_length = info->var.xres * info->var.bits_per_pixel / 8;
> + return 0;
> +}
... in which case you just get the default mode, but info->var still
contains the parameters for the mode that's not supported?
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
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
next prev parent reply other threads:[~2008-04-21 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 9:01 [PATCH v2] [FB] Add the carmine FB driver Sebastian Siewior
2008-04-21 9:55 ` Geert Uytterhoeven [this message]
2008-04-21 10:19 ` Sebastian Siewior
2008-04-21 11:12 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0804211153520.31538@anakin \
--to=geert@linux-m68k.org \
--cc=adaplas@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=frame+buffer@ml.breakpoint.cc \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox