Loading drivers/gpu/msm/adreno.c +2 −0 Original line number Diff line number Diff line Loading @@ -3549,6 +3549,8 @@ static const struct kgsl_functable adreno_functable = { .clk_set_options = adreno_clk_set_options, .gpu_model = adreno_gpu_model, .stop_fault_timer = adreno_dispatcher_stop_fault_timer, .dispatcher_halt = adreno_dispatcher_halt, .dispatcher_unhalt = adreno_dispatcher_unhalt, }; static struct platform_driver adreno_platform_driver = { Loading drivers/gpu/msm/adreno_dispatch.c +17 −0 Original line number Diff line number Diff line Loading @@ -2857,6 +2857,16 @@ int adreno_dispatcher_init(struct adreno_device *adreno_dev) return ret; } void adreno_dispatcher_halt(struct kgsl_device *device) { adreno_get_gpu_halt(ADRENO_DEVICE(device)); } void adreno_dispatcher_unhalt(struct kgsl_device *device) { adreno_put_gpu_halt(ADRENO_DEVICE(device)); } /* * adreno_dispatcher_idle() - Wait for dispatcher to idle * @adreno_dev: Adreno device whose dispatcher needs to idle Loading Loading @@ -2887,6 +2897,13 @@ int adreno_dispatcher_idle(struct adreno_device *adreno_dev) mutex_unlock(&device->mutex); /* * Flush the worker to make sure all executing * or pending dispatcher works on worker are * finished */ kthread_flush_worker(&kgsl_driver.worker); ret = wait_for_completion_timeout(&dispatcher->idle_gate, msecs_to_jiffies(ADRENO_IDLE_TIMEOUT)); if (ret == 0) { Loading drivers/gpu/msm/adreno_dispatch.h +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2008-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2008-2018, 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 @@ -103,6 +103,8 @@ enum adreno_dispatcher_flags { }; void adreno_dispatcher_start(struct kgsl_device *device); void adreno_dispatcher_halt(struct kgsl_device *device); void adreno_dispatcher_unhalt(struct kgsl_device *device); int adreno_dispatcher_init(struct adreno_device *adreno_dev); void adreno_dispatcher_close(struct adreno_device *adreno_dev); int adreno_dispatcher_idle(struct adreno_device *adreno_dev); Loading drivers/gpu/msm/kgsl.c +3 −0 Original line number Diff line number Diff line Loading @@ -761,6 +761,8 @@ static int kgsl_suspend_device(struct kgsl_device *device, pm_message_t state) mutex_lock(&device->mutex); status = kgsl_pwrctrl_change_state(device, KGSL_STATE_SUSPEND); if (status == 0) device->ftbl->dispatcher_halt(device); mutex_unlock(&device->mutex); KGSL_PWR_WARN(device, "suspend end\n"); Loading @@ -775,6 +777,7 @@ static int kgsl_resume_device(struct kgsl_device *device) KGSL_PWR_WARN(device, "resume start\n"); mutex_lock(&device->mutex); if (device->state == KGSL_STATE_SUSPEND) { device->ftbl->dispatcher_unhalt(device); kgsl_pwrctrl_change_state(device, KGSL_STATE_SLUMBER); } else if (device->state != KGSL_STATE_INIT) { /* Loading drivers/gpu/msm/kgsl_device.h +2 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,8 @@ struct kgsl_functable { void (*gpu_model)(struct kgsl_device *device, char *str, size_t bufsz); void (*stop_fault_timer)(struct kgsl_device *device); void (*dispatcher_halt)(struct kgsl_device *device); void (*dispatcher_unhalt)(struct kgsl_device *device); }; struct kgsl_ioctl { Loading Loading
drivers/gpu/msm/adreno.c +2 −0 Original line number Diff line number Diff line Loading @@ -3549,6 +3549,8 @@ static const struct kgsl_functable adreno_functable = { .clk_set_options = adreno_clk_set_options, .gpu_model = adreno_gpu_model, .stop_fault_timer = adreno_dispatcher_stop_fault_timer, .dispatcher_halt = adreno_dispatcher_halt, .dispatcher_unhalt = adreno_dispatcher_unhalt, }; static struct platform_driver adreno_platform_driver = { Loading
drivers/gpu/msm/adreno_dispatch.c +17 −0 Original line number Diff line number Diff line Loading @@ -2857,6 +2857,16 @@ int adreno_dispatcher_init(struct adreno_device *adreno_dev) return ret; } void adreno_dispatcher_halt(struct kgsl_device *device) { adreno_get_gpu_halt(ADRENO_DEVICE(device)); } void adreno_dispatcher_unhalt(struct kgsl_device *device) { adreno_put_gpu_halt(ADRENO_DEVICE(device)); } /* * adreno_dispatcher_idle() - Wait for dispatcher to idle * @adreno_dev: Adreno device whose dispatcher needs to idle Loading Loading @@ -2887,6 +2897,13 @@ int adreno_dispatcher_idle(struct adreno_device *adreno_dev) mutex_unlock(&device->mutex); /* * Flush the worker to make sure all executing * or pending dispatcher works on worker are * finished */ kthread_flush_worker(&kgsl_driver.worker); ret = wait_for_completion_timeout(&dispatcher->idle_gate, msecs_to_jiffies(ADRENO_IDLE_TIMEOUT)); if (ret == 0) { Loading
drivers/gpu/msm/adreno_dispatch.h +3 −1 Original line number Diff line number Diff line /* Copyright (c) 2008-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2008-2018, 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 @@ -103,6 +103,8 @@ enum adreno_dispatcher_flags { }; void adreno_dispatcher_start(struct kgsl_device *device); void adreno_dispatcher_halt(struct kgsl_device *device); void adreno_dispatcher_unhalt(struct kgsl_device *device); int adreno_dispatcher_init(struct adreno_device *adreno_dev); void adreno_dispatcher_close(struct adreno_device *adreno_dev); int adreno_dispatcher_idle(struct adreno_device *adreno_dev); Loading
drivers/gpu/msm/kgsl.c +3 −0 Original line number Diff line number Diff line Loading @@ -761,6 +761,8 @@ static int kgsl_suspend_device(struct kgsl_device *device, pm_message_t state) mutex_lock(&device->mutex); status = kgsl_pwrctrl_change_state(device, KGSL_STATE_SUSPEND); if (status == 0) device->ftbl->dispatcher_halt(device); mutex_unlock(&device->mutex); KGSL_PWR_WARN(device, "suspend end\n"); Loading @@ -775,6 +777,7 @@ static int kgsl_resume_device(struct kgsl_device *device) KGSL_PWR_WARN(device, "resume start\n"); mutex_lock(&device->mutex); if (device->state == KGSL_STATE_SUSPEND) { device->ftbl->dispatcher_unhalt(device); kgsl_pwrctrl_change_state(device, KGSL_STATE_SLUMBER); } else if (device->state != KGSL_STATE_INIT) { /* Loading
drivers/gpu/msm/kgsl_device.h +2 −0 Original line number Diff line number Diff line Loading @@ -190,6 +190,8 @@ struct kgsl_functable { void (*gpu_model)(struct kgsl_device *device, char *str, size_t bufsz); void (*stop_fault_timer)(struct kgsl_device *device); void (*dispatcher_halt)(struct kgsl_device *device); void (*dispatcher_unhalt)(struct kgsl_device *device); }; struct kgsl_ioctl { Loading