[Mesa-dev] [PATCH] radeonsi: fix CMASK and HTILE allocation on Tahiti

Michel Dänzer michel at daenzer.net
Thu Aug 7 19:18:34 PDT 2014


On 08.08.2014 05:44, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> Tahiti has 12 tile pipes, but P8 pipe config.
> 
> It looks like there is no way to get the pipe config except for reading
> GB_TILE_MODE. The TILING_CONFIG ioctl doesn't return more than 8 pipes,
> so we can't use that for Hawaii.
> 
> This fixes a regression caused by 9b046474c95f15338d4c748df9b62871bba6f36f
> on Tahiti.
> 
> Cc: mesa-stable at lists.freedesktop.org

[...]

> +	switch (G_009910_PIPE_CONFIG(mode2d)) {
> +	case V_02803C_ADDR_SURF_P2:
> +		sscreen->b.tiling_info.num_channels = 2;
> +		break;
> +	case V_02803C_X_ADDR_SURF_P4_8X16:
> +	case V_02803C_X_ADDR_SURF_P4_16X16:
> +	case V_02803C_X_ADDR_SURF_P4_16X32:
> +	case V_02803C_X_ADDR_SURF_P4_32X32:
> +		sscreen->b.tiling_info.num_channels = 4;
> +		break;
> +	case V_02803C_X_ADDR_SURF_P8_16X16_8X16:
> +	case V_02803C_X_ADDR_SURF_P8_16X32_8X16:
> +	case V_02803C_X_ADDR_SURF_P8_32X32_8X16:
> +	case V_02803C_X_ADDR_SURF_P8_16X32_16X16:
> +	case V_02803C_X_ADDR_SURF_P8_32X32_16X16:
> +	case V_02803C_X_ADDR_SURF_P8_32X32_16X32:
> +	case V_02803C_X_ADDR_SURF_P8_32X64_32X32:
> +		sscreen->b.tiling_info.num_channels = 8;
> +		break;
> +	case V_02803C_X_ADDR_SURF_P16_32X32_8X16:
> +	case V_02803C_X_ADDR_SURF_P16_32X32_16X16:
> +		sscreen->b.tiling_info.num_channels = 16;
> +		break;
> +	default:
> +		return false;
> +	}

Might be nice to print an error message in the default case, so we can
see if it's ever hit. Either way though,

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


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


More information about the mesa-dev mailing list