drm/amdkfd: Set correct doorbell packet type for Carrizo
authorBen Goz <ben.goz@amd.com>
Sat, 6 Jun 2015 21:15:51 +0000 (00:15 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Mon, 20 Jul 2015 06:16:49 +0000 (09:16 +0300)
Signed-off-by: Ben Goz <ben.goz@amd.com>
Reviewed-by: Yair Shachar <yair.shachar@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.h

index c25728bc388a2be7134cb3e6b895a7a39d4189a2..74909e72a00929c8a87b73c9e25afb633fb50cf4 100644 (file)
@@ -1186,6 +1186,11 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
         * TODO: Retrieve max engine clock values from KGD
         */
 
+       if (dev->gpu->device_info->asic_family == CHIP_CARRIZO) {
+               dev->node_props.capability |= HSA_CAP_DOORBELL_PACKET_TYPE;
+               pr_info("amdkfd: adding doorbell packet type capability\n");
+       }
+
        res = 0;
 
 err:
index 989624b3cd14841422b004028df7cbda9ee5be86..c3ddb9b95ff8de6a52196f581d9eee1c1ccd3cb0 100644 (file)
@@ -40,6 +40,7 @@
 #define HSA_CAP_WATCH_POINTS_TOTALBITS_MASK    0x00000f00
 #define HSA_CAP_WATCH_POINTS_TOTALBITS_SHIFT   8
 #define HSA_CAP_RESERVED                       0xfffff000
+#define HSA_CAP_DOORBELL_PACKET_TYPE           0x00001000
 
 struct kfd_node_properties {
        uint32_t cpu_cores_count;