DRI not working

Alex mailinglist at ahhyes.net
Sun Sep 28 00:20:14 UTC 2008


Robert Noland wrote:
> drm shouldn't be attaching to the second head.  The 852/5 chips have the
> same pci id on both heads, which none of the other chips do.  Please try
> the attached patch to sys/dev/drm/i915_drv.c and see if that improves
> things.
>
> robert.
>   
Hi Robert,

Thank you for your reply, and patch, but it seems the patch will not 
apply cleanly.

[root at laptop /usr/src/sys/dev/drm]# patch -p0 < i855-no-attach-sec.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Index: i915_drv.c
|===================================================================
|--- i915_drv.c    (revision 183406)
|+++ i915_drv.c    (working copy)
--------------------------
Patching file i915_drv.c using Plan A...
Hunk #1 failed at 85.
1 out of 1 hunks failed--saving rejects to i915_drv.c.rej
done

[root at laptop /usr/src/sys/dev/drm]# cat i915_drv.c.rej
***************
*** 85,90 ****
  {
      drm_device_t *dev = device_get_softc(nbdev);
 
      bzero(dev, sizeof(drm_device_t));
      i915_configure(dev);
      return drm_attach(nbdev, i915_pciidlist);
--- 85,93 ----
  {
      drm_device_t *dev = device_get_softc(nbdev);
 
+     if (device_get_unit(nbdev))
+         return 0;
+
      bzero(dev, sizeof(drm_device_t));
      i915_configure(dev);
      return drm_attach(nbdev, i915_pciidlist);


I added the 2 lines manually. So the function looks like this:

static int
i915_attach(device_t nbdev)
{
        drm_device_t *dev = device_get_softc(nbdev);
        if (device_get_unit(nbdev))
        return 0;

       
        bzero(dev, sizeof(drm_device_t));
        i915_configure(dev);
        return drm_attach(nbdev, i915_pciidlist);
}

Will rebuild and test..

Thanks!




More information about the freebsd-x11 mailing list