[COMMON] g2d: increase starter before adding callback
authorhyesoo.yu <hyesoo.yu@samsung.com>
Tue, 20 Jun 2017 05:45:30 +0000 (14:45 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:22:13 +0000 (20:22 +0300)
commit7c96387f1e01aa111bfadf2f9487bdde84f7ae37
tree333fc21ba7c681e2abf2e9894465d98ff206da74
parentd1fbab7b221a2bf8e2fd8b0b0c364639a1536171
[COMMON] g2d: increase starter before adding callback

Always increase task->starter before adding callback
to avoid unexpected operation.

CPU1 CPU2

kref_init(&task->starter);
g2d_get_userdata();
fence_add_callback(fence);
g2d_fence_callback(fence);
kref_put(&task->starter);
g2d_queuework_task();
g2d_device_run();
kref_get(&task->starter);

On the above condition, that forces to run H/W without
getting user data. It makes various types of errors.

Change-Id: Id775237894e7aedcb0c4feb180ab44646557ef5e
Signed-off-by: hyesoo.yu <hyesoo.yu@samsung.com>
drivers/gpu/exynos/g2d/g2d_fence.c
drivers/gpu/exynos/g2d/g2d_uapi_process.c