drm/radeon: add new INFO ioctl requests

Add requests to get the number of shader engines (SE) and
the number of SH per SE.  These are needed for geometry
and tesselation shaders in the 3D driver as well as setting
up PA_SC_RASTER_CONFIG on SI asics.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Deucher
2012-12-04 12:55:37 -05:00
parent a02dc74b31
commit 2e1a7674f6
2 changed files with 20 additions and 0 deletions

View File

@@ -361,6 +361,22 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
return -EINVAL;
}
break;
case RADEON_INFO_MAX_SE:
if (rdev->family >= CHIP_TAHITI)
value = rdev->config.si.max_shader_engines;
else if (rdev->family >= CHIP_CAYMAN)
value = rdev->config.cayman.max_shader_engines;
else if (rdev->family >= CHIP_CEDAR)
value = rdev->config.evergreen.num_ses;
else
value = 1;
break;
case RADEON_INFO_MAX_SH_PER_SE:
if (rdev->family >= CHIP_TAHITI)
value = rdev->config.si.max_sh_per_se;
else
return -EINVAL;
break;
default:
DRM_DEBUG_KMS("Invalid request %d\n", info->request);
return -EINVAL;