[Mesa-dev] [RFC PATCH] winsys/radeon: drop support for kernels lacking tile mode array queries

Nicolai Hähnle nhaehnle at gmail.com
Thu Apr 28 17:56:16 UTC 2016


Given Emil's tentative release plan, 3.13 will be almost two and half 
years old by the time this is released - seems fair to me.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>

On 28.04.2016 08:21, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> This will allow us to simplify a lot of code around tiling.
>
> Kernel 3.10 is required for SI.
> Kernel 3.13 is required for CIK.
> ---
>   src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 20 ++++++++++++++------
>   1 file changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
> index 2d9ec8c..702d073 100644
> --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
> +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
> @@ -504,14 +504,22 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
>           return FALSE;
>       }
>
> -    if (radeon_get_drm_value(ws->fd, RADEON_INFO_SI_TILE_MODE_ARRAY, NULL,
> -                             ws->info.si_tile_mode_array)) {
> -        ws->info.si_tile_mode_array_valid = TRUE;
> +    if (ws->info.chip_class == CIK) {
> +        if (!radeon_get_drm_value(ws->fd, RADEON_INFO_CIK_MACROTILE_MODE_ARRAY, NULL,
> +                                  ws->info.cik_macrotile_mode_array)) {
> +            fprintf(stderr, "radeon: Kernel 3.13 is required for CIK support.\n");
> +            return FALSE;
> +        }
> +        ws->info.cik_macrotile_mode_array_valid = TRUE;
>       }
>
> -    if (radeon_get_drm_value(ws->fd, RADEON_INFO_CIK_MACROTILE_MODE_ARRAY, NULL,
> -                             ws->info.cik_macrotile_mode_array)) {
> -        ws->info.cik_macrotile_mode_array_valid = TRUE;
> +    if (ws->info.chip_class >= SI) {
> +        if (!radeon_get_drm_value(ws->fd, RADEON_INFO_SI_TILE_MODE_ARRAY, NULL,
> +                                  ws->info.si_tile_mode_array)) {
> +            fprintf(stderr, "radeon: Kernel 3.10 is required for SI support.\n");
> +            return FALSE;
> +        }
> +        ws->info.si_tile_mode_array_valid = TRUE;
>       }
>
>       /* Hawaii with old firmware needs type2 nop packet.
>


More information about the mesa-dev mailing list