[PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel

Alex Deucher alexdeucher at gmail.com
Thu Jul 24 16:51:47 PDT 2014


We need to make sure we have a new enough firmware with
the fixed nop packet.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/radeon/radeon_kms.c | 6 ++++++
 include/uapi/drm/radeon_drm.h       | 1 +
 2 files changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 35d9318..3ea9f59 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -529,6 +529,12 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 		else
 			*value = 1;
 		break;
+	case RADEON_INFO_HAWAII_ACCEL:
+		if (rdev->new_fw)
+			*value = 1;
+		else
+			*value = 0;
+		break;
 	default:
 		DRM_DEBUG_KMS("Invalid request %d\n", info->request);
 		return -EINVAL;
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
index 509b2d7..a41dec3 100644
--- a/include/uapi/drm/radeon_drm.h
+++ b/include/uapi/drm/radeon_drm.h
@@ -1010,6 +1010,7 @@ struct drm_radeon_cs {
 #define RADEON_INFO_VRAM_USAGE		0x1e
 #define RADEON_INFO_GTT_USAGE		0x1f
 #define RADEON_INFO_ACTIVE_CU_COUNT	0x20
+#define RADEON_INFO_HAWAII_ACCEL	0x21
 
 struct drm_radeon_info {
 	uint32_t		request;
-- 
1.8.3.1



More information about the dri-devel mailing list