Am Di, den 19.10.2004 schrieb Jon Smirl um 20:11:
> The fault is in drm_set_busid. It's a NULL pointer reference. I'm not
> seeing this so it may be savage specific. The only place I can see
> where you could get a NULL reference is if the PCI driver didn't set a
> name, dev->pdev->driver->name. Can you add a debug statement and check
> if there is one? The trap looks like it is in a sprintf.

I added these debug statements:

        printk(KERN_ERR "dev = %p\n", dev);
        printk(KERN_ERR "dev->pdev = %p\n", dev->pdev);
        printk(KERN_ERR "dev->pdev->driver = %p\n", dev->pdev->driver);
        printk(KERN_ERR "dev->pdev->driver->name = %p\n", dev->pdev->driver->name);

This is the output:

        dev = c9438800
        dev->pdev = cee8c400
        dev->pdev->driver = 00000000
        dev->pdev->driver->name = f000e2c3

Funny thing is that it doesn't complain about the NULL-pointer
reference. It complains about:

        Unable to handle kernel paging request at virtual address f000e2c3

The real problem is that dev->pdev->driver is NULL.

drm_set_busid is called if the minor interface version is >= 1. This
interface version is requested by the common DRI code in the Xserver.
This in turn depends on the available libdrm version (quoting
xc/programs/Xserver/GL/dri/dri.c):

    if (drmlibmajor == 1 && drmlibminor >= 2) {
        drmSetVersion sv;

        /* Get the interface version, asking for 1.1. */
        sv.drm_di_major = 1;
        sv.drm_di_minor = 1;
        sv.drm_dd_major = -1;
        err = drmSetInterfaceVersion(pDRIPriv->drmFD, &sv);
        if (err == 0) {
            drmdimajor = sv.drm_di_major;
            drmdiminor = sv.drm_di_minor;
        } else {
            /* failure, so set it to 1.0.0. */
            drmdimajor = 1;
            drmdiminor = 0;
        }
    }
    else {
        /* We can't check the DI DRM interface version, so set it to 1.0.0. */
        drmdimajor = 1;
        drmdiminor = 0;
    }

Are you using an up-to-date libdrm for testing?

BTW, I noticed one small thing in drm_set_version that looks like a
typo:

        if_version = DRM_IF_VERSION(sv.drm_di_major, sv.drm_dd_minor);
                                       -----^           -----^

Does it make sense to mix driver and interface versions? Shouldn't it
be:

        if_version = DRM_IF_VERSION(sv.drm_di_major, sv.drm_di_minor);

Regards,
  Felix

-- 
| Felix Kühling <[EMAIL PROTECTED]>                     http://fxk.de.vu |
| PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3  B152 151C 5CC1 D888 E595 |



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to