On Thu, Nov 2, 2017 at 1:21 AM, Felix Kuehling <[email protected]> wrote: > From: shaoyunl <[email protected]> > > ffs function return the position of the first bit set on 1 based. > (bit zero returns 1). > > Signed-off-by: shaoyun liu <[email protected]> > Signed-off-by: Felix Kuehling <[email protected]> > --- > drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c > b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c > index 4859d26..4728fad 100644 > --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c > @@ -202,8 +202,8 @@ static int update_mqd_sdma(struct mqd_manager *mm, void > *mqd, > struct cik_sdma_rlc_registers *m; > > m = get_sdma_mqd(mqd); > - m->sdma_rlc_rb_cntl = ffs(q->queue_size / sizeof(unsigned int)) << > - SDMA0_RLC0_RB_CNTL__RB_SIZE__SHIFT | > + m->sdma_rlc_rb_cntl = (ffs(q->queue_size / sizeof(unsigned int)) - 1) > + << SDMA0_RLC0_RB_CNTL__RB_SIZE__SHIFT | > q->vmid << SDMA0_RLC0_RB_CNTL__RB_VMID__SHIFT | > 1 << SDMA0_RLC0_RB_CNTL__RPTR_WRITEBACK_ENABLE__SHIFT > | > 6 << SDMA0_RLC0_RB_CNTL__RPTR_WRITEBACK_TIMER__SHIFT; > -- > 2.7.4 >
As Felix promised a cleanup later for all the sizeof(unsigned int) things, this patch is: Reviewed-by: Oded Gabbay <[email protected]> _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
