aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJammy Zhou <Jammy.Zhou@amd.com>2015-08-31 02:06:39 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-09-02 12:22:28 -0400
commit18111de0dfc38c582c4348af3bda5d3331d35012 (patch)
tree2c7dda3f73d5695ee3c4a29b137768c79580316e /drivers/gpu/drm
parent4207a734c32cafd8ea603eb440d6a8e100e7d1d2 (diff)
drm/amdgpu: add burst_nop flag for sdma
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h1
-rw-r--r--drivers/gpu/drm/amd/amdgpu/cik_sdma.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c2
4 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index b66938dbb5cf..34812eccd7d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1708,6 +1708,7 @@ struct amdgpu_sdma {
1708 uint32_t feature_version; 1708 uint32_t feature_version;
1709 1709
1710 struct amdgpu_ring ring; 1710 struct amdgpu_ring ring;
1711 bool burst_nop;
1711}; 1712};
1712 1713
1713/* 1714/*
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index c1e782952bd7..cc909c9cee63 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -501,6 +501,8 @@ static int cik_sdma_load_microcode(struct amdgpu_device *adev)
501 fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4; 501 fw_size = le32_to_cpu(hdr->header.ucode_size_bytes) / 4;
502 adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); 502 adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
503 adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version); 503 adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
504 if (adev->sdma[i].feature_version >= 20)
505 adev->sdma[i].burst_nop = true;
504 fw_data = (const __le32 *) 506 fw_data = (const __le32 *)
505 (adev->sdma[i].fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes)); 507 (adev->sdma[i].fw->data + le32_to_cpu(hdr->header.ucode_array_offset_bytes));
506 WREG32(mmSDMA0_UCODE_ADDR + sdma_offsets[i], 0); 508 WREG32(mmSDMA0_UCODE_ADDR + sdma_offsets[i], 0);
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
index 2f3948c09081..2457bf3e3a1e 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
@@ -146,6 +146,8 @@ static int sdma_v2_4_init_microcode(struct amdgpu_device *adev)
146 hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma[i].fw->data; 146 hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma[i].fw->data;
147 adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); 147 adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
148 adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version); 148 adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
149 if (adev->sdma[i].feature_version >= 20)
150 adev->sdma[i].burst_nop = true;
149 151
150 if (adev->firmware.smu_load) { 152 if (adev->firmware.smu_load) {
151 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i]; 153 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index a9d9607e8d91..70b2f03c5712 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -218,6 +218,8 @@ static int sdma_v3_0_init_microcode(struct amdgpu_device *adev)
218 hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma[i].fw->data; 218 hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma[i].fw->data;
219 adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version); 219 adev->sdma[i].fw_version = le32_to_cpu(hdr->header.ucode_version);
220 adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version); 220 adev->sdma[i].feature_version = le32_to_cpu(hdr->ucode_feature_version);
221 if (adev->sdma[i].feature_version >= 20)
222 adev->sdma[i].burst_nop = true;
221 223
222 if (adev->firmware.smu_load) { 224 if (adev->firmware.smu_load) {
223 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i]; 225 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i];