[Mesa-dev] [PATCH 1/2] radeonsi: add support for Hawaii asics (v2)
Alex Deucher
alexdeucher at gmail.com
Wed Nov 13 12:13:31 PST 2013
On Wed, Nov 13, 2013 at 1:08 PM, Tom Stellard <tom at stellard.net> wrote:
> On Wed, Nov 13, 2013 at 12:29:31PM -0500, Alex Deucher wrote:
>> Update additional register fields.
>>
>> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>
> Should we CC: mesa-stable on these?
Probably not at this point. Support is still pretty unstable on
Hawaii. Should probably wait for things to stabilize first.
Alex
>
>> ---
>> src/gallium/drivers/radeonsi/radeonsi_pipe.c | 2 ++
>> src/gallium/drivers/radeonsi/si_state.c | 4 ++++
>> src/gallium/drivers/radeonsi/sid.h | 9 +++++++++
>> src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 1 +
>> src/gallium/winsys/radeon/drm/radeon_winsys.h | 1 +
>> 5 files changed, 17 insertions(+)
>>
>> diff --git a/src/gallium/drivers/radeonsi/radeonsi_pipe.c b/src/gallium/drivers/radeonsi/radeonsi_pipe.c
>> index 6da4c5e..3f5ef30 100644
>> --- a/src/gallium/drivers/radeonsi/radeonsi_pipe.c
>> +++ b/src/gallium/drivers/radeonsi/radeonsi_pipe.c
>> @@ -236,6 +236,7 @@ const char *r600_get_llvm_processor_name(enum radeon_family family)
>> case CHIP_BONAIRE: return "bonaire";
>> case CHIP_KABINI: return "kabini";
>> case CHIP_KAVERI: return "kaveri";
>> + case CHIP_HAWAII: return "hawaii";
>> default: return "";
>> #endif
>> }
>> @@ -252,6 +253,7 @@ static const char *r600_get_family_name(enum radeon_family family)
>> case CHIP_BONAIRE: return "AMD BONAIRE";
>> case CHIP_KAVERI: return "AMD KAVERI";
>> case CHIP_KABINI: return "AMD KABINI";
>> + case CHIP_HAWAII: return "AMD HAWAII";
>> default: return "AMD unknown";
>> }
>> }
>> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
>> index 97710f0..eb47c5b 100644
>> --- a/src/gallium/drivers/radeonsi/si_state.c
>> +++ b/src/gallium/drivers/radeonsi/si_state.c
>> @@ -3097,6 +3097,10 @@ void si_init_config(struct r600_context *rctx)
>> si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x16000012);
>> si_pm4_set_reg(pm4, R_028354_PA_SC_RASTER_CONFIG_1, 0x00000000);
>> break;
>> + case CHIP_HAWAII:
>> + si_pm4_set_reg(pm4, R_028350_PA_SC_RASTER_CONFIG, 0x3a00161a);
>> + si_pm4_set_reg(pm4, R_028354_PA_SC_RASTER_CONFIG_1, 0x0000002e);
>> + break;
>> case CHIP_KAVERI:
>> /* XXX todo */
>> case CHIP_KABINI:
>> diff --git a/src/gallium/drivers/radeonsi/sid.h b/src/gallium/drivers/radeonsi/sid.h
>> index 021f4eb..aab39fc 100644
>> --- a/src/gallium/drivers/radeonsi/sid.h
>> +++ b/src/gallium/drivers/radeonsi/sid.h
>> @@ -5403,6 +5403,8 @@
>> #define V_02803C_X_ADDR_SURF_P8_32X32_16X16 0x0C
>> #define V_02803C_X_ADDR_SURF_P8_32X32_16X32 0x0D
>> #define V_02803C_X_ADDR_SURF_P8_32X64_32X32 0x0E
>> +#define V_02803C_X_ADDR_SURF_P16_32X32_8X16 0x10
>> +#define V_02803C_X_ADDR_SURF_P16_32X32_16X16 0x11
>> #define S_02803C_BANK_WIDTH(x) (((x) & 0x03) << 13)
>> #define G_02803C_BANK_WIDTH(x) (((x) >> 13) & 0x03)
>> #define C_02803C_BANK_WIDTH 0xFFFF9FFF
>> @@ -5731,6 +5733,13 @@
>> #define V_028350_RASTER_CONFIG_PKR_YSEL_1 0x01
>> #define V_028350_RASTER_CONFIG_PKR_YSEL_2 0x02
>> #define V_028350_RASTER_CONFIG_PKR_YSEL_3 0x03
>> +#define S_028350_PKR_XSEL2(x) (((x) & 0x03) << 14)
>> +#define G_028350_PKR_XSEL2(x) (((x) >> 14) & 0x03)
>> +#define C_028350_PKR_XSEL2 0xFFFF3FFF
>> +#define V_028350_RASTER_CONFIG_PKR_XSEL2_0 0x00
>> +#define V_028350_RASTER_CONFIG_PKR_XSEL2_1 0x01
>> +#define V_028350_RASTER_CONFIG_PKR_XSEL2_2 0x02
>> +#define V_028350_RASTER_CONFIG_PKR_XSEL2_3 0x03
>> #define S_028350_SC_MAP(x) (((x) & 0x03) << 16)
>> #define G_028350_SC_MAP(x) (((x) >> 16) & 0x03)
>> #define C_028350_SC_MAP 0xFFFCFFFF
>> diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
>> index 8a8f180..1860810 100644
>> --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
>> +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
>> @@ -330,6 +330,7 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
>> case CHIP_BONAIRE:
>> case CHIP_KAVERI:
>> case CHIP_KABINI:
>> + case CHIP_HAWAII:
>> ws->info.chip_class = CIK;
>> break;
>> }
>> diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
>> index c000371..d59f48f 100644
>> --- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
>> +++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
>> @@ -128,6 +128,7 @@ enum radeon_family {
>> CHIP_BONAIRE,
>> CHIP_KAVERI,
>> CHIP_KABINI,
>> + CHIP_HAWAII,
>> CHIP_LAST,
>> };
>>
>> --
>> 1.8.3.1
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list