Re: [patch 5/6] Convert to use mutexes instead of semaphores
- From: "Dmitry Torokhov" <dmitry.torokhov@xxxxxxxxx>
- Date: Fri, 11 Aug 2006 10:07:28 -0400
On 8/11/06, Michael Hanselmann <linux-kernel@xxxxxxxxx> wrote:
On Fri, Aug 11, 2006 at 09:34:44AM -0400, Dmitry Torokhov wrote:
> How about we add backlight_set_power(&bd, power) to the backlight core
> to take care of proper locking for drivers?
I've tried to add several functions to the backlight core
({s,g}et_{brightness,power}) and they were rejected. Thus all the
locking is spread over the drivers. I agree it's faulty right now.
It's still easier to move to backlight core functions than to fix all
the drivers.
Because I am responsible/wrote for the broken code, how should I
proceed?
Well, I was reading some more of the drivers and I am also not sure if
such methods are needed in backlight core. Let's take atyfb_base.c -
it tries to manipulate backlight's power from atyfb_blank. But it is
normally called from fb_blank() which is then calls
fb_notifier_call_chain(FB_EVENT_BLANK, &event);
So on the end backlight device will get that event and will turn off
power anyway. Now, atyfb_blank is also called suring suspend/resume so
we probably should just add handling of FB_EVENT_SUSPEND and
FB_EVENT_RESUME to the backlight core.
Richard?
--
Dmitry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [patch 5/6] Convert to use mutexes instead of semaphores
- From: Richard Purdie
- Re: [patch 5/6] Convert to use mutexes instead of semaphores
- References:
- [patch 0/6] Backlight & lcd fixes/cleanups
- From: Dmitry Torokhov
- [patch 5/6] Convert to use mutexes instead of semaphores
- From: Dmitry Torokhov
- Re: [patch 5/6] Convert to use mutexes instead of semaphores
- From: Dmitry Torokhov
- Re: [patch 5/6] Convert to use mutexes instead of semaphores
- From: Richard Purdie
- Re: [patch 5/6] Convert to use mutexes instead of semaphores
- From: Dmitry Torokhov
- Re: [patch 5/6] Convert to use mutexes instead of semaphores
- From: Michael Hanselmann
- [patch 0/6] Backlight & lcd fixes/cleanups
- Prev by Date: Re: Announcing free software graphics drivers for Intel i965 chipset
- Next by Date: Re: mingo@elte.hu, tglx@linutronix.de, linuxppc-dev@ozlabs.org, tsutomu.owa@toshiba.co.jp
- Previous by thread: Re: [patch 5/6] Convert to use mutexes instead of semaphores
- Next by thread: Re: [patch 5/6] Convert to use mutexes instead of semaphores
- Index(es):
Relevant Pages
|
|