summaryrefslogtreecommitdiff
path: root/drivers/gpu/msm
diff options
context:
space:
mode:
authorHareesh Gundu <hareeshg@codeaurora.org>2016-03-11 12:51:52 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 21:21:56 -0700
commit4471a742cbb5e5d4eddfec4426c0fb455be1b760 (patch)
tree00f4b948056369a30d278324d29647aa27162c6a /drivers/gpu/msm
parent48a71a31646a212898ca7833c1eea70fa84d7911 (diff)
msm: kgsl: Add NULL check for preemption_schedule call
preemption_schedule() is not implemented for A3xx targets. Invoking this function without NULL check result into crash in A3xx target. Fix this by adding a NULL check before invoking the preemption_schedule(). Change-Id: Ic600235f149cade57fedc5454bdc0f6794c67bd9 Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Diffstat (limited to 'drivers/gpu/msm')
-rw-r--r--drivers/gpu/msm/adreno_dispatch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/msm/adreno_dispatch.c b/drivers/gpu/msm/adreno_dispatch.c
index a2215a4af4ab..2b0ac1688079 100644
--- a/drivers/gpu/msm/adreno_dispatch.c
+++ b/drivers/gpu/msm/adreno_dispatch.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2013-2016, 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
@@ -635,7 +635,8 @@ static int sendcmd(struct adreno_device *adreno_dev,
* we just submitted something, readjust ringbuffer
* execution level
*/
- gpudev->preemption_schedule(adreno_dev);
+ if (gpudev->preemption_schedule)
+ gpudev->preemption_schedule(adreno_dev);
return 0;
}
@@ -2104,7 +2105,8 @@ static void adreno_dispatcher_work(struct work_struct *work)
if (dispatcher_do_fault(adreno_dev))
goto done;
- gpudev->preemption_schedule(adreno_dev);
+ if (gpudev->preemption_schedule)
+ gpudev->preemption_schedule(adreno_dev);
if (cur_rb_id != adreno_dev->cur_rb->id) {
struct adreno_dispatcher_cmdqueue *dispatch_q =