Skip to content

Commit 6565945

Browse files
agd5fairlied
authored andcommitted
drm/radeon/kms: add info query for tile pipes
needed by mesa for htile setup. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent 834f0c3 commit 6565945

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

drivers/gpu/drm/radeon/radeon_kms.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,19 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
221221
return -EINVAL;
222222
}
223223
break;
224+
case RADEON_INFO_NUM_TILE_PIPES:
225+
if (rdev->family >= CHIP_CAYMAN)
226+
value = rdev->config.cayman.max_tile_pipes;
227+
else if (rdev->family >= CHIP_CEDAR)
228+
value = rdev->config.evergreen.max_tile_pipes;
229+
else if (rdev->family >= CHIP_RV770)
230+
value = rdev->config.rv770.max_tile_pipes;
231+
else if (rdev->family >= CHIP_R600)
232+
value = rdev->config.r600.max_tile_pipes;
233+
else {
234+
return -EINVAL;
235+
}
236+
break;
224237
default:
225238
DRM_DEBUG_KMS("Invalid request %d\n", info->request);
226239
return -EINVAL;

include/drm/radeon_drm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ struct drm_radeon_cs {
909909
#define RADEON_INFO_WANT_CMASK 0x08 /* get access to CMASK on r300 */
910910
#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 /* clock crystal frequency */
911911
#define RADEON_INFO_NUM_BACKENDS 0x0a /* DB/backends for r600+ - need for OQ */
912+
#define RADEON_INFO_NUM_TILE_PIPES 0x0b /* tile pipes for r600+ */
912913

913914
struct drm_radeon_info {
914915
uint32_t request;

0 commit comments

Comments
 (0)