[PATCH 13/16] drm/radeon: move radeon_ib_ring_tests out of chipset code

Michel Dänzer michel at daenzer.net
Mon Jul 9 08:06:54 PDT 2012


On Mon, 2012-07-09 at 12:42 +0200, Christian König wrote: 
> Making it easier to controlwhen it is executed.
> 
> Signed-off-by: Christian König <deathsimple at vodafone.de>
[...] 
> diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
> index 254fdb4..bbd0971 100644
> --- a/drivers/gpu/drm/radeon/radeon_device.c
> +++ b/drivers/gpu/drm/radeon/radeon_device.c
> @@ -822,6 +822,10 @@ int radeon_device_init(struct radeon_device *rdev,
>  	if (r)
>  		return r;
>  
> +	r = radeon_ib_ring_tests(rdev);
> +	if (r)
> +		DRM_ERROR("ib ring test failed (%d).\n", r);
> +
>  	if (rdev->flags & RADEON_IS_AGP && !rdev->accel_working) {
>  		/* Acceleration not working on AGP card try again
>  		 * with fallback to PCI or PCIE GART

I think this needs to set rdev->accel_working = false on failure, so the
AGP -> PCI(e) fallback can kick in.

Not sure about the other places where you're adding
radeon_ib_ring_tests() calls, might need more error handling as well.


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


More information about the dri-devel mailing list