From df3f1490991409dfa0922d79ca40887bb2d3438f Mon Sep 17 00:00:00 2001 From: Harsh Vardhan Dwivedi Date: Wed, 5 Dec 2012 10:35:13 -0700 Subject: [PATCH] msm: kgsl: Remove incorrect check for current context We remove an incorrect check for currently active context. The intent of the original check was to ensure that the current context is at least there/valid before we issue a dummy command with a forced interrupt. However, this check was implemented incorrectly, instead of checking the context under which the function is running, the check was probing the "drawctxt_active" which may not necessarily be the same as the context for which the function was called. We fix this by changing the check to instead look for the context under which the kgsl_check_interrupt_timestamp() has been called. CRs-fixed: 426186 Change-Id: I6ac123d16888287b14e6e53028f482eb709f24c5 Signed-off-by: Harsh Vardhan Dwivedi --- drivers/gpu/msm/adreno.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/msm/adreno.c b/drivers/gpu/msm/adreno.c index 692e9ac0bc1..fa7b8c7e13a 100644 --- a/drivers/gpu/msm/adreno.c +++ b/drivers/gpu/msm/adreno.c @@ -2061,7 +2061,6 @@ static int kgsl_check_interrupt_timestamp(struct kgsl_device *device, int status; unsigned int ref_ts, enableflag; unsigned int context_id; - struct adreno_device *adreno_dev = ADRENO_DEVICE(device); mutex_lock(&device->mutex); context_id = _get_context_id(context); @@ -2108,13 +2107,9 @@ static int kgsl_check_interrupt_timestamp(struct kgsl_device *device, cmds[0] = cp_type3_packet(CP_NOP, 1); cmds[1] = 0; - if (adreno_dev->drawctxt_active) + if (context) adreno_ringbuffer_issuecmds_intr(device, context, &cmds[0], 2); - else - /* We would never call this function if there - * was no active contexts running */ - BUG(); } } unlock: