[PATCH] drm/radeon/si: add missing radeon_bo_unreserve in si_rlc_init()

Michel Dänzer michel at daenzer.net
Fri Apr 13 06:54:49 PDT 2012


On Don, 2012-04-12 at 16:13 -0400, alexdeucher at gmail.com wrote: 
> From: Alex Deucher <alexander.deucher at amd.com>
> 
> Forget to unreserve after pinning.  This can lead to problems in
> soft reset and resume.
> 
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
[...] 
> @@ -3024,12 +3025,12 @@ int si_rlc_init(struct radeon_device *rdev)
>  	r = radeon_bo_pin(rdev->rlc.clear_state_obj, RADEON_GEM_DOMAIN_VRAM,
>  			  &rdev->rlc.clear_state_gpu_addr);
>  	if (r) {
> -
>  		radeon_bo_unreserve(rdev->rlc.clear_state_obj);
>  		dev_warn(rdev->dev, "(%d) pin RLC c bo failed\n", r);
>  		si_rlc_fini(rdev);
>  		return r;
>  	}
> +	radeon_bo_unreserve(rdev->rlc.clear_state_obj);
>  
>  	return 0;
>  }

Instead of these two radeon_bo_unreserve calls, there could be one
between the radeon_bo_pin call and the test of its return value.

Either way,

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the dri-devel mailing list