mirror of https://gitee.com/openkylin/linux.git
drm/amdkfd: fix bug when initializing sdma vm
A logical AND operation was used during mask and shift, instead of a bitwise AND operation. This patch fixes this bug by changing the operation to bitwise AND. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e8a64b20eb
commit
a63c580a52
|
@ -143,7 +143,7 @@ static void init_sdma_vm(struct device_queue_manager *dqm, struct queue *q,
|
||||||
get_sh_mem_bases_32(qpd_to_pdd(qpd));
|
get_sh_mem_bases_32(qpd_to_pdd(qpd));
|
||||||
else
|
else
|
||||||
value |= ((get_sh_mem_bases_nybble_64(qpd_to_pdd(qpd))) <<
|
value |= ((get_sh_mem_bases_nybble_64(qpd_to_pdd(qpd))) <<
|
||||||
SDMA0_RLC0_VIRTUAL_ADDR__SHARED_BASE__SHIFT) &&
|
SDMA0_RLC0_VIRTUAL_ADDR__SHARED_BASE__SHIFT) &
|
||||||
SDMA0_RLC0_VIRTUAL_ADDR__SHARED_BASE_MASK;
|
SDMA0_RLC0_VIRTUAL_ADDR__SHARED_BASE_MASK;
|
||||||
|
|
||||||
q->properties.sdma_vm_addr = value;
|
q->properties.sdma_vm_addr = value;
|
||||||
|
|
|
@ -155,7 +155,7 @@ static void init_sdma_vm(struct device_queue_manager *dqm, struct queue *q,
|
||||||
get_sh_mem_bases_32(qpd_to_pdd(qpd));
|
get_sh_mem_bases_32(qpd_to_pdd(qpd));
|
||||||
else
|
else
|
||||||
value |= ((get_sh_mem_bases_nybble_64(qpd_to_pdd(qpd))) <<
|
value |= ((get_sh_mem_bases_nybble_64(qpd_to_pdd(qpd))) <<
|
||||||
SDMA0_RLC0_VIRTUAL_ADDR__SHARED_BASE__SHIFT) &&
|
SDMA0_RLC0_VIRTUAL_ADDR__SHARED_BASE__SHIFT) &
|
||||||
SDMA0_RLC0_VIRTUAL_ADDR__SHARED_BASE_MASK;
|
SDMA0_RLC0_VIRTUAL_ADDR__SHARED_BASE_MASK;
|
||||||
|
|
||||||
q->properties.sdma_vm_addr = value;
|
q->properties.sdma_vm_addr = value;
|
||||||
|
|
Loading…
Reference in New Issue