Loading drivers/gpu/msm/adreno_dispatch.c +12 −12 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. */ #include <linux/wait.h> Loading Loading @@ -632,6 +632,17 @@ static int sendcmd(struct adreno_device *adreno_dev, secs = time.ktime; nsecs = do_div(secs, 1000000000); /* * For the first submission in any given command queue update the * expected expire time - this won't actually be used / updated until * the command queue in question goes current, but universally setting * it here avoids the possibilty of some race conditions with preempt */ if (dispatch_q->inflight == 1) dispatch_q->expires = jiffies + msecs_to_jiffies(adreno_drawobj_timeout); trace_adreno_cmdbatch_submitted(drawobj, (int) dispatcher->inflight, time.ticks, (unsigned long) secs, nsecs / 1000, drawctxt->rb, adreno_get_rptr(drawctxt->rb)); Loading @@ -644,17 +655,6 @@ static int sendcmd(struct adreno_device *adreno_dev, dispatch_q->tail = (dispatch_q->tail + 1) % ADRENO_DISPATCH_DRAWQUEUE_SIZE; /* * For the first submission in any given command queue update the * expected expire time - this won't actually be used / updated until * the command queue in question goes current, but universally setting * it here avoids the possibilty of some race conditions with preempt */ if (dispatch_q->inflight == 1) dispatch_q->expires = jiffies + msecs_to_jiffies(adreno_drawobj_timeout); /* * If we believe ourselves to be current and preemption isn't a thing, * then set up the timer. If this misses, then preemption is indeed a Loading drivers/gpu/msm/adreno_ringbuffer.c +7 −2 Original line number Diff line number Diff line Loading @@ -396,6 +396,12 @@ static inline int cp_mem_write(struct adreno_device *adreno_dev, return dwords; } static bool _check_secured(struct adreno_context *drawctxt, unsigned int flags) { return ((drawctxt->base.flags & KGSL_CONTEXT_SECURE) && !is_internal_cmds(flags)); } static int adreno_ringbuffer_addcmds(struct adreno_ringbuffer *rb, unsigned int flags, unsigned int *cmds, Loading Loading @@ -441,8 +447,7 @@ adreno_ringbuffer_addcmds(struct adreno_ringbuffer *rb, */ if (drawctxt) { drawctxt->internal_timestamp = rb->timestamp; if (drawctxt->base.flags & KGSL_CONTEXT_SECURE) secured_ctxt = true; secured_ctxt = _check_secured(drawctxt, flags); } /* Loading Loading
drivers/gpu/msm/adreno_dispatch.c +12 −12 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. */ #include <linux/wait.h> Loading Loading @@ -632,6 +632,17 @@ static int sendcmd(struct adreno_device *adreno_dev, secs = time.ktime; nsecs = do_div(secs, 1000000000); /* * For the first submission in any given command queue update the * expected expire time - this won't actually be used / updated until * the command queue in question goes current, but universally setting * it here avoids the possibilty of some race conditions with preempt */ if (dispatch_q->inflight == 1) dispatch_q->expires = jiffies + msecs_to_jiffies(adreno_drawobj_timeout); trace_adreno_cmdbatch_submitted(drawobj, (int) dispatcher->inflight, time.ticks, (unsigned long) secs, nsecs / 1000, drawctxt->rb, adreno_get_rptr(drawctxt->rb)); Loading @@ -644,17 +655,6 @@ static int sendcmd(struct adreno_device *adreno_dev, dispatch_q->tail = (dispatch_q->tail + 1) % ADRENO_DISPATCH_DRAWQUEUE_SIZE; /* * For the first submission in any given command queue update the * expected expire time - this won't actually be used / updated until * the command queue in question goes current, but universally setting * it here avoids the possibilty of some race conditions with preempt */ if (dispatch_q->inflight == 1) dispatch_q->expires = jiffies + msecs_to_jiffies(adreno_drawobj_timeout); /* * If we believe ourselves to be current and preemption isn't a thing, * then set up the timer. If this misses, then preemption is indeed a Loading
drivers/gpu/msm/adreno_ringbuffer.c +7 −2 Original line number Diff line number Diff line Loading @@ -396,6 +396,12 @@ static inline int cp_mem_write(struct adreno_device *adreno_dev, return dwords; } static bool _check_secured(struct adreno_context *drawctxt, unsigned int flags) { return ((drawctxt->base.flags & KGSL_CONTEXT_SECURE) && !is_internal_cmds(flags)); } static int adreno_ringbuffer_addcmds(struct adreno_ringbuffer *rb, unsigned int flags, unsigned int *cmds, Loading Loading @@ -441,8 +447,7 @@ adreno_ringbuffer_addcmds(struct adreno_ringbuffer *rb, */ if (drawctxt) { drawctxt->internal_timestamp = rb->timestamp; if (drawctxt->base.flags & KGSL_CONTEXT_SECURE) secured_ctxt = true; secured_ctxt = _check_secured(drawctxt, flags); } /* Loading