From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: James Simmons <jsimmons@infradead.org>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: Fbdev and PM patch.
Date: Sat, 13 Sep 2003 14:00:18 +0200 [thread overview]
Message-ID: <1063454417.674.11.camel@gaston> (raw)
In-Reply-To: <Pine.LNX.4.44.0309121858550.5017-100000@phoenix.infradead.org>
On Fri, 2003-09-12 at 20:08, James Simmons wrote:
> Hi!
>
> I looked at your PM patch and I have a few ideas. The first thing I
> did was create a dummy struct fb_ops instead of dummy functions for each
> function for fb_ops. Plus you only had dummy functions for the basic
> functions. So in the style of dummycon.c I created a dummy struct fb_ops.
> I like to seperate out the client management code out of fbmem.c into
> a seperate file. Especially with the device handling stuff it is quite
> ugly looking. Here is what I suggest:
I kept the fb_ops on purpose. If you look at my implementation in
radeonfb, you'll see for example that the check_var/set_par fully
works during sleep, except that the HW isn't touched, but on wakeup,
the mode that was set during sleep will be applied properly.
If you put dummy fb_ops, you'll either let var be changed without
control from the driver, or make any set_var fail, which is a policy
decision I didn't want to take (but acceptable).
> struct fb_client_ops {
> struct module *owner;
> void (*state_manager)(struct fb_info *info, void *data, u32 state);
> }
>
> The idea is instead of a bunch of functions we have one function for
> state management. In struct fb_info we keep track of the state flag to see
> what the states are. We have something like this:
>
> int
> fb_change_state(struct fb_info *info, u32 state)
> {
> if (info->state & state)
> return;
>
> Your fb_client_call_##name code except it is now only one
> function.
> }
>
> What do you think?
Well... The mode change notification isn't a state per-se and would
benefit from beeing a separate function. For the Power Management
callbacks, I don't mind either way
Ben.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
prev parent reply other threads:[~2003-09-13 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-07 10:00 EDID vs. fbmon & radeon Benjamin Herrenschmidt
2003-09-08 23:53 ` James Simmons
2003-09-09 8:00 ` Benjamin Herrenschmidt
2003-09-12 17:58 ` James Simmons
2003-09-12 18:08 ` Fbdev and PM patch James Simmons
2003-09-13 12:00 ` Benjamin Herrenschmidt [this message]
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=1063454417.674.11.camel@gaston \
--to=benh@kernel.crashing.org \
--cc=jsimmons@infradead.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).