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:
Oded Gabbay 2015-07-29 10:40:26 +03:00
parent e8a64b20eb
commit a63c580a52
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;