Bug 10289 - kernell crash if used "agp=off"
Summary: kernell crash if used "agp=off"
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Alexey Dobriyan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-20 03:03 UTC by Oleksij Rempel (fishor)
Modified: 2008-09-08 21:41 UTC (History)
0 users

See Also:
Kernel Version: 2.6.24 - 2.6.25-rc6
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
oops image (939.82 KB, image/jpeg)
2008-03-20 03:05 UTC, Oleksij Rempel (fishor)
Details

Description Oleksij Rempel (fishor) 2008-03-20 03:03:17 UTC
Latest working kernel version:
Earliest failing kernel version:
Distribution: ubuntu hardy 8.04
Hardware Environment: ASUS P5LD2-VM = ICH7 + i945G + 2 GB RAM + Pentium D
Software Environment:
Problem Description:

If drm and agp modules was compliled in kernel, kernel optio agp=off will couse crash.

Steps to reproduce:

1. compile a kernel with agp_intel and drm_i915
2. reboot and set kernel option agp=off
Comment 1 Oleksij Rempel (fishor) 2008-03-20 03:05:45 UTC
Created attachment 15352 [details]
oops image
Comment 2 Oleksij Rempel (fishor) 2008-03-23 11:08:06 UTC
This commit make this issue:

commit 2716a02f607c964ccaa6fa7266abd3acd73d9033
Author: Dave Airlie <airlied@linux.ie>
Date:   Thu Nov 22 18:23:13 2007 +1000

    drm: call driver load function after initialising AGP
    
    needed to intel chipset flushing
    
    Signed-off-by: Dave Airlie <airlied@linux.ie>

diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c
index 2ed7a5c..def072d 100644
--- a/drivers/char/drm/drm_stub.c
+++ b/drivers/char/drm/drm_stub.c
@@ -98,10 +98,6 @@ static int drm_fill_in_dev(struct drm_device * dev, struct pc
 
        dev->driver = driver;
 
-       if (dev->driver->load)
-               if ((retcode = dev->driver->load(dev, ent->driver_data)))
-                       goto error_out_unreg;
-
        if (drm_core_has_AGP(dev)) {
                if (drm_device_is_agp(dev))
                        dev->agp = drm_agp_init(dev);
@@ -120,6 +116,10 @@ static int drm_fill_in_dev(struct drm_device * dev, struct 
                }
        }
 
+       if (dev->driver->load)
+               if ((retcode = dev->driver->load(dev, ent->driver_data)))
+                       goto error_out_unreg;
+
        retcode = drm_ctxbitmap_init(dev);
        if (retcode) {
                DRM_ERROR("Cannot allocate memory for context bitmap.\n");
Comment 3 Dave Airlie 2008-03-24 01:59:34 UTC
http://cgit.freedesktop.org/mesa/drm/diff/?id=b0817a42e789a83454e6acba0578116829e2bf51

should fix this I'll line it up for upstream.
Comment 4 Alexey Dobriyan 2008-09-08 21:41:26 UTC
Mainline commit 144a75fa1faa4a81530bded2e59872ef80d496b6
(without comment, though).

Note You need to log in before you can comment on or make changes to this bug.