From: Alex Deucher Subject: [PATCH 2/2] drm/radeon: add new info ioctl query for hawaii accel Date: Thu, 24 Jul 2014 19:51:47 -0400 Message-ID: <1406245907-2567-2-git-send-email-alexander.deucher@amd.com> References: <1406245907-2567-1-git-send-email-alexander.deucher@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com [209.85.216.53]) by gabe.freedesktop.org (Postfix) with ESMTP id ED1266E79F for ; Thu, 24 Jul 2014 16:51:54 -0700 (PDT) Received: by mail-qa0-f53.google.com with SMTP id v10so3796673qac.12 for ; Thu, 24 Jul 2014 16:51:54 -0700 (PDT) In-Reply-To: <1406245907-2567-1-git-send-email-alexander.deucher@amd.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org Cc: Alex Deucher List-Id: dri-devel@lists.freedesktop.org We need to make sure we have a new enough firmware with the fixed nop packet. Signed-off-by: Alex Deucher --- 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