Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jul 2007 06:20:09 GMT
From:      vehemens <vehemens@verizon.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/114688: [drm] RADEON/AIGLX/DRM Problem
Message-ID:  <200707280620.l6S6K9jo036729@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/114688; it has been noted by GNATS.

From: vehemens <vehemens@verizon.net>
To: bug-followup@freebsd.org, vehemens@verizon.net
Cc:  
Subject: Re: kern/114688: [drm] RADEON/AIGLX/DRM Problem
Date: Fri, 27 Jul 2007 23:16:45 -0700

 There is now a driver patch that provides a reasonable workaround for the drm 
 locking problem.
 
 It was provided by Kostik Belousov and appears below.  Refer to his email for 
 his comments on the patch.
  
 <http://docs.freebsd.org/cgi/getmsg.cgi?fetch=82619+0+archive/2007/freebsd-x11/20070722.freebsd-x11>;
 
 I have verified that it works.  In addition, I no longer have xserver exit 
 hangs.
 
 Note 1) This patch was not the only change I made to get aiglx with beryl 
 running on my system.  I have updated my 7.0 current system with the 
 development branch of 1) xserver which required pixman as well as mesa, 
 inputproto, keyboard and mouse driver updates, 2) ati driver, 3) drm driver 
 with patches, and 4) misc xorg updates (both released and unreleased) not yet 
 in the ports.
 
 Note 2) I still get a white screen when I restart the xserver and beryl 
 without rebooting.  I do not know if this problem with drm core, drm radeon, 
 or something else.
 
 diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c
 index dda03c1..b7c9ab9 100644
 --- a/sys/dev/drm/drm_drv.c
 +++ b/sys/dev/drm/drm_drv.c
 @@ -711,6 +711,15 @@ int drm_close(struct cdev *kdev, int flags, int fmt, 
 DRM_STRUCTPROC *p)
                 return EINVAL;
         }
 
 +       atomic_inc( &dev->counts[_DRM_STAT_CLOSES] );
 +#ifdef __FreeBSD__
 +       device_unbusy(dev->device);
 +#endif
 +       if (--dev->open_count != 0) {
 +               DRM_UNLOCK();
 +               return (0);
 +       }
 +
         if (dev->driver.preclose != NULL)
                 dev->driver.preclose(dev, filp);
 
 @@ -797,13 +806,8 @@ int drm_close(struct cdev *kdev, int flags, int fmt, 
 DRM_STRUCTPROC *p)
          * End inline drm_release
          */
 
 -       atomic_inc( &dev->counts[_DRM_STAT_CLOSES] );
 -#ifdef __FreeBSD__
 -       device_unbusy(dev->device);
 -#endif
 -       if (--dev->open_count == 0) {
 -               retcode = drm_lastclose(dev);
 -       }
 +
 +       retcode = drm_lastclose(dev);
 
           DRM_UNLOCK();



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