From: Olaf Hering <olh@suse.de>
To: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
Andrew Morton <akpm@osdl.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: [PATCH] crash in aty128_set_lcd_enable on PowerBook
Date: Mon, 31 Jul 2006 20:50:24 +0200 [thread overview]
Message-ID: <20060731185024.GA5117@suse.de> (raw)
In-Reply-To: <20060716163728.GA16228@suse.de>
On Sun, Jul 16, Olaf Hering wrote:
>
> Current Linus tree crashes in aty128_set_lcd_enable() because par->pdev
> is NULL. This happens since at least a week. Call trace is:
>
> aty128_set_lcd_enable
> aty128fb_set_par
> fbcon_init
> visual_init
> take_over_console
> fbcon_takeover
> notifier_call_chain
> blocking_notifier_call_chain
> register_framebuffer
> aty128fb_probe
> pci_device_probe
> bus_for_each_dev
> driver_attach
> bus_add_driver
> driver_register
> __pci_register_driver
> aty128fb_init
> init
> kernel_thread
>
- info->fix was assigned twice.
- par->vram_size is assigned in aty128_probe(), no need to redo it again in aty128_init()
- register_framebuffer() uses uninitialized struct members,
move it past par->pdev assignment and past aty128_bl_init().
Signed-off-by: Olaf Hering <olh@suse.de>
Index: linux-2.6.18-rc3/drivers/video/aty/aty128fb.c
===================================================================
--- linux-2.6.18-rc3.orig/drivers/video/aty/aty128fb.c
+++ linux-2.6.18-rc3/drivers/video/aty/aty128fb.c
@@ -1910,9 +1910,6 @@ static int __devinit aty128_init(struct
u8 chip_rev;
u32 dac;
- if (!par->vram_size) /* may have already been probed */
- par->vram_size = aty_ld_le32(CONFIG_MEMSIZE) & 0x03FFFFFF;
-
/* Get the chip revision */
chip_rev = (aty_ld_le32(CONFIG_CNTL) >> 16) & 0x1F;
@@ -2025,9 +2022,6 @@ static int __devinit aty128_init(struct
aty128_init_engine(par);
- if (register_framebuffer(info) < 0)
- return 0;
-
par->pm_reg = pci_find_capability(pdev, PCI_CAP_ID_PM);
par->pdev = pdev;
par->asleep = 0;
@@ -2037,6 +2031,9 @@ static int __devinit aty128_init(struct
aty128_bl_init(par);
#endif
+ if (register_framebuffer(info) < 0)
+ return 0;
+
printk(KERN_INFO "fb%d: %s frame buffer device on %s\n",
info->node, info->fix.id, video_card);
@@ -2086,7 +2083,6 @@ static int __devinit aty128_probe(struct
par = info->par;
info->pseudo_palette = par->pseudo_palette;
- info->fix = aty128fb_fix;
/* Virtualize mmio region */
info->fix.mmio_start = reg_addr;
next prev parent reply other threads:[~2006-07-31 18:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-16 16:37 crash in aty128_set_lcd_enable on PowerBook Olaf Hering
2006-07-16 16:50 ` Olaf Hering
2006-07-16 19:19 ` Benjamin Herrenschmidt
2006-07-16 19:19 ` Benjamin Herrenschmidt
2006-07-16 19:25 ` Benjamin Herrenschmidt
2006-07-16 19:25 ` Benjamin Herrenschmidt
2006-07-16 19:27 ` Olaf Hering
2006-07-16 19:27 ` Olaf Hering
2006-07-16 19:43 ` Benjamin Herrenschmidt
2006-07-16 19:43 ` Benjamin Herrenschmidt
2006-07-16 19:50 ` Olaf Hering
2006-07-16 19:50 ` Olaf Hering
2006-07-31 18:50 ` Olaf Hering [this message]
2006-07-31 23:50 ` [PATCH] " Antonino A. Daplas
2006-07-31 23:50 ` Antonino A. Daplas
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=20060731185024.GA5117@suse.de \
--to=olh@suse.de \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.