mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 08:55:56 -04:00
drm/amdkfd: Hardware DWORD size is 4 bytes
Don't use sizeof(uint32_t) or similar types for hardware or firmware DWORD size. The hardware and firmware don't care about Linux types. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
committed by
Oded Gabbay
parent
5aaf2befd4
commit
6d56693025
@@ -95,7 +95,7 @@ static int dbgdev_diq_submit_ib(struct kfd_dbgdev *dbgdev,
|
||||
ib_packet->bitfields3.ib_base_hi = largep->u.high_part;
|
||||
|
||||
ib_packet->control = (1 << 23) | (1 << 31) |
|
||||
((size_in_bytes / sizeof(uint32_t)) & 0xfffff);
|
||||
((size_in_bytes / 4) & 0xfffff);
|
||||
|
||||
ib_packet->bitfields5.pasid = pasid;
|
||||
|
||||
@@ -126,8 +126,7 @@ static int dbgdev_diq_submit_ib(struct kfd_dbgdev *dbgdev,
|
||||
|
||||
rm_packet->header.opcode = IT_RELEASE_MEM;
|
||||
rm_packet->header.type = PM4_TYPE_3;
|
||||
rm_packet->header.count = sizeof(struct pm4__release_mem) /
|
||||
sizeof(unsigned int) - 2;
|
||||
rm_packet->header.count = sizeof(struct pm4__release_mem) / 4 - 2;
|
||||
|
||||
rm_packet->bitfields2.event_type = CACHE_FLUSH_AND_INV_TS_EVENT;
|
||||
rm_packet->bitfields2.event_index =
|
||||
@@ -652,8 +651,7 @@ static int dbgdev_wave_control_diq(struct kfd_dbgdev *dbgdev,
|
||||
packets_vec[0].header.opcode = IT_SET_UCONFIG_REG;
|
||||
packets_vec[0].header.type = PM4_TYPE_3;
|
||||
packets_vec[0].bitfields2.reg_offset =
|
||||
GRBM_GFX_INDEX / (sizeof(uint32_t)) -
|
||||
USERCONFIG_REG_BASE;
|
||||
GRBM_GFX_INDEX / 4 - USERCONFIG_REG_BASE;
|
||||
|
||||
packets_vec[0].bitfields2.insert_vmid = 0;
|
||||
packets_vec[0].reg_data[0] = reg_gfx_index.u32All;
|
||||
@@ -661,8 +659,7 @@ static int dbgdev_wave_control_diq(struct kfd_dbgdev *dbgdev,
|
||||
packets_vec[1].header.count = 1;
|
||||
packets_vec[1].header.opcode = IT_SET_CONFIG_REG;
|
||||
packets_vec[1].header.type = PM4_TYPE_3;
|
||||
packets_vec[1].bitfields2.reg_offset = SQ_CMD / (sizeof(uint32_t)) -
|
||||
AMD_CONFIG_REG_BASE;
|
||||
packets_vec[1].bitfields2.reg_offset = SQ_CMD / 4 - AMD_CONFIG_REG_BASE;
|
||||
|
||||
packets_vec[1].bitfields2.vmid_shift = SQ_CMD_VMID_OFFSET;
|
||||
packets_vec[1].bitfields2.insert_vmid = 1;
|
||||
@@ -678,8 +675,7 @@ static int dbgdev_wave_control_diq(struct kfd_dbgdev *dbgdev,
|
||||
|
||||
packets_vec[2].ordinal1 = packets_vec[0].ordinal1;
|
||||
packets_vec[2].bitfields2.reg_offset =
|
||||
GRBM_GFX_INDEX / (sizeof(uint32_t)) -
|
||||
USERCONFIG_REG_BASE;
|
||||
GRBM_GFX_INDEX / 4 - USERCONFIG_REG_BASE;
|
||||
|
||||
packets_vec[2].bitfields2.insert_vmid = 0;
|
||||
packets_vec[2].reg_data[0] = reg_gfx_index.u32All;
|
||||
|
||||
Reference in New Issue
Block a user