drm/amdkfd: Add asic property to kfd_device_info
authorBen Goz <ben.goz@amd.com>
Thu, 1 Jan 2015 15:10:01 +0000 (17:10 +0200)
committerOded Gabbay <oded.gabbay@amd.com>
Thu, 1 Jan 2015 15:10:01 +0000 (17:10 +0200)
This patch adds a new property to kfd_device_info structure. That structure
holds information that is H/W specific.

The new property is called asic_family and its purpose is to distinguish
between different asic families in amdkfd operations, mainly in QCM (queue
control & management)

This patch also adds a new enum, to select different ASICs. We set the current
kfd_device_info instance as Kaveri and create a new instance which describes
the new AMD APU, codenamed 'Carrizo'.

Signed-off-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h

index 994a9c1bdd0477aa8d54fab8dc06ad8d1a3a73ba..24b37ffad5c6bf3e318c368247cd58096ba1564c 100644 (file)
 #define MQD_SIZE_ALIGNED 768
 
 static const struct kfd_device_info kaveri_device_info = {
+       .asic_family = CHIP_KAVERI,
+       .max_pasid_bits = 16,
+       .ih_ring_entry_size = 4 * sizeof(uint32_t),
+       .mqd_size_aligned = MQD_SIZE_ALIGNED
+};
+
+static const struct kfd_device_info carrizo_device_info = {
+       .asic_family = CHIP_CARRIZO,
        .max_pasid_bits = 16,
        .ih_ring_entry_size = 4 * sizeof(uint32_t),
        .num_of_watch_points = 4,
@@ -65,7 +73,7 @@ static const struct kfd_deviceid supported_devices[] = {
        { 0x1318, &kaveri_device_info },        /* Kaveri */
        { 0x131B, &kaveri_device_info },        /* Kaveri */
        { 0x131C, &kaveri_device_info },        /* Kaveri */
-       { 0x131D, &kaveri_device_info },        /* Kaveri */
+       { 0x131D, &kaveri_device_info }         /* Kaveri */
 };
 
 static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size,
index a4e0ddd5677812227c1dcdc1a1414d99287e7492..872a1da4c02eea06a332f03ee6389a1dd3bec5ca 100644 (file)
@@ -104,7 +104,13 @@ enum cache_policy {
        cache_policy_noncoherent
 };
 
+enum asic_family_type {
+       CHIP_KAVERI = 0,
+       CHIP_CARRIZO
+};
+
 struct kfd_device_info {
+       unsigned int asic_family;
        unsigned int max_pasid_bits;
        size_t ih_ring_entry_size;
        uint8_t num_of_watch_points;
This page took 0.026004 seconds and 5 git commands to generate.