Loading drivers/gpu/msm/adreno_a3xx.c +1 −1 Original line number Diff line number Diff line Loading @@ -679,7 +679,7 @@ int a3xx_rb_init(struct adreno_device *adreno_dev, struct adreno_ringbuffer *rb) { unsigned int *cmds; cmds = adreno_ringbuffer_allocspace(rb, NULL, 18); cmds = adreno_ringbuffer_allocspace(rb, 18); if (IS_ERR(cmds)) return PTR_ERR(cmds); if (cmds == NULL) Loading drivers/gpu/msm/adreno_ringbuffer.c +5 −10 Original line number Diff line number Diff line Loading @@ -84,7 +84,6 @@ void adreno_ringbuffer_submit(struct adreno_ringbuffer *rb) static int adreno_ringbuffer_waitspace(struct adreno_ringbuffer *rb, struct adreno_context *context, unsigned int numcmds, int wptr_ahead) { int nopcount; Loading Loading @@ -141,7 +140,6 @@ adreno_ringbuffer_waitspace(struct adreno_ringbuffer *rb, } unsigned int *adreno_ringbuffer_allocspace(struct adreno_ringbuffer *rb, struct adreno_context *context, unsigned int numcmds) { unsigned int *ptr = NULL; Loading @@ -156,19 +154,16 @@ unsigned int *adreno_ringbuffer_allocspace(struct adreno_ringbuffer *rb, /* reserve dwords for nop packet */ if ((rb->wptr + numcmds) > (KGSL_RB_DWORDS - GSL_RB_NOP_SIZEDWORDS)) ret = adreno_ringbuffer_waitspace(rb, context, numcmds, 1); ret = adreno_ringbuffer_waitspace(rb, numcmds, 1); } else { /* wptr behind rptr */ if ((rb->wptr + numcmds) >= rptr) ret = adreno_ringbuffer_waitspace(rb, context, numcmds, 0); ret = adreno_ringbuffer_waitspace(rb, numcmds, 0); /* check for remaining space */ /* reserve dwords for nop packet */ if (!ret && (rb->wptr + numcmds) > (KGSL_RB_DWORDS - GSL_RB_NOP_SIZEDWORDS)) ret = adreno_ringbuffer_waitspace(rb, context, numcmds, 1); ret = adreno_ringbuffer_waitspace(rb, numcmds, 1); } if (!ret) { Loading Loading @@ -386,7 +381,7 @@ static int _ringbuffer_bootstrap_ucode(struct adreno_ringbuffer *rb, /* clear ME_HALT to start micro engine */ adreno_writereg(adreno_dev, ADRENO_REG_CP_ME_CNTL, 0); cmds = adreno_ringbuffer_allocspace(rb, NULL, bootstrap_size); cmds = adreno_ringbuffer_allocspace(rb, bootstrap_size); if (IS_ERR(cmds)) return PTR_ERR(cmds); if (cmds == NULL) Loading Loading @@ -782,7 +777,7 @@ adreno_ringbuffer_addcmds(struct adreno_ringbuffer *rb, if (flags & KGSL_CMD_FLAGS_PWRON_FIXUP) total_sizedwords += 9; ringcmds = adreno_ringbuffer_allocspace(rb, drawctxt, total_sizedwords); ringcmds = adreno_ringbuffer_allocspace(rb, total_sizedwords); if (IS_ERR(ringcmds)) return PTR_ERR(ringcmds); if (ringcmds == NULL) Loading drivers/gpu/msm/adreno_ringbuffer.h +0 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,6 @@ void adreno_ringbuffer_submit(struct adreno_ringbuffer *rb); void kgsl_cp_intrcallback(struct kgsl_device *device); unsigned int *adreno_ringbuffer_allocspace(struct adreno_ringbuffer *rb, struct adreno_context *context, unsigned int numcmds); void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device); Loading Loading
drivers/gpu/msm/adreno_a3xx.c +1 −1 Original line number Diff line number Diff line Loading @@ -679,7 +679,7 @@ int a3xx_rb_init(struct adreno_device *adreno_dev, struct adreno_ringbuffer *rb) { unsigned int *cmds; cmds = adreno_ringbuffer_allocspace(rb, NULL, 18); cmds = adreno_ringbuffer_allocspace(rb, 18); if (IS_ERR(cmds)) return PTR_ERR(cmds); if (cmds == NULL) Loading
drivers/gpu/msm/adreno_ringbuffer.c +5 −10 Original line number Diff line number Diff line Loading @@ -84,7 +84,6 @@ void adreno_ringbuffer_submit(struct adreno_ringbuffer *rb) static int adreno_ringbuffer_waitspace(struct adreno_ringbuffer *rb, struct adreno_context *context, unsigned int numcmds, int wptr_ahead) { int nopcount; Loading Loading @@ -141,7 +140,6 @@ adreno_ringbuffer_waitspace(struct adreno_ringbuffer *rb, } unsigned int *adreno_ringbuffer_allocspace(struct adreno_ringbuffer *rb, struct adreno_context *context, unsigned int numcmds) { unsigned int *ptr = NULL; Loading @@ -156,19 +154,16 @@ unsigned int *adreno_ringbuffer_allocspace(struct adreno_ringbuffer *rb, /* reserve dwords for nop packet */ if ((rb->wptr + numcmds) > (KGSL_RB_DWORDS - GSL_RB_NOP_SIZEDWORDS)) ret = adreno_ringbuffer_waitspace(rb, context, numcmds, 1); ret = adreno_ringbuffer_waitspace(rb, numcmds, 1); } else { /* wptr behind rptr */ if ((rb->wptr + numcmds) >= rptr) ret = adreno_ringbuffer_waitspace(rb, context, numcmds, 0); ret = adreno_ringbuffer_waitspace(rb, numcmds, 0); /* check for remaining space */ /* reserve dwords for nop packet */ if (!ret && (rb->wptr + numcmds) > (KGSL_RB_DWORDS - GSL_RB_NOP_SIZEDWORDS)) ret = adreno_ringbuffer_waitspace(rb, context, numcmds, 1); ret = adreno_ringbuffer_waitspace(rb, numcmds, 1); } if (!ret) { Loading Loading @@ -386,7 +381,7 @@ static int _ringbuffer_bootstrap_ucode(struct adreno_ringbuffer *rb, /* clear ME_HALT to start micro engine */ adreno_writereg(adreno_dev, ADRENO_REG_CP_ME_CNTL, 0); cmds = adreno_ringbuffer_allocspace(rb, NULL, bootstrap_size); cmds = adreno_ringbuffer_allocspace(rb, bootstrap_size); if (IS_ERR(cmds)) return PTR_ERR(cmds); if (cmds == NULL) Loading Loading @@ -782,7 +777,7 @@ adreno_ringbuffer_addcmds(struct adreno_ringbuffer *rb, if (flags & KGSL_CMD_FLAGS_PWRON_FIXUP) total_sizedwords += 9; ringcmds = adreno_ringbuffer_allocspace(rb, drawctxt, total_sizedwords); ringcmds = adreno_ringbuffer_allocspace(rb, total_sizedwords); if (IS_ERR(ringcmds)) return PTR_ERR(ringcmds); if (ringcmds == NULL) Loading
drivers/gpu/msm/adreno_ringbuffer.h +0 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,6 @@ void adreno_ringbuffer_submit(struct adreno_ringbuffer *rb); void kgsl_cp_intrcallback(struct kgsl_device *device); unsigned int *adreno_ringbuffer_allocspace(struct adreno_ringbuffer *rb, struct adreno_context *context, unsigned int numcmds); void adreno_ringbuffer_read_pfp_ucode(struct kgsl_device *device); Loading