Hi Patty!
Thank you very much for these patches! :-)
However, there are issues with your patches. Did you make your changes
on the latest versions? For example, your patch file refers to version
1.2 of arch/arm/mach-pxa/h2200_lcd.c, whereas the current version is 1.6.
Unless I misunderstood something, it would be great if you could apply
your changes to the versions currently in CVS.
Actually, I'd rather let Andrew give his opinions on your changes,
because some of your changes impact all devices and he knows this topics
much better than I do... If only h2200 code was impacted, I wouldn't
have hesitated to commit your changes. I hope you understand.
Thanks a lot for everything that you do for this project!
:-)
Michael
> Hi,
>
> here it goes, updated to the new fbxxx.c from cvs.
>
> I added a new event FB_EVENT_FB_REGISTERED in fb.h, and moved the
> fb_event_register call in fb_console_init to the beginning, so it gets
> registered, even if no framebuffers have registered yet.
>
> Any Comments?
>
> Michael, if you think the patch is ok, can you commit it?
>
> I will put the updated zImage, ... onto my webserver at:
>
> http://patty-server.homeip.net/h2200-port/mar1
>
> Cheers, Patty
>
> --------------------- the diff -------------------------------------
>
> Index: arch/arm/mach-pxa/h2200_lcd.c
> ===================================================================
> RCS file: /cvs/linux/kernel26/arch/arm/mach-pxa/h2200_lcd.c,v
> retrieving revision 1.2
> diff -u -b -r1.2 h2200_lcd.c
> --- arch/arm/mach-pxa/h2200_lcd.c 22 Feb 2004 15:52:53
> -0000 1.2
> +++ arch/arm/mach-pxa/h2200_lcd.c 1 Mar 2004 10:30:57 -0000
> @@ -309,7 +309,6 @@
> {
> debug_func ("\n");
> return soc_driver_register (&h2200_fp_soc_device_driver);
> - return 0;
> }
>
> static void __exit
> Index: drivers/video/fbmem.c
> ===================================================================
> RCS file: /cvs/linux/kernel26/drivers/video/fbmem.c,v
> retrieving revision 1.13
> diff -u -b -r1.13 fbmem.c
> --- drivers/video/fbmem.c 29 Feb 2004 01:49:03 -0000 1.13
> +++ drivers/video/fbmem.c 1 Mar 2004 10:31:14 -0000
> @@ -167,6 +167,7 @@
> extern int tcx_setup(char*);
> extern int leo_init(void);
> extern int leo_setup(char*);
> +extern int mq1100fb_init(void);
> extern int kyrofb_init(void);
> extern int kyrofb_setup(char*);
>
> @@ -385,6 +386,9 @@
> #ifdef CONFIG_FB_VOODOO1
> { "sstfb", sstfb_init, sstfb_setup },
> #endif
> +#ifdef CONFIG_FB_MQ1100
> + { "mq1100fb", mq1100fb_init, NULL },
> +#endif
> #ifdef CONFIG_FB_KYRO
> { "kyrofb", kyrofb_init, kyrofb_setup },
> #endif
> @@ -1303,6 +1307,9 @@
>
> devfs_mk_cdev(MKDEV(FB_MAJOR, i),
> S_IFCHR | S_IRUGO | S_IWUGO, "fb/%d", i);
> +
> + notifier_call_chain (&fb_notifier_list, FB_EVENT_FB_REGISTERED,
> fb_info);
> +
> return 0;
> }
>
> Index: drivers/video/mq1100fb.c
> ===================================================================
> RCS file: /cvs/linux/kernel26/drivers/video/mq1100fb.c,v
> retrieving revision 1.19
> diff -u -b -r1.19 mq1100fb.c
> --- drivers/video/mq1100fb.c 28 Feb 2004 11:43:18 -0000 1.19
> +++ drivers/video/mq1100fb.c 1 Mar 2004 10:31:14 -0000
> @@ -47,12 +47,10 @@
> /* The name of the LCD module to use */
> const char *lm_name;
> struct lcd_module *lm;
> - union {
> /* The RGB palette */
> struct mq1100fb_rgb palette[256];
> - /* Notifier block (used until init complete) */
> + /* Notifier block */
> struct notifier_block notify;
> - };
> /* Framebuffer offset inside MediaQ RAM */
> u32 fb_addr, fb_size;
> /* The pseudo-palette */
> @@ -443,6 +441,14 @@
> return NOTIFY_DONE;
>
> info->lm = lm;
> +
> + /* if we dont have a backlight module yet, we try to find it once
> again */
> + if (!info->bm) {
> + info->bm =
> backlight_module_get(backlight_module_find(info->bm_name));
> + }
> +
> +
> +
> mq1100fb_power (info, 1);
> if (!info->active)
> return NOTIFY_DONE;
> @@ -453,7 +459,6 @@
> return NOTIFY_OK;
> }
>
> -
> static int mq1100fb_probe (struct device *dev, struct mediaq11xx_base
> *base)
> {
> struct mq1100fb_info *info;
> @@ -492,7 +497,6 @@
> /* Defer complete initialization if no LCD module */
> if (!info->active)
> {
> - /* Temporary use palette storage for notifier block */
> info->notify.notifier_call = mq1100fb_lcd_notify;
> info->notify.next = NULL;
> info->notify.priority = 0;
> @@ -512,10 +516,10 @@
>
> static void mq1100fb_soc_shutdown (struct device *dev)
> {
> + debug_func ("\n");
> struct mq1100fb_info *info =
> (struct mq1100fb_info *)dev_get_drvdata (dev);
>
> - debug_func ("\n");
>
> if (!info->initcomplete)
> notifier_chain_unregister (&lcd_module_chain,
> &info->notify);
> @@ -531,11 +535,10 @@
>
> static int mq1100fb_soc_suspend (struct device *dev, u32 state, u32
> level)
> {
> + debug_func ("\n");
> struct mq1100fb_info *info =
> (struct mq1100fb_info *)dev_get_drvdata (dev);
>
> - debug_func ("\n");
> -
> mq1100fb_power (info, 0);
>
> return 0;
> @@ -543,11 +546,10 @@
>
> static int mq1100fb_soc_resume (struct device *dev, u32 level)
> {
> + debug_func ("\n");
> struct mq1100fb_info *info =
> (struct mq1100fb_info *)dev_get_drvdata (dev);
>
> - debug_func ("\n");
> -
> mq1100fb_power (info, 1);
>
> return 0;
> @@ -567,14 +569,24 @@
> }
> };
>
> -static int __init mq1100fb_init(void)
> +static int driver_registered = 0;
> +
> +int __init mq1100fb_init(void)
> {
> + debug_func("\n");
> + if (!driver_registered)
> + {
> + driver_registered = 1;
> return soc_driver_register (&mq1100fb_soc_device_driver);
> + }
> + return 0;
> }
>
> -static void __exit mq1100fb_exit(void)
> +void __exit mq1100fb_exit(void)
> {
> + debug_func("\n");
> soc_driver_unregister (&mq1100fb_soc_device_driver);
> + driver_registered = 0;
> }
>
> module_init(mq1100fb_init);
> Index: drivers/video/console/fbcon.c
> ===================================================================
> RCS file: /cvs/linux/kernel26/drivers/video/console/fbcon.c,v
> retrieving revision 1.3
> diff -u -b -r1.3 fbcon.c
> --- drivers/video/console/fbcon.c 29 Feb 2004 01:49:04
> -0000 1.3
> +++ drivers/video/console/fbcon.c 1 Mar 2004 10:31:14 -0000
> @@ -2295,6 +2295,10 @@
> case FB_EVENT_RESUME:
> fbcon_resumed(info);
> break;
> + case FB_EVENT_FB_REGISTERED:
> + /* a framebuffer was registered, try to take over the console */
> + take_over_console(&fb_con, first_fb_vc, last_fb_vc,
> fbcon_is_default);
> + break;
> }
> return 0;
> }
> @@ -2333,16 +2337,15 @@
>
> int __init fb_console_init(void)
> {
> - if (!num_registered_fb)
> - return -ENODEV;
> - take_over_console(&fb_con, first_fb_vc, last_fb_vc,
> fbcon_is_default);
> acquire_console_sem();
> if (!fbcon_event_notifier_registered) {
> fb_register_client(&fbcon_event_notifer);
> fbcon_event_notifier_registered = 1;
> }
> release_console_sem();
> -
> + if (!num_registered_fb)
> + return -ENODEV;
> + take_over_console(&fb_con, first_fb_vc, last_fb_vc,
> fbcon_is_default);
> return 0;
> }
>
> Index: include/linux/fb.h
> ===================================================================
> RCS file: /cvs/linux/kernel26/include/linux/fb.h,v
> retrieving revision 1.2
> diff -u -b -r1.2 fb.h
> --- include/linux/fb.h 29 Feb 2004 01:49:22 -0000 1.2
> +++ include/linux/fb.h 1 Mar 2004 10:31:15 -0000
> @@ -353,6 +353,8 @@
> * if you own it
> */
> #define FB_EVENT_RESUME 0x03
> +/* A new framebuffer registered */
> +#define FB_EVENT_FB_REGISTERED 0x04
>
> extern int fb_register_client(struct notifier_block *nb);
> extern int fb_unregister_client(struct notifier_block *nb);
>
>
>
> Pattrick Hueper wrote:
>
>> Hi,
>>
>> i cvs updated and saw, that in fbcon.c there now is a event_notify
>> chain, i will try to adapt my changes to use the (newly) existing
>> notify chain in fbmem/fbcon and then resend the patch.
>>
>> Cheers, Patty
>>
>> Pattrick Hueper wrote:
>>
> _______________________________________________
> H2200-port mailing list
> H2200-port_at_handhelds.org
> https://handhelds.org/mailman/listinfo/h2200-port
>
>
-- Michael Opdenacker http://opdenacker.org/Received on Mon Mar 01 2004 - 12:35:38 EST
This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:19:25 EDT