]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: add burst_nop flag for sdma
authorJammy Zhou <Jammy.Zhou@amd.com>
Mon, 31 Aug 2015 06:06:39 +0000 (14:06 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Sep 2015 16:22:28 +0000 (12:22 -0400)
The burst NOP is supported for SDMA when feature_version is >= 20.

Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/cik_sdma.c
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c

index b66938dbb5cf2448a0134da34d34d1c6c06aa9b4..34812eccd7d0fcedb6e9c2b421aefeae0d8b70f5 100644 (file)
@@ -1708,6 +1708,7 @@ struct amdgpu_sdma {
        uint32_t                feature_version;
 
        struct amdgpu_ring      ring;
+       bool                    burst_nop;
 };
 
 /*
index c1e782952bd7b79834f4a64505036598f1777a0d..cc909c9cee63c5d84c580249a517df3dafab2bea 100644 (file)
@@ -501,6 +501,8 @@ static int cik_sdma_load_microcode(struct amdgpu_device *adev)
                fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4;
                adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
                adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
+               if (adev->sdma[i].feature_version >= 20)
+                       adev->sdma[i].burst_nop = true;
                fw_data = (const __le32 *)
                        (adev->sdma[i].fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
                WREG32(mmSDMA0_UCODE_ADDR + sdma_offsets[i], 0);
index 2f3948c0908169a35276d53db3ccba0e16e64a35..2457bf3e3a1e90c4b26b06ef8c97128cd37f8736 100644 (file)
@@ -146,6 +146,8 @@ static int sdma_v2_4_init_microcode(struct amdgpu_device *adev)
                hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma[i].fw->data;
                adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
                adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
+               if (adev->sdma[i].feature_version >= 20)
+                       adev->sdma[i].burst_nop = true;
 
                if (adev->firmware.smu_load) {
                        info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];
index a9d9607e8d916684fe5b2145633eff3a6f8ecb07..70b2f03c5712e38987864be4034ccc245e7ba21e 100644 (file)
@@ -218,6 +218,8 @@ static int sdma_v3_0_init_microcode(struct amdgpu_device *adev)
                hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma[i].fw->data;
                adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
                adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
+               if (adev->sdma[i].feature_version >= 20)
+                       adev->sdma[i].burst_nop = true;
 
                if (adev->firmware.smu_load) {
                        info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];