Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 2008 10:20:16 +1000
From:      Alex <mailinglist@ahhyes.net>
To:        freebsd-x11@freebsd.org
Subject:   Re: DRI not working
Message-ID:  <48DECDC0.20709@ahhyes.net>
In-Reply-To: <1222524191.1662.3.camel@wombat.2hip.net>
References:  <48DD9ECD.40309@ahhyes.net> <1222524191.1662.3.camel@wombat.2hip.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@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!





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48DECDC0.20709>