intel/elk: Remove uses of intel_device_info_is_9lp()

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27629>
This commit is contained in:
Caio Oliveira 2024-02-13 13:17:05 -08:00 committed by Marge Bot
parent 9f5213923e
commit ea12b38602
5 changed files with 10 additions and 30 deletions

View file

@ -3064,8 +3064,7 @@ elk_broadcast(struct elk_codegen *p,
/* Use indirect addressing to fetch the specified component. */
if (type_sz(src.type) > 4 &&
(devinfo->platform == INTEL_PLATFORM_CHV || intel_device_info_is_9lp(devinfo) ||
!devinfo->has_64bit_int)) {
(devinfo->platform == INTEL_PLATFORM_CHV || !devinfo->has_64bit_int)) {
/* From the Cherryview PRM Vol 7. "Register Region Restrictions":
*
* "When source or destination datatype is 64b or operation is

View file

@ -1744,12 +1744,10 @@ special_requirements_for_handling_double_precision_data_types(
* 2. Regioning must ensure Src.Vstride = Src.Width * Src.Hstride.
* 3. Source and Destination offset must be the same, except the case
* of scalar source.
*
* We assume that the restriction applies to GLK as well.
*/
if (is_double_precision &&
elk_inst_access_mode(devinfo, inst) == ELK_ALIGN_1 &&
(devinfo->platform == INTEL_PLATFORM_CHV || intel_device_info_is_9lp(devinfo))) {
devinfo->platform == INTEL_PLATFORM_CHV) {
ERROR_IF(!is_scalar_region &&
(src_stride % 8 != 0 ||
dst_stride % 8 != 0 ||
@ -1770,11 +1768,8 @@ special_requirements_for_handling_double_precision_data_types(
*
* When source or destination datatype is 64b or operation is integer
* DWord multiply, indirect addressing must not be used.
*
* We assume that the restriction applies to GLK as well.
*/
if (is_double_precision &&
(devinfo->platform == INTEL_PLATFORM_CHV || intel_device_info_is_9lp(devinfo))) {
if (is_double_precision && devinfo->platform == INTEL_PLATFORM_CHV) {
ERROR_IF(ELK_ADDRESS_REGISTER_INDIRECT_REGISTER == address_mode ||
ELK_ADDRESS_REGISTER_INDIRECT_REGISTER == dst_address_mode,
"Indirect addressing is not allowed when the execution type "
@ -1786,13 +1781,9 @@ special_requirements_for_handling_double_precision_data_types(
* ARF registers must never be used with 64b datatype or when
* operation is integer DWord multiply.
*
* We assume that the restriction applies to GLK as well.
*
* We assume that the restriction does not apply to the null register.
*/
if (is_double_precision &&
(devinfo->platform == INTEL_PLATFORM_CHV ||
intel_device_info_is_9lp(devinfo))) {
if (is_double_precision && devinfo->platform == INTEL_PLATFORM_CHV) {
ERROR_IF(elk_inst_opcode(isa, inst) == ELK_OPCODE_MAC ||
elk_inst_acc_wr_control(devinfo, inst) ||
(ELK_ARCHITECTURE_REGISTER_FILE == file &&
@ -1830,11 +1821,8 @@ special_requirements_for_handling_double_precision_data_types(
*
* When source or destination datatype is 64b or operation is integer
* DWord multiply, DepCtrl must not be used.
*
* We assume that the restriction applies to GLK as well.
*/
if (is_double_precision &&
(devinfo->platform == INTEL_PLATFORM_CHV || intel_device_info_is_9lp(devinfo))) {
if (is_double_precision && devinfo->platform == INTEL_PLATFORM_CHV) {
ERROR_IF(elk_inst_no_dd_check(devinfo, inst) ||
elk_inst_no_dd_clear(devinfo, inst),
"DepCtrl is not allowed when the execution type is 64-bit");

View file

@ -2076,7 +2076,6 @@ elk_fs_generator::generate_code(const elk_cfg_t *cfg, int dispatch_width,
case ELK_SHADER_OPCODE_CLUSTER_BROADCAST: {
assert((devinfo->platform != INTEL_PLATFORM_CHV &&
!intel_device_info_is_9lp(devinfo) &&
devinfo->has_64bit_float) || type_sz(src[0].type) <= 4);
assert(!src[0].negate && !src[0].abs);
assert(src[1].file == ELK_IMMEDIATE_VALUE);

View file

@ -5026,8 +5026,7 @@ fs_nir_emit_intrinsic(nir_to_elk_state &ntb,
unsigned read_size = nir_intrinsic_range(instr) -
(instr->num_components - 1) * type_sz(dest.type);
bool supports_64bit_indirects =
devinfo->platform != INTEL_PLATFORM_CHV && !intel_device_info_is_9lp(devinfo);
bool supports_64bit_indirects = devinfo->platform != INTEL_PLATFORM_CHV;
if (type_sz(dest.type) != 8 || supports_64bit_indirects) {
for (unsigned j = 0; j < instr->num_components; j++) {

View file

@ -2228,8 +2228,7 @@ TEST_P(validation_test, qword_low_power_align1_regioning_restrictions)
elk_inst_set_src0_width(&devinfo, last_inst, inst[i].src_width);
elk_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src_hstride);
if (devinfo.platform == INTEL_PLATFORM_CHV ||
intel_device_info_is_9lp(&devinfo)) {
if (devinfo.platform == INTEL_PLATFORM_CHV) {
EXPECT_EQ(inst[i].expected_result, validate(p));
} else {
EXPECT_TRUE(validate(p));
@ -2361,8 +2360,7 @@ TEST_P(validation_test, qword_low_power_no_indirect_addressing)
elk_inst_set_src0_width(&devinfo, last_inst, inst[i].src_width);
elk_inst_set_src0_hstride(&devinfo, last_inst, inst[i].src_hstride);
if (devinfo.platform == INTEL_PLATFORM_CHV ||
intel_device_info_is_9lp(&devinfo)) {
if (devinfo.platform == INTEL_PLATFORM_CHV) {
EXPECT_EQ(inst[i].expected_result, validate(p));
} else {
EXPECT_TRUE(validate(p));
@ -2513,7 +2511,6 @@ TEST_P(validation_test, qword_low_power_no_64bit_arf)
* of DWord multiplication cannot be the accumulator.
*/
if (devinfo.platform == INTEL_PLATFORM_CHV ||
intel_device_info_is_9lp(&devinfo) ||
(devinfo.ver == 8 &&
inst[i].opcode == ELK_OPCODE_MUL &&
elk_inst_dst_reg_file(&devinfo, last_inst) == ELK_ARCHITECTURE_REGISTER_FILE &&
@ -2533,8 +2530,7 @@ TEST_P(validation_test, qword_low_power_no_64bit_arf)
elk_MAC(p, retype(g0, ELK_REGISTER_TYPE_DF),
retype(stride(g0, 4, 4, 1), ELK_REGISTER_TYPE_DF),
retype(stride(g0, 4, 4, 1), ELK_REGISTER_TYPE_DF));
if (devinfo.platform == INTEL_PLATFORM_CHV ||
intel_device_info_is_9lp(&devinfo)) {
if (devinfo.platform == INTEL_PLATFORM_CHV) {
EXPECT_FALSE(validate(p));
} else {
EXPECT_TRUE(validate(p));
@ -2736,8 +2732,7 @@ TEST_P(validation_test, qword_low_power_no_depctrl)
elk_inst_set_no_dd_check(&devinfo, last_inst, inst[i].no_dd_check);
elk_inst_set_no_dd_clear(&devinfo, last_inst, inst[i].no_dd_clear);
if (devinfo.platform == INTEL_PLATFORM_CHV ||
intel_device_info_is_9lp(&devinfo)) {
if (devinfo.platform == INTEL_PLATFORM_CHV) {
EXPECT_EQ(inst[i].expected_result, validate(p));
} else {
EXPECT_TRUE(validate(p));