[PATCH] radeon: Only create additional ring debugfs files on Cayman or newer.

Alex Deucher alexdeucher at gmail.com
Tue Feb 21 08:39:32 PST 2012


2012/2/21 Michel Dänzer <michel at daenzer.net>:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46274
>
> Tested with a Cayman card in a Llano system: The additional files are created
> and working for the Cayman card but not created for the CPU's built-in GPU.
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/radeon/radeon_ring.c |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
> index 4656812..88546d7 100644
> --- a/drivers/gpu/drm/radeon/radeon_ring.c
> +++ b/drivers/gpu/drm/radeon/radeon_ring.c
> @@ -507,8 +507,11 @@ static char radeon_debugfs_ib_names[RADEON_IB_POOL_SIZE][32];
>  int radeon_debugfs_ring_init(struct radeon_device *rdev)
>  {
>  #if defined(CONFIG_DEBUG_FS)
> -       return radeon_debugfs_add_files(rdev, radeon_debugfs_ring_info_list,
> -                                       ARRAY_SIZE(radeon_debugfs_ring_info_list));
> +       if (rdev->family >= CHIP_CAYMAN)
> +               return radeon_debugfs_add_files(rdev, radeon_debugfs_ring_info_list,
> +                                               ARRAY_SIZE(radeon_debugfs_ring_info_list));
> +       else
> +               return radeon_debugfs_add_files(rdev, radeon_debugfs_ring_info_list, 1);
>  #else
>        return 0;
>  #endif
> --
> 1.7.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list