intel/eu/xe2+: Fix encoding of various message descriptors for change in register size.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25020>
This commit is contained in:
committed by
Jordan Justen
parent
6d39b3d6ae
commit
abf8111560
+15
-12
@@ -305,8 +305,10 @@ brw_message_desc(const struct intel_device_info *devinfo,
|
||||
bool header_present)
|
||||
{
|
||||
if (devinfo->ver >= 5) {
|
||||
return (SET_BITS(msg_length, 28, 25) |
|
||||
SET_BITS(response_length, 24, 20) |
|
||||
assert(msg_length % reg_unit(devinfo) == 0);
|
||||
assert(response_length % reg_unit(devinfo) == 0);
|
||||
return (SET_BITS(msg_length / reg_unit(devinfo), 28, 25) |
|
||||
SET_BITS(response_length / reg_unit(devinfo), 24, 20) |
|
||||
SET_BITS(header_present, 19, 19));
|
||||
} else {
|
||||
return (SET_BITS(msg_length, 23, 20) |
|
||||
@@ -318,7 +320,7 @@ static inline unsigned
|
||||
brw_message_desc_mlen(const struct intel_device_info *devinfo, uint32_t desc)
|
||||
{
|
||||
if (devinfo->ver >= 5)
|
||||
return GET_BITS(desc, 28, 25);
|
||||
return GET_BITS(desc, 28, 25) * reg_unit(devinfo);
|
||||
else
|
||||
return GET_BITS(desc, 23, 20);
|
||||
}
|
||||
@@ -327,7 +329,7 @@ static inline unsigned
|
||||
brw_message_desc_rlen(const struct intel_device_info *devinfo, uint32_t desc)
|
||||
{
|
||||
if (devinfo->ver >= 5)
|
||||
return GET_BITS(desc, 24, 20);
|
||||
return GET_BITS(desc, 24, 20) * reg_unit(devinfo);
|
||||
else
|
||||
return GET_BITS(desc, 19, 16);
|
||||
}
|
||||
@@ -342,17 +344,18 @@ brw_message_desc_header_present(ASSERTED
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
brw_message_ex_desc(UNUSED const struct intel_device_info *devinfo,
|
||||
brw_message_ex_desc(const struct intel_device_info *devinfo,
|
||||
unsigned ex_msg_length)
|
||||
{
|
||||
return SET_BITS(ex_msg_length, 9, 6);
|
||||
assert(ex_msg_length % reg_unit(devinfo) == 0);
|
||||
return SET_BITS(ex_msg_length / reg_unit(devinfo), 9, 6);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
brw_message_ex_desc_ex_mlen(UNUSED const struct intel_device_info *devinfo,
|
||||
brw_message_ex_desc_ex_mlen(const struct intel_device_info *devinfo,
|
||||
uint32_t ex_desc)
|
||||
{
|
||||
return GET_BITS(ex_desc, 9, 6);
|
||||
return GET_BITS(ex_desc, 9, 6) * reg_unit(devinfo);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
@@ -1416,11 +1419,11 @@ lsc_msg_desc(UNUSED const struct intel_device_info *devinfo,
|
||||
|
||||
unsigned dest_length = !has_dest ? 0 :
|
||||
DIV_ROUND_UP(lsc_data_size_bytes(data_sz) * num_channels * simd_size,
|
||||
REG_SIZE);
|
||||
reg_unit(devinfo) * REG_SIZE);
|
||||
|
||||
unsigned src0_length =
|
||||
DIV_ROUND_UP(lsc_addr_size_bytes(addr_sz) * num_coordinates * simd_size,
|
||||
REG_SIZE);
|
||||
reg_unit(devinfo) * REG_SIZE);
|
||||
|
||||
assert(!transpose || lsc_opcode_has_transpose(opcode));
|
||||
|
||||
@@ -1505,7 +1508,7 @@ lsc_msg_desc_dest_len(const struct intel_device_info *devinfo,
|
||||
uint32_t desc)
|
||||
{
|
||||
assert(devinfo->has_lsc);
|
||||
return GET_BITS(desc, 24, 20);
|
||||
return GET_BITS(desc, 24, 20) * reg_unit(devinfo);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
@@ -1513,7 +1516,7 @@ lsc_msg_desc_src0_len(const struct intel_device_info *devinfo,
|
||||
uint32_t desc)
|
||||
{
|
||||
assert(devinfo->has_lsc);
|
||||
return GET_BITS(desc, 28, 25);
|
||||
return GET_BITS(desc, 28, 25) * reg_unit(devinfo);
|
||||
}
|
||||
|
||||
static inline enum lsc_addr_surface_type
|
||||
|
||||
@@ -385,13 +385,14 @@ send_restrictions(const struct brw_isa_info *isa,
|
||||
unsigned mlen = 1;
|
||||
if (!brw_inst_send_sel_reg32_desc(devinfo, inst)) {
|
||||
const uint32_t desc = brw_inst_send_desc(devinfo, inst);
|
||||
mlen = brw_message_desc_mlen(devinfo, desc);
|
||||
mlen = brw_message_desc_mlen(devinfo, desc) / reg_unit(devinfo);
|
||||
}
|
||||
|
||||
unsigned ex_mlen = 1;
|
||||
if (!brw_inst_send_sel_reg32_ex_desc(devinfo, inst)) {
|
||||
const uint32_t ex_desc = brw_inst_sends_ex_desc(devinfo, inst);
|
||||
ex_mlen = brw_message_ex_desc_ex_mlen(devinfo, ex_desc);
|
||||
ex_mlen = brw_message_ex_desc_ex_mlen(devinfo, ex_desc) /
|
||||
reg_unit(devinfo);
|
||||
}
|
||||
const unsigned src0_reg_nr = brw_inst_src0_da_reg_nr(devinfo, inst);
|
||||
const unsigned src1_reg_nr = brw_inst_send_src1_reg_nr(devinfo, inst);
|
||||
|
||||
Reference in New Issue
Block a user