mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
drm/amdgpu/gfx: Fix gfx_v7_0_get_csb_buffer to use rb_config
Instead of having the hardcoded values for the CSB buffer in gfx_v7_0_get_csb_buffer, use the values calculated in previous steps by accessing raster_config and raster_config_1. Signed-off-by: Rodrigo Siqueira <siqueira@igalia.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e125a6e8ce
commit
aff78a6172
|
|
@ -3897,29 +3897,8 @@ static void gfx_v7_0_get_csb_buffer(struct amdgpu_device *adev,
|
|||
|
||||
buffer[count++] = cpu_to_le32(PACKET3(PACKET3_SET_CONTEXT_REG, 2));
|
||||
buffer[count++] = cpu_to_le32(mmPA_SC_RASTER_CONFIG - PACKET3_SET_CONTEXT_REG_START);
|
||||
switch (adev->asic_type) {
|
||||
case CHIP_BONAIRE:
|
||||
buffer[count++] = cpu_to_le32(0x16000012);
|
||||
buffer[count++] = cpu_to_le32(0x00000000);
|
||||
break;
|
||||
case CHIP_KAVERI:
|
||||
buffer[count++] = cpu_to_le32(0x00000000); /* XXX */
|
||||
buffer[count++] = cpu_to_le32(0x00000000);
|
||||
break;
|
||||
case CHIP_KABINI:
|
||||
case CHIP_MULLINS:
|
||||
buffer[count++] = cpu_to_le32(0x00000000); /* XXX */
|
||||
buffer[count++] = cpu_to_le32(0x00000000);
|
||||
break;
|
||||
case CHIP_HAWAII:
|
||||
buffer[count++] = cpu_to_le32(0x3a00161a);
|
||||
buffer[count++] = cpu_to_le32(0x0000002e);
|
||||
break;
|
||||
default:
|
||||
buffer[count++] = cpu_to_le32(0x00000000);
|
||||
buffer[count++] = cpu_to_le32(0x00000000);
|
||||
break;
|
||||
}
|
||||
buffer[count++] = cpu_to_le32(adev->gfx.config.rb_config[0][0].raster_config);
|
||||
buffer[count++] = cpu_to_le32(adev->gfx.config.rb_config[0][0].raster_config_1);
|
||||
|
||||
amdgpu_gfx_csb_preamble_end(buffer, count);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user