OSDN Git Service

msm: kgsl: Don't halt dispatcher if device is not in SUSPEND state
authorDeepak Kumar <dkumar@codeaurora.org>
Wed, 1 Aug 2018 06:27:33 +0000 (11:57 +0530)
committerArchana Sriram <apsrir@codeaurora.org>
Mon, 29 Oct 2018 09:44:01 +0000 (15:14 +0530)
Add a check to make sure device actually transitioned to SUSPEND
state before halting dispatcher in adreno_suspend_device function.
kgsl_pwrctrl_change_state(device,KGSL_STATE_SUSPEND) in
kgsl_suspend_device can return zero without actually changing state
to SUSPEND if device state is NONE or INIT.

Change-Id: I4a5a69007c71651ea2cf7fa7360c960c6856031e
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
drivers/gpu/msm/adreno.c

index 9cb6503..d2aa0a0 100644 (file)
@@ -2807,7 +2807,8 @@ static void adreno_suspend_device(struct kgsl_device *device,
        struct adreno_gpudev *gpudev = ADRENO_GPU_DEVICE(adreno_dev);
        int pm_event = pm_state.event;
 
-       adreno_dispatcher_halt(device);
+       if (device->state == KGSL_STATE_SUSPEND)
+               adreno_dispatcher_halt(device);
 
        if ((pm_event == PM_EVENT_FREEZE) ||
                (pm_event == PM_EVENT_QUIESCE) ||