kern/114688: [drm] RADEON/AIGLX/DRM Problem

Norikatsu Shigemura nork at FreeBSD.org
Sat Sep 22 08:38:07 PDT 2007


Hi vehemens!

On Fri, 21 Sep 2007 02:00:15 GMT
vehemens <vehemens at verizon.net> wrote:
>  Revised 7-current patch with Jung-uk Kim's style fixes.

	I didn't know this PR.  I was embarrassed about this issue, too. 
	I confirmed that following patch is GOOD works.

	>> jkim
	Would you please commit your patch?

>  --- drm_drv.c.orig	2006-09-07 16:04:47.000000000 -0700
>  +++ drm_drv.c	2007-09-20 12:20:24.000000000 -0700
>  @@ -711,6 +711,9 @@
>   		return EINVAL;
>   	}
>   
>  +	if (--priv->refs != 0)
>  +		goto done;
>  +
>   	if (dev->driver.preclose != NULL)
>   		dev->driver.preclose(dev, filp);
>   
>  @@ -786,17 +789,17 @@
>   	dev->buf_pgid = 0;
>   #endif /* __NetBSD__  || __OpenBSD__ */
>   
>  -	if (--priv->refs == 0) {
>  -		if (dev->driver.postclose != NULL)
>  -			dev->driver.postclose(dev, priv);
>  -		TAILQ_REMOVE(&dev->files, priv, link);
>  -		free(priv, M_DRM);
>  -	}
>  +
>  +	if (dev->driver.postclose != NULL)
>  +		dev->driver.postclose(dev, priv);
>  +	TAILQ_REMOVE(&dev->files, priv, link);
>  +	free(priv, M_DRM);
>   
>   	/* ========================================================
>   	 * End inline drm_release
>   	 */
>   
>  +done:
>   	atomic_inc( &dev->counts[_DRM_STAT_CLOSES] );
>   #ifdef __FreeBSD__
>   	device_unbusy(dev->device);


More information about the freebsd-bugs mailing list