Loading drivers/gpu/msm/adreno_debugfs.c +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2002,2008-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2008-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -168,6 +168,7 @@ static const struct flag_entry context_flags[] = {KGSL_CONTEXT_FLAGS}; * KGSL_CONTEXT_PRIV_DEVICE_SPECIFIC so it is ok to cross the streams here. */ static const struct flag_entry context_priv[] = { { KGSL_CONTEXT_PRIV_SUBMITTED, "submitted"}, { KGSL_CONTEXT_PRIV_DETACHED, "detached"}, { KGSL_CONTEXT_PRIV_INVALID, "invalid"}, { KGSL_CONTEXT_PRIV_PAGEFAULT, "pagefault"}, Loading drivers/gpu/msm/adreno_drawctxt.c +6 −4 Original line number Diff line number Diff line /* Copyright (c) 2002,2007-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2007-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -213,10 +213,12 @@ static int adreno_drawctxt_wait_rb(struct adreno_device *adreno_dev, BUG_ON(!mutex_is_locked(&device->mutex)); /* * If the context is invalid then return immediately - we may end up * waiting for a timestamp that will never come * If the context is invalid (OR) not submitted commands to GPU * then return immediately - we may end up waiting for a timestamp * that will never come */ if (kgsl_context_invalid(context)) if (kgsl_context_invalid(context) || !test_bit(KGSL_CONTEXT_PRIV_SUBMITTED, &context->priv)) goto done; trace_adreno_drawctxt_wait_start(drawctxt->rb->id, context->id, Loading drivers/gpu/msm/adreno_ringbuffer.c +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2002,2007-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2007-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1042,6 +1042,7 @@ int adreno_ringbuffer_submitcmd(struct adreno_device *adreno_dev, cmdbatch->timestamp, time); if (!ret) { set_bit(KGSL_CONTEXT_PRIV_SUBMITTED, &context->priv); cmdbatch->global_ts = drawctxt->internal_timestamp; /* Put the timevalues in the profiling buffer */ Loading drivers/gpu/msm/kgsl_device.h +4 −2 Original line number Diff line number Diff line /* Copyright (c) 2002,2007-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2007-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -308,6 +308,7 @@ struct kgsl_device { /** * enum bits for struct kgsl_context.priv * @KGSL_CONTEXT_PRIV_SUBMITTED - The context has submitted commands to gpu. * @KGSL_CONTEXT_PRIV_DETACHED - The context has been destroyed by userspace * and is no longer using the gpu. * @KGSL_CONTEXT_PRIV_INVALID - The context has been destroyed by the kernel Loading @@ -317,7 +318,8 @@ struct kgsl_device { * reserved for devices specific use. */ enum kgsl_context_priv { KGSL_CONTEXT_PRIV_DETACHED = 0, KGSL_CONTEXT_PRIV_SUBMITTED = 0, KGSL_CONTEXT_PRIV_DETACHED, KGSL_CONTEXT_PRIV_INVALID, KGSL_CONTEXT_PRIV_PAGEFAULT, KGSL_CONTEXT_PRIV_DEVICE_SPECIFIC = 16, Loading Loading
drivers/gpu/msm/adreno_debugfs.c +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2002,2008-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2008-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -168,6 +168,7 @@ static const struct flag_entry context_flags[] = {KGSL_CONTEXT_FLAGS}; * KGSL_CONTEXT_PRIV_DEVICE_SPECIFIC so it is ok to cross the streams here. */ static const struct flag_entry context_priv[] = { { KGSL_CONTEXT_PRIV_SUBMITTED, "submitted"}, { KGSL_CONTEXT_PRIV_DETACHED, "detached"}, { KGSL_CONTEXT_PRIV_INVALID, "invalid"}, { KGSL_CONTEXT_PRIV_PAGEFAULT, "pagefault"}, Loading
drivers/gpu/msm/adreno_drawctxt.c +6 −4 Original line number Diff line number Diff line /* Copyright (c) 2002,2007-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2007-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -213,10 +213,12 @@ static int adreno_drawctxt_wait_rb(struct adreno_device *adreno_dev, BUG_ON(!mutex_is_locked(&device->mutex)); /* * If the context is invalid then return immediately - we may end up * waiting for a timestamp that will never come * If the context is invalid (OR) not submitted commands to GPU * then return immediately - we may end up waiting for a timestamp * that will never come */ if (kgsl_context_invalid(context)) if (kgsl_context_invalid(context) || !test_bit(KGSL_CONTEXT_PRIV_SUBMITTED, &context->priv)) goto done; trace_adreno_drawctxt_wait_start(drawctxt->rb->id, context->id, Loading
drivers/gpu/msm/adreno_ringbuffer.c +2 −1 Original line number Diff line number Diff line /* Copyright (c) 2002,2007-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2007-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -1042,6 +1042,7 @@ int adreno_ringbuffer_submitcmd(struct adreno_device *adreno_dev, cmdbatch->timestamp, time); if (!ret) { set_bit(KGSL_CONTEXT_PRIV_SUBMITTED, &context->priv); cmdbatch->global_ts = drawctxt->internal_timestamp; /* Put the timevalues in the profiling buffer */ Loading
drivers/gpu/msm/kgsl_device.h +4 −2 Original line number Diff line number Diff line /* Copyright (c) 2002,2007-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2002,2007-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -308,6 +308,7 @@ struct kgsl_device { /** * enum bits for struct kgsl_context.priv * @KGSL_CONTEXT_PRIV_SUBMITTED - The context has submitted commands to gpu. * @KGSL_CONTEXT_PRIV_DETACHED - The context has been destroyed by userspace * and is no longer using the gpu. * @KGSL_CONTEXT_PRIV_INVALID - The context has been destroyed by the kernel Loading @@ -317,7 +318,8 @@ struct kgsl_device { * reserved for devices specific use. */ enum kgsl_context_priv { KGSL_CONTEXT_PRIV_DETACHED = 0, KGSL_CONTEXT_PRIV_SUBMITTED = 0, KGSL_CONTEXT_PRIV_DETACHED, KGSL_CONTEXT_PRIV_INVALID, KGSL_CONTEXT_PRIV_PAGEFAULT, KGSL_CONTEXT_PRIV_DEVICE_SPECIFIC = 16, Loading