From: Eric Miao <hidden> Date: 2008-08-29 07:26:47
Some LCD panels are capable of different resolutions, and is allowed
to change at run-time, so to make "struct lcd_device" to be able to
handle mode change events here.
Signed-off-by: Eric Miao <redacted>
---
drivers/video/backlight/lcd.c | 18 +++++++++++++++---
drivers/video/fbmem.c | 1 +
include/linux/lcd.h | 2 ++
3 files changed, 18 insertions(+), 3 deletions(-)
@@ -27,14 +27,26 @@ static int fb_notifier_callback(struct notifier_block *self,structfb_event*evdata=data;/* If we aren't interested in this event, skip it immediately ... */-if(event!=FB_EVENT_BLANK)+switch(event){+caseFB_EVENT_BLANK:+caseFB_EVENT_MODE_CHANGE:+caseFB_EVENT_MODE_CHANGE_ALL:+break;+default:return0;+}ld=container_of(self,structlcd_device,fb_notif);+if(!ld->ops)+return0;+mutex_lock(&ld->ops_lock);-if(ld->ops)-if(!ld->ops->check_fb||ld->ops->check_fb(ld,evdata->info))+if(!ld->ops->check_fb||ld->ops->check_fb(ld,evdata->info)){+if(event==FB_EVENT_BLANK)ld->ops->set_power(ld,*(int*)evdata->data);+else+ld->ops->set_mode(ld,evdata->data);+}mutex_unlock(&ld->ops_lock);return0;}
@@ -45,6 +45,8 @@ struct lcd_ops {int(*get_contrast)(structlcd_device*);/* Set LCD panel contrast */int(*set_contrast)(structlcd_device*,intcontrast);+/* Set LCD panel mode (resolutions ...) */+int(*set_mode)(structlcd_device*,structfb_videomode*);/* Check if given framebuffer device is the one LCD is bound to;return0ifnot,!=0ifitis.IfNULL,lcdalwaysmatchesthefb.*/int(*check_fb)(structlcd_device*,structfb_info*);
--
1.5.4.3
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Some LCD panels are capable of different resolutions, and is allowed to
change at run-time, so to make "struct lcd_device" to be able to handle
mode change events here.
Signed-off-by: Eric Miao <redacted>
From: Krzysztof Helt <hidden> Date: 2008-08-31 07:41:44
On Fri, 29 Aug 2008 15:26:46 +0800
"Eric Miao" [off-list ref] wrote:
Some LCD panels are capable of different resolutions, and is allowed
to change at run-time, so to make "struct lcd_device" to be able to
handle mode change events here.
Signed-off-by: Eric Miao <redacted>
---
Acked-by: Krzysztof Helt <redacted>
----------------------------------------------------------------------
Tylko u nas - swieza krew w rozsadnych cenach!
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
From: Eric Miao <hidden> Date: 2008-09-01 01:56:24
On Sun, Aug 31, 2008 at 3:20 PM, Krzysztof Helt [off-list ref] wrote:
On Fri, 29 Aug 2008 15:26:46 +0800
"Eric Miao" [off-list ref] wrote:
quoted
Some LCD panels are capable of different resolutions, and is allowed
to change at run-time, so to make "struct lcd_device" to be able to
handle mode change events here.
Signed-off-by: Eric Miao <redacted>
---
Acked-by: Krzysztof Helt <redacted>
OK, thanks. I'll queue this patch for next merge window then.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
On Sun, Aug 31, 2008 at 3:20 PM, Krzysztof Helt [off-list ref] wrote:
quoted
On Fri, 29 Aug 2008 15:26:46 +0800
"Eric Miao" [off-list ref] wrote:
quoted
Some LCD panels are capable of different resolutions, and is allowed
to change at run-time, so to make "struct lcd_device" to be able to
handle mode change events here.
Signed-off-by: Eric Miao <redacted>
---
Acked-by: Krzysztof Helt <redacted>
OK, thanks. I'll queue this patch for next merge window then.
It isn't in linux-next after eight days. Where did this get queued?
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Some LCD panels are capable of different resolutions, and is allowed to
change at run-time, so to make "struct lcd_device" to be able to handle
mode change events here.
Signed-off-by: Eric Miao <redacted>
This patch broke a bit all existing fb drivers. At least you'll get a nice
segfault on modechange, if any lcd driver w/o set_mode is registered.
Please add a check for ld->ops->set_mode being non-NULL.
--
With best wishes
Dmitry
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/