Loading drivers/gpu/msm/adreno.c +23 −23 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ static void adreno_input_work(struct work_struct *work) struct adreno_device, input_work); struct kgsl_device *device = &adreno_dev->dev; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); device->flags |= KGSL_FLAG_WAKE_ON_TOUCH; Loading @@ -135,7 +135,7 @@ static void adreno_input_work(struct work_struct *work) */ mod_timer(&device->idle_timer, jiffies + msecs_to_jiffies(_wake_timeout)); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } /* Loading Loading @@ -360,10 +360,10 @@ int adreno_perfcounter_read_group(struct adreno_device *adreno_dev, goto done; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); ret = kgsl_active_count_get(device); if (ret) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); goto done; } Loading Loading @@ -391,7 +391,7 @@ int adreno_perfcounter_read_group(struct adreno_device *adreno_dev, } kgsl_active_count_put(device); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); /* write the data */ if (ret == 0) Loading Loading @@ -483,7 +483,7 @@ int adreno_perfcounter_query_group(struct adreno_device *adreno_dev, if (counters == NULL || groupid >= counters->group_count) return -EINVAL; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); group = &(counters->groups[groupid]); *max_counters = group->reg_count; Loading @@ -493,7 +493,7 @@ int adreno_perfcounter_query_group(struct adreno_device *adreno_dev, * *max_counters and return success */ if (countables == NULL || count == 0) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return 0; } Loading @@ -501,14 +501,14 @@ int adreno_perfcounter_query_group(struct adreno_device *adreno_dev, buf = kmalloc(t * sizeof(unsigned int), GFP_KERNEL); if (buf == NULL) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return -ENOMEM; } for (i = 0; i < t; i++) buf[i] = group->regs[i].countable; kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); ret = copy_to_user(countables, buf, sizeof(unsigned int) * t); kfree(buf); Loading Loading @@ -2020,7 +2020,7 @@ static void adreno_start_work(struct work_struct *work) /* Nice ourselves to be higher priority but not too high priority */ set_user_nice(current, _wake_nice); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* * If adreno start is already called, no need to call it again * it can lead to unpredictable behavior if we try to start Loading @@ -2040,7 +2040,7 @@ static void adreno_start_work(struct work_struct *work) _status = _adreno_start(adreno_dev); else _status = 0; kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } /** Loading @@ -2065,9 +2065,9 @@ static int adreno_start(struct kgsl_device *device, int priority) * higher priority work queue and wait for it to finish */ queue_work(adreno_wq, &adreno_dev->start_work); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); flush_work(&adreno_dev->start_work); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); return _status; } Loading Loading @@ -2426,7 +2426,7 @@ static ssize_t _ft_hang_intr_status_store(struct device *dev, return 0; adreno_dev = ADRENO_DEVICE(device); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); ret = kgsl_sysfs_store(buf, &new_setting); if (ret) goto done; Loading Loading @@ -2470,7 +2470,7 @@ static ssize_t _ft_hang_intr_status_store(struct device *dev, } } done: kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return ret < 0 ? ret : count; } Loading Loading @@ -2549,7 +2549,7 @@ static ssize_t _sptp_pc_store(struct device *dev, if (ret < 0) return ret; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); kgsl_pwrctrl_change_state(device, KGSL_STATE_SUSPEND); if (t) Loading @@ -2558,7 +2558,7 @@ static ssize_t _sptp_pc_store(struct device *dev, clear_bit(ADRENO_SPTP_PC_CTRL, &adreno_dev->pwrctrl_flag); kgsl_pwrctrl_change_state(device, KGSL_STATE_SLUMBER); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return count; } Loading Loading @@ -2783,7 +2783,7 @@ static int adreno_setproperty(struct kgsl_device_private *dev_priv, break; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (enable) { device->pwrctrl.ctrl_flags = 0; Loading @@ -2803,7 +2803,7 @@ static int adreno_setproperty(struct kgsl_device_private *dev_priv, kgsl_pwrscale_disable(device); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); status = 0; } break; Loading Loading @@ -3262,7 +3262,7 @@ static long adreno_ioctl(struct kgsl_device_private *dev_priv, switch (cmd) { case IOCTL_KGSL_PERFCOUNTER_GET: { struct kgsl_perfcounter_get *get = data; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* * adreno_perfcounter_get() is called by kernel clients * during start(), so it is not safe to take an Loading @@ -3275,15 +3275,15 @@ static long adreno_ioctl(struct kgsl_device_private *dev_priv, &get->offset_hi, PERFCOUNTER_FLAG_NONE); kgsl_active_count_put(device); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); break; } case IOCTL_KGSL_PERFCOUNTER_PUT: { struct kgsl_perfcounter_put *put = data; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); result = adreno_perfcounter_put(adreno_dev, put->groupid, put->countable, PERFCOUNTER_FLAG_NONE); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); break; } case IOCTL_KGSL_PERFCOUNTER_QUERY: { Loading drivers/gpu/msm/adreno_coresight.c +8 −8 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ ssize_t adreno_coresight_show_register(struct device *dev, * otherwise report 0 */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (test_bit(ADRENO_DEVICE_CORESIGHT, &adreno_dev->priv)) { /* Loading @@ -59,7 +59,7 @@ ssize_t adreno_coresight_show_register(struct device *dev, val = cattr->reg->value; } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return snprintf(buf, PAGE_SIZE, "0x%X", val); } Loading @@ -85,7 +85,7 @@ ssize_t adreno_coresight_store_register(struct device *dev, if (ret) return ret; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* Ignore writes while coresight is off */ if (!test_bit(ADRENO_DEVICE_CORESIGHT, &adreno_dev->priv)) Loading @@ -104,7 +104,7 @@ ssize_t adreno_coresight_store_register(struct device *dev, } out: kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return size; } Loading Loading @@ -140,7 +140,7 @@ static void adreno_coresight_disable(struct coresight_device *csdev) if (coresight == NULL) return; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (!kgsl_active_count_get(device)) { for (i = 0; i < coresight->count; i++) Loading @@ -152,7 +152,7 @@ static void adreno_coresight_disable(struct coresight_device *csdev) clear_bit(ADRENO_DEVICE_CORESIGHT, &adreno_dev->priv); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } static int _adreno_coresight_get(struct adreno_device *adreno_dev) Loading Loading @@ -226,7 +226,7 @@ static int adreno_coresight_enable(struct coresight_device *csdev) if (coresight == NULL) return -ENODEV; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (!test_and_set_bit(ADRENO_DEVICE_CORESIGHT, &adreno_dev->priv)) { int i; Loading @@ -239,7 +239,7 @@ static int adreno_coresight_enable(struct coresight_device *csdev) ret = _adreno_coresight_set(adreno_dev); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return ret; } Loading drivers/gpu/msm/adreno_dispatch.c +16 −16 Original line number Diff line number Diff line Loading @@ -369,9 +369,9 @@ static int sendcmd(struct adreno_device *adreno_dev, struct adreno_dispatcher *dispatcher = &adreno_dev->dispatcher; int ret; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (adreno_gpu_halt(adreno_dev) != 0) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return -EINVAL; } Loading @@ -383,7 +383,7 @@ static int sendcmd(struct adreno_device *adreno_dev, ret = kgsl_active_count_get(device); if (ret) { dispatcher->inflight--; kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return ret; } Loading @@ -410,7 +410,7 @@ static int sendcmd(struct adreno_device *adreno_dev, } } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); if (ret) { dispatcher->inflight--; Loading Loading @@ -1073,10 +1073,10 @@ static void remove_invalidated_cmdbatches(struct kgsl_device *device, kgsl_context_invalid(cmd->context)) { replay[i] = NULL; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); kgsl_cancel_events_timestamp(device, &cmd->context->events, cmd->timestamp); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); kgsl_cmdbatch_destroy(cmd); } Loading Loading @@ -1190,7 +1190,7 @@ static int dispatcher_do_fault(struct kgsl_device *device) del_timer_sync(&dispatcher->timer); del_timer_sync(&dispatcher->fault_timer); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* hang opcode */ kgsl_cffdump_hang(device); Loading Loading @@ -1224,7 +1224,7 @@ static int dispatcher_do_fault(struct kgsl_device *device) kgsl_device_snapshot(device, cmdbatch->context); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); /* Allocate memory to store the inflight commands */ replay = kzalloc(sizeof(*replay) * dispatcher->inflight, GFP_KERNEL); Loading Loading @@ -1431,12 +1431,12 @@ replay: dispatcher->head = dispatcher->tail = 0; /* Reset the GPU */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* make sure halt is not set during recovery */ halt = adreno_gpu_halt(adreno_dev); adreno_clear_gpu_halt(adreno_dev); ret = adreno_reset(device); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); /* if any other fault got in until reset then ignore */ fault = atomic_xchg(&dispatcher->fault, 0); Loading Loading @@ -1681,12 +1681,12 @@ done: mod_timer(&dispatcher->timer, cmdbatch->expires); /* There are still things in flight - update the idle counts */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); kgsl_pwrscale_update(device); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } else { /* There is nothing left in the pipeline. Shut 'er down boys */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (test_and_clear_bit(ADRENO_DISPATCHER_ACTIVE, &dispatcher->priv)) Loading @@ -1704,7 +1704,7 @@ done: clear_bit(ADRENO_DISPATCHER_POWER, &dispatcher->priv); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } mutex_unlock(&dispatcher->mutex); Loading Loading @@ -2060,7 +2060,7 @@ int adreno_dispatcher_idle_unsafe(struct adreno_device *adreno_dev) adreno_get_gpu_halt(adreno_dev); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); ret = wait_for_completion_timeout(&dispatcher->idle_gate, msecs_to_jiffies(ADRENO_IDLE_TIMEOUT)); Loading @@ -2073,7 +2073,7 @@ int adreno_dispatcher_idle_unsafe(struct adreno_device *adreno_dev) ret = 0; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); adreno_put_gpu_halt(adreno_dev); /* * requeue dispatcher work to resubmit pending commands Loading drivers/gpu/msm/adreno_drawctxt.c +8 −8 Original line number Diff line number Diff line Loading @@ -40,9 +40,9 @@ static int _check_context_timestamp(struct kgsl_device *device, kgsl_context_invalid(&drawctxt->base)) return 1; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); ret = kgsl_check_timestamp(device, &drawctxt->base, timestamp); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return ret; } Loading Loading @@ -83,7 +83,7 @@ int adreno_drawctxt_wait(struct adreno_device *adreno_dev, if (ret) goto done; kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); if (timeout) { ret_temp = msecs_to_jiffies(timeout); Loading @@ -105,7 +105,7 @@ int adreno_drawctxt_wait(struct adreno_device *adreno_dev, ret = (int)ret_temp; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* -EDEADLK if the context was invalidated while we were waiting */ if (kgsl_context_invalid(context)) Loading Loading @@ -173,7 +173,7 @@ static int adreno_drawctxt_wait_global(struct adreno_device *adreno_dev, goto done; } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); if (timeout) { ret = (int) wait_event_timeout(drawctxt->waiting, Loading @@ -189,7 +189,7 @@ static int adreno_drawctxt_wait_global(struct adreno_device *adreno_dev, _check_global_timestamp(device, context, timestamp)); } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (ret) kgsl_cancel_events_timestamp(device, Loading Loading @@ -241,10 +241,10 @@ void adreno_drawctxt_invalidate(struct kgsl_device *device, mutex_unlock(&drawctxt->mutex); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); kgsl_cancel_events_timestamp(device, &context->events, cmdbatch->timestamp); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); kgsl_cmdbatch_destroy(cmdbatch); mutex_lock(&drawctxt->mutex); Loading drivers/gpu/msm/adreno_profile.c +15 −15 Original line number Diff line number Diff line Loading @@ -480,9 +480,9 @@ static int profile_enable_get(void *data, u64 *val) struct kgsl_device *device = data; struct adreno_device *adreno_dev = ADRENO_DEVICE(device); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); *val = adreno_profile_enabled(&adreno_dev->profile); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return 0; } Loading @@ -493,13 +493,13 @@ static int profile_enable_set(void *data, u64 val) struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct adreno_profile *profile = &adreno_dev->profile; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); profile->enabled = val; check_close_profile(profile); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return 0; } Loading @@ -515,11 +515,11 @@ static ssize_t profile_assignments_read(struct file *filep, char *buf, *pos; ssize_t size = 0; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); buf = kmalloc(max_size, GFP_KERNEL); if (!buf) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return -ENOMEM; } Loading @@ -539,7 +539,7 @@ static ssize_t profile_assignments_read(struct file *filep, kfree(buf); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return size; } Loading Loading @@ -678,7 +678,7 @@ static ssize_t profile_assignments_write(struct file *filep, goto error_free; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (adreno_profile_enabled(profile)) { size = -EINVAL; Loading Loading @@ -734,7 +734,7 @@ static ssize_t profile_assignments_write(struct file *filep, error_put: kgsl_active_count_put(device); error_unlock: kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); error_free: kfree(buf); return size; Loading Loading @@ -906,7 +906,7 @@ static ssize_t profile_pipe_print(struct file *filep, char __user *ubuf, * for each perf counter <cntr_reg_off> <start hi & lo> <end hi & low> */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); while (1) { /* process any results that are available into the log_buffer */ Loading @@ -928,10 +928,10 @@ static ssize_t profile_pipe_print(struct file *filep, char __user *ubuf, } } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ / 10); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (signal_pending(current)) { status = 0; Loading @@ -940,7 +940,7 @@ static ssize_t profile_pipe_print(struct file *filep, char __user *ubuf, } check_close_profile(profile); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return status; } Loading @@ -954,7 +954,7 @@ static int profile_groups_print(struct seq_file *s, void *unused) struct adreno_perfcount_group *group; int i, j, used; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); for (i = 0; i < counters->group_count; ++i) { group = &(counters->groups[i]); Loading @@ -970,7 +970,7 @@ static int profile_groups_print(struct seq_file *s, void *unused) group->reg_count, used); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return 0; } Loading Loading
drivers/gpu/msm/adreno.c +23 −23 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ static void adreno_input_work(struct work_struct *work) struct adreno_device, input_work); struct kgsl_device *device = &adreno_dev->dev; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); device->flags |= KGSL_FLAG_WAKE_ON_TOUCH; Loading @@ -135,7 +135,7 @@ static void adreno_input_work(struct work_struct *work) */ mod_timer(&device->idle_timer, jiffies + msecs_to_jiffies(_wake_timeout)); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } /* Loading Loading @@ -360,10 +360,10 @@ int adreno_perfcounter_read_group(struct adreno_device *adreno_dev, goto done; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); ret = kgsl_active_count_get(device); if (ret) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); goto done; } Loading Loading @@ -391,7 +391,7 @@ int adreno_perfcounter_read_group(struct adreno_device *adreno_dev, } kgsl_active_count_put(device); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); /* write the data */ if (ret == 0) Loading Loading @@ -483,7 +483,7 @@ int adreno_perfcounter_query_group(struct adreno_device *adreno_dev, if (counters == NULL || groupid >= counters->group_count) return -EINVAL; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); group = &(counters->groups[groupid]); *max_counters = group->reg_count; Loading @@ -493,7 +493,7 @@ int adreno_perfcounter_query_group(struct adreno_device *adreno_dev, * *max_counters and return success */ if (countables == NULL || count == 0) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return 0; } Loading @@ -501,14 +501,14 @@ int adreno_perfcounter_query_group(struct adreno_device *adreno_dev, buf = kmalloc(t * sizeof(unsigned int), GFP_KERNEL); if (buf == NULL) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return -ENOMEM; } for (i = 0; i < t; i++) buf[i] = group->regs[i].countable; kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); ret = copy_to_user(countables, buf, sizeof(unsigned int) * t); kfree(buf); Loading Loading @@ -2020,7 +2020,7 @@ static void adreno_start_work(struct work_struct *work) /* Nice ourselves to be higher priority but not too high priority */ set_user_nice(current, _wake_nice); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* * If adreno start is already called, no need to call it again * it can lead to unpredictable behavior if we try to start Loading @@ -2040,7 +2040,7 @@ static void adreno_start_work(struct work_struct *work) _status = _adreno_start(adreno_dev); else _status = 0; kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } /** Loading @@ -2065,9 +2065,9 @@ static int adreno_start(struct kgsl_device *device, int priority) * higher priority work queue and wait for it to finish */ queue_work(adreno_wq, &adreno_dev->start_work); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); flush_work(&adreno_dev->start_work); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); return _status; } Loading Loading @@ -2426,7 +2426,7 @@ static ssize_t _ft_hang_intr_status_store(struct device *dev, return 0; adreno_dev = ADRENO_DEVICE(device); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); ret = kgsl_sysfs_store(buf, &new_setting); if (ret) goto done; Loading Loading @@ -2470,7 +2470,7 @@ static ssize_t _ft_hang_intr_status_store(struct device *dev, } } done: kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return ret < 0 ? ret : count; } Loading Loading @@ -2549,7 +2549,7 @@ static ssize_t _sptp_pc_store(struct device *dev, if (ret < 0) return ret; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); kgsl_pwrctrl_change_state(device, KGSL_STATE_SUSPEND); if (t) Loading @@ -2558,7 +2558,7 @@ static ssize_t _sptp_pc_store(struct device *dev, clear_bit(ADRENO_SPTP_PC_CTRL, &adreno_dev->pwrctrl_flag); kgsl_pwrctrl_change_state(device, KGSL_STATE_SLUMBER); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return count; } Loading Loading @@ -2783,7 +2783,7 @@ static int adreno_setproperty(struct kgsl_device_private *dev_priv, break; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (enable) { device->pwrctrl.ctrl_flags = 0; Loading @@ -2803,7 +2803,7 @@ static int adreno_setproperty(struct kgsl_device_private *dev_priv, kgsl_pwrscale_disable(device); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); status = 0; } break; Loading Loading @@ -3262,7 +3262,7 @@ static long adreno_ioctl(struct kgsl_device_private *dev_priv, switch (cmd) { case IOCTL_KGSL_PERFCOUNTER_GET: { struct kgsl_perfcounter_get *get = data; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* * adreno_perfcounter_get() is called by kernel clients * during start(), so it is not safe to take an Loading @@ -3275,15 +3275,15 @@ static long adreno_ioctl(struct kgsl_device_private *dev_priv, &get->offset_hi, PERFCOUNTER_FLAG_NONE); kgsl_active_count_put(device); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); break; } case IOCTL_KGSL_PERFCOUNTER_PUT: { struct kgsl_perfcounter_put *put = data; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); result = adreno_perfcounter_put(adreno_dev, put->groupid, put->countable, PERFCOUNTER_FLAG_NONE); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); break; } case IOCTL_KGSL_PERFCOUNTER_QUERY: { Loading
drivers/gpu/msm/adreno_coresight.c +8 −8 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ ssize_t adreno_coresight_show_register(struct device *dev, * otherwise report 0 */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (test_bit(ADRENO_DEVICE_CORESIGHT, &adreno_dev->priv)) { /* Loading @@ -59,7 +59,7 @@ ssize_t adreno_coresight_show_register(struct device *dev, val = cattr->reg->value; } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return snprintf(buf, PAGE_SIZE, "0x%X", val); } Loading @@ -85,7 +85,7 @@ ssize_t adreno_coresight_store_register(struct device *dev, if (ret) return ret; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* Ignore writes while coresight is off */ if (!test_bit(ADRENO_DEVICE_CORESIGHT, &adreno_dev->priv)) Loading @@ -104,7 +104,7 @@ ssize_t adreno_coresight_store_register(struct device *dev, } out: kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return size; } Loading Loading @@ -140,7 +140,7 @@ static void adreno_coresight_disable(struct coresight_device *csdev) if (coresight == NULL) return; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (!kgsl_active_count_get(device)) { for (i = 0; i < coresight->count; i++) Loading @@ -152,7 +152,7 @@ static void adreno_coresight_disable(struct coresight_device *csdev) clear_bit(ADRENO_DEVICE_CORESIGHT, &adreno_dev->priv); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } static int _adreno_coresight_get(struct adreno_device *adreno_dev) Loading Loading @@ -226,7 +226,7 @@ static int adreno_coresight_enable(struct coresight_device *csdev) if (coresight == NULL) return -ENODEV; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (!test_and_set_bit(ADRENO_DEVICE_CORESIGHT, &adreno_dev->priv)) { int i; Loading @@ -239,7 +239,7 @@ static int adreno_coresight_enable(struct coresight_device *csdev) ret = _adreno_coresight_set(adreno_dev); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return ret; } Loading
drivers/gpu/msm/adreno_dispatch.c +16 −16 Original line number Diff line number Diff line Loading @@ -369,9 +369,9 @@ static int sendcmd(struct adreno_device *adreno_dev, struct adreno_dispatcher *dispatcher = &adreno_dev->dispatcher; int ret; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (adreno_gpu_halt(adreno_dev) != 0) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return -EINVAL; } Loading @@ -383,7 +383,7 @@ static int sendcmd(struct adreno_device *adreno_dev, ret = kgsl_active_count_get(device); if (ret) { dispatcher->inflight--; kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return ret; } Loading @@ -410,7 +410,7 @@ static int sendcmd(struct adreno_device *adreno_dev, } } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); if (ret) { dispatcher->inflight--; Loading Loading @@ -1073,10 +1073,10 @@ static void remove_invalidated_cmdbatches(struct kgsl_device *device, kgsl_context_invalid(cmd->context)) { replay[i] = NULL; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); kgsl_cancel_events_timestamp(device, &cmd->context->events, cmd->timestamp); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); kgsl_cmdbatch_destroy(cmd); } Loading Loading @@ -1190,7 +1190,7 @@ static int dispatcher_do_fault(struct kgsl_device *device) del_timer_sync(&dispatcher->timer); del_timer_sync(&dispatcher->fault_timer); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* hang opcode */ kgsl_cffdump_hang(device); Loading Loading @@ -1224,7 +1224,7 @@ static int dispatcher_do_fault(struct kgsl_device *device) kgsl_device_snapshot(device, cmdbatch->context); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); /* Allocate memory to store the inflight commands */ replay = kzalloc(sizeof(*replay) * dispatcher->inflight, GFP_KERNEL); Loading Loading @@ -1431,12 +1431,12 @@ replay: dispatcher->head = dispatcher->tail = 0; /* Reset the GPU */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* make sure halt is not set during recovery */ halt = adreno_gpu_halt(adreno_dev); adreno_clear_gpu_halt(adreno_dev); ret = adreno_reset(device); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); /* if any other fault got in until reset then ignore */ fault = atomic_xchg(&dispatcher->fault, 0); Loading Loading @@ -1681,12 +1681,12 @@ done: mod_timer(&dispatcher->timer, cmdbatch->expires); /* There are still things in flight - update the idle counts */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); kgsl_pwrscale_update(device); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } else { /* There is nothing left in the pipeline. Shut 'er down boys */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (test_and_clear_bit(ADRENO_DISPATCHER_ACTIVE, &dispatcher->priv)) Loading @@ -1704,7 +1704,7 @@ done: clear_bit(ADRENO_DISPATCHER_POWER, &dispatcher->priv); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); } mutex_unlock(&dispatcher->mutex); Loading Loading @@ -2060,7 +2060,7 @@ int adreno_dispatcher_idle_unsafe(struct adreno_device *adreno_dev) adreno_get_gpu_halt(adreno_dev); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); ret = wait_for_completion_timeout(&dispatcher->idle_gate, msecs_to_jiffies(ADRENO_IDLE_TIMEOUT)); Loading @@ -2073,7 +2073,7 @@ int adreno_dispatcher_idle_unsafe(struct adreno_device *adreno_dev) ret = 0; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); adreno_put_gpu_halt(adreno_dev); /* * requeue dispatcher work to resubmit pending commands Loading
drivers/gpu/msm/adreno_drawctxt.c +8 −8 Original line number Diff line number Diff line Loading @@ -40,9 +40,9 @@ static int _check_context_timestamp(struct kgsl_device *device, kgsl_context_invalid(&drawctxt->base)) return 1; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); ret = kgsl_check_timestamp(device, &drawctxt->base, timestamp); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return ret; } Loading Loading @@ -83,7 +83,7 @@ int adreno_drawctxt_wait(struct adreno_device *adreno_dev, if (ret) goto done; kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); if (timeout) { ret_temp = msecs_to_jiffies(timeout); Loading @@ -105,7 +105,7 @@ int adreno_drawctxt_wait(struct adreno_device *adreno_dev, ret = (int)ret_temp; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); /* -EDEADLK if the context was invalidated while we were waiting */ if (kgsl_context_invalid(context)) Loading Loading @@ -173,7 +173,7 @@ static int adreno_drawctxt_wait_global(struct adreno_device *adreno_dev, goto done; } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); if (timeout) { ret = (int) wait_event_timeout(drawctxt->waiting, Loading @@ -189,7 +189,7 @@ static int adreno_drawctxt_wait_global(struct adreno_device *adreno_dev, _check_global_timestamp(device, context, timestamp)); } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (ret) kgsl_cancel_events_timestamp(device, Loading Loading @@ -241,10 +241,10 @@ void adreno_drawctxt_invalidate(struct kgsl_device *device, mutex_unlock(&drawctxt->mutex); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); kgsl_cancel_events_timestamp(device, &context->events, cmdbatch->timestamp); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); kgsl_cmdbatch_destroy(cmdbatch); mutex_lock(&drawctxt->mutex); Loading
drivers/gpu/msm/adreno_profile.c +15 −15 Original line number Diff line number Diff line Loading @@ -480,9 +480,9 @@ static int profile_enable_get(void *data, u64 *val) struct kgsl_device *device = data; struct adreno_device *adreno_dev = ADRENO_DEVICE(device); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); *val = adreno_profile_enabled(&adreno_dev->profile); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return 0; } Loading @@ -493,13 +493,13 @@ static int profile_enable_set(void *data, u64 val) struct adreno_device *adreno_dev = ADRENO_DEVICE(device); struct adreno_profile *profile = &adreno_dev->profile; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); profile->enabled = val; check_close_profile(profile); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return 0; } Loading @@ -515,11 +515,11 @@ static ssize_t profile_assignments_read(struct file *filep, char *buf, *pos; ssize_t size = 0; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); buf = kmalloc(max_size, GFP_KERNEL); if (!buf) { kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return -ENOMEM; } Loading @@ -539,7 +539,7 @@ static ssize_t profile_assignments_read(struct file *filep, kfree(buf); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return size; } Loading Loading @@ -678,7 +678,7 @@ static ssize_t profile_assignments_write(struct file *filep, goto error_free; } kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (adreno_profile_enabled(profile)) { size = -EINVAL; Loading Loading @@ -734,7 +734,7 @@ static ssize_t profile_assignments_write(struct file *filep, error_put: kgsl_active_count_put(device); error_unlock: kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); error_free: kfree(buf); return size; Loading Loading @@ -906,7 +906,7 @@ static ssize_t profile_pipe_print(struct file *filep, char __user *ubuf, * for each perf counter <cntr_reg_off> <start hi & lo> <end hi & low> */ kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); while (1) { /* process any results that are available into the log_buffer */ Loading @@ -928,10 +928,10 @@ static ssize_t profile_pipe_print(struct file *filep, char __user *ubuf, } } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(HZ / 10); kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); if (signal_pending(current)) { status = 0; Loading @@ -940,7 +940,7 @@ static ssize_t profile_pipe_print(struct file *filep, char __user *ubuf, } check_close_profile(profile); kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return status; } Loading @@ -954,7 +954,7 @@ static int profile_groups_print(struct seq_file *s, void *unused) struct adreno_perfcount_group *group; int i, j, used; kgsl_mutex_lock(&device->mutex, &device->mutex_owner); mutex_lock(&device->mutex); for (i = 0; i < counters->group_count; ++i) { group = &(counters->groups[i]); Loading @@ -970,7 +970,7 @@ static int profile_groups_print(struct seq_file *s, void *unused) group->reg_count, used); } kgsl_mutex_unlock(&device->mutex, &device->mutex_owner); mutex_unlock(&device->mutex); return 0; } Loading