* [PATCH] [resend] intel_agp: Don't oops with zero stolen memory
@ 2010-06-16 8:13 Ondrej Zary
2010-07-01 22:44 ` Eric Anholt
2010-07-05 16:54 ` Eric Anholt
0 siblings, 2 replies; 6+ messages in thread
From: Ondrej Zary @ 2010-06-16 8:13 UTC (permalink / raw)
To: David Airlie; +Cc: linux-kernel
When "onboard video memory" is set do "disabled" in BIOS on Asus P4P800-VM
board (i865G), kernel oopses with memory corruption:
https://bugs.freedesktop.org/show_bug.cgi?id=28430
Fix that by cleanly aborting the initialization.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
diff -urp linux-2.6.35-rc2-orig/drivers/char/agp/intel-gtt.c linux-2.6.35-rc2/drivers/char/agp/intel-gtt.c
--- linux-2.6.35-rc2-orig/drivers/char/agp/intel-gtt.c 2010-06-06 05:43:24.000000000 +0200
+++ linux-2.6.35-rc2/drivers/char/agp/intel-gtt.c 2010-06-14 19:14:05.000000000 +0200
@@ -797,6 +797,10 @@ static int intel_i830_create_gatt_table(
/* we have to call this as early as possible after the MMIO base address is known */
intel_i830_init_gtt_entries();
+ if (intel_private.gtt_entries == 0) {
+ iounmap(intel_private.registers);
+ return -ENOMEM;
+ }
agp_bridge->gatt_table = NULL;
@@ -1279,6 +1283,11 @@ static int intel_i915_create_gatt_table(
/* we have to call this as early as possible after the MMIO base address is known */
intel_i830_init_gtt_entries();
+ if (intel_private.gtt_entries == 0) {
+ iounmap(intel_private.gtt);
+ iounmap(intel_private.registers);
+ return -ENOMEM;
+ }
agp_bridge->gatt_table = NULL;
@@ -1387,6 +1396,11 @@ static int intel_i965_create_gatt_table(
/* we have to call this as early as possible after the MMIO base address is known */
intel_i830_init_gtt_entries();
+ if (intel_private.gtt_entries == 0) {
+ iounmap(intel_private.gtt);
+ iounmap(intel_private.registers);
+ return -ENOMEM;
+ }
agp_bridge->gatt_table = NULL;
--
Ondrej Zary
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [resend] intel_agp: Don't oops with zero stolen memory
2010-06-16 8:13 [PATCH] [resend] intel_agp: Don't oops with zero stolen memory Ondrej Zary
@ 2010-07-01 22:44 ` Eric Anholt
2010-07-02 19:59 ` Ondrej Zary
2010-07-05 16:54 ` Eric Anholt
1 sibling, 1 reply; 6+ messages in thread
From: Eric Anholt @ 2010-07-01 22:44 UTC (permalink / raw)
To: Ondrej Zary, David Airlie; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
On Wed, 16 Jun 2010 10:13:52 +0200, Ondrej Zary <linux@rainbow-software.org> wrote:
> When "onboard video memory" is set do "disabled" in BIOS on Asus P4P800-VM
> board (i865G), kernel oopses with memory corruption:
> https://bugs.freedesktop.org/show_bug.cgi?id=28430
>
> Fix that by cleanly aborting the initialization.
>
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
I haven't seen a system with that option before. Is the integrated
graphics still supposed to work at that point, or is it "graphics is
disabled."? What do other OSes do here?
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [resend] intel_agp: Don't oops with zero stolen memory
2010-07-01 22:44 ` Eric Anholt
@ 2010-07-02 19:59 ` Ondrej Zary
2010-07-02 20:57 ` Eric Anholt
0 siblings, 1 reply; 6+ messages in thread
From: Ondrej Zary @ 2010-07-02 19:59 UTC (permalink / raw)
To: Eric Anholt; +Cc: David Airlie, linux-kernel
On Friday 02 July 2010 00:44:39 Eric Anholt wrote:
> On Wed, 16 Jun 2010 10:13:52 +0200, Ondrej Zary <linux@rainbow-software.org>
wrote:
> > When "onboard video memory" is set do "disabled" in BIOS on Asus
> > P4P800-VM board (i865G), kernel oopses with memory corruption:
> > https://bugs.freedesktop.org/show_bug.cgi?id=28430
> >
> > Fix that by cleanly aborting the initialization.
> >
> > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
>
> I haven't seen a system with that option before. Is the integrated
> graphics still supposed to work at that point, or is it "graphics is
> disabled."? What do other OSes do here?
Testing it right now with Windows XP. Integrated graphics works as secondary
only when the "onboard video memory" is set to "disabled"! If anything other
is set (e.g. 1MB or 32MB), the driver does not load (code 10).
--
Ondrej Zary
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [resend] intel_agp: Don't oops with zero stolen memory
2010-07-02 19:59 ` Ondrej Zary
@ 2010-07-02 20:57 ` Eric Anholt
2010-07-02 21:54 ` Ondrej Zary
0 siblings, 1 reply; 6+ messages in thread
From: Eric Anholt @ 2010-07-02 20:57 UTC (permalink / raw)
To: Ondrej Zary; +Cc: David Airlie, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]
On Fri, 2 Jul 2010 21:59:20 +0200, Ondrej Zary <linux@rainbow-software.org> wrote:
> On Friday 02 July 2010 00:44:39 Eric Anholt wrote:
> > On Wed, 16 Jun 2010 10:13:52 +0200, Ondrej Zary <linux@rainbow-software.org>
> wrote:
> > > When "onboard video memory" is set do "disabled" in BIOS on Asus
> > > P4P800-VM board (i865G), kernel oopses with memory corruption:
> > > https://bugs.freedesktop.org/show_bug.cgi?id=28430
> > >
> > > Fix that by cleanly aborting the initialization.
> > >
> > > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> >
> > I haven't seen a system with that option before. Is the integrated
> > graphics still supposed to work at that point, or is it "graphics is
> > disabled."? What do other OSes do here?
>
> Testing it right now with Windows XP. Integrated graphics works as secondary
> only when the "onboard video memory" is set to "disabled"! If anything other
> is set (e.g. 1MB or 32MB), the driver does not load (code 10).
OK, I was thinking in that case that we should fix the AGP driver's math
so that it correctly set up a chip with no stolen memory allocation. On
the other hand, I don't think we know what the correct math is, so maybe
we should just go ahead with disabling AGP in that case.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [resend] intel_agp: Don't oops with zero stolen memory
2010-07-02 20:57 ` Eric Anholt
@ 2010-07-02 21:54 ` Ondrej Zary
0 siblings, 0 replies; 6+ messages in thread
From: Ondrej Zary @ 2010-07-02 21:54 UTC (permalink / raw)
To: Eric Anholt; +Cc: David Airlie, linux-kernel
On Friday 02 July 2010 22:57:36 Eric Anholt wrote:
> On Fri, 2 Jul 2010 21:59:20 +0200, Ondrej Zary <linux@rainbow-software.org>
wrote:
> > On Friday 02 July 2010 00:44:39 Eric Anholt wrote:
> > > On Wed, 16 Jun 2010 10:13:52 +0200, Ondrej Zary
> > > <linux@rainbow-software.org>
> >
> > wrote:
> > > > When "onboard video memory" is set do "disabled" in BIOS on Asus
> > > > P4P800-VM board (i865G), kernel oopses with memory corruption:
> > > > https://bugs.freedesktop.org/show_bug.cgi?id=28430
> > > >
> > > > Fix that by cleanly aborting the initialization.
> > > >
> > > > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> > >
> > > I haven't seen a system with that option before. Is the integrated
> > > graphics still supposed to work at that point, or is it "graphics is
> > > disabled."? What do other OSes do here?
> >
> > Testing it right now with Windows XP. Integrated graphics works as
> > secondary only when the "onboard video memory" is set to "disabled"! If
> > anything other is set (e.g. 1MB or 32MB), the driver does not load (code
> > 10).
>
> OK, I was thinking in that case that we should fix the AGP driver's math
> so that it correctly set up a chip with no stolen memory allocation. On
> the other hand, I don't think we know what the correct math is, so maybe
> we should just go ahead with disabling AGP in that case.
Someone from Intel should know how to fix this properly.
--
Ondrej Zary
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [resend] intel_agp: Don't oops with zero stolen memory
2010-06-16 8:13 [PATCH] [resend] intel_agp: Don't oops with zero stolen memory Ondrej Zary
2010-07-01 22:44 ` Eric Anholt
@ 2010-07-05 16:54 ` Eric Anholt
1 sibling, 0 replies; 6+ messages in thread
From: Eric Anholt @ 2010-07-05 16:54 UTC (permalink / raw)
To: Ondrej Zary, David Airlie; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 350 bytes --]
On Wed, 16 Jun 2010 10:13:52 +0200, Ondrej Zary <linux@rainbow-software.org> wrote:
> When "onboard video memory" is set do "disabled" in BIOS on Asus P4P800-VM
> board (i865G), kernel oopses with memory corruption:
> https://bugs.freedesktop.org/show_bug.cgi?id=28430
>
> Fix that by cleanly aborting the initialization.
Applied to -next.
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-07-05 16:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16 8:13 [PATCH] [resend] intel_agp: Don't oops with zero stolen memory Ondrej Zary
2010-07-01 22:44 ` Eric Anholt
2010-07-02 19:59 ` Ondrej Zary
2010-07-02 20:57 ` Eric Anholt
2010-07-02 21:54 ` Ondrej Zary
2010-07-05 16:54 ` Eric Anholt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox