summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
diff options
context:
space:
mode:
authorMark Yao <mark.yao@rock-chips.com>2015-12-16 13:09:38 +0300
committerMark Yao <mark.yao@rock-chips.com>2015-12-28 03:49:54 +0300
commitf32fad51eec51ad816cecdc3723ab443cd69b61f (patch)
tree4379da1a36a7f0c3a7925925ba9fa7a55d1b977b /drivers/gpu/drm/rockchip/rockchip_drm_drv.c
parentce3887ed0d996e6353d739e8139b8e5faeb726d5 (diff)
downloadlinux-f32fad51eec51ad816cecdc3723ab443cd69b61f.tar.xz
drm/rockchip: support atomic asynchronous commit
If drm core requests a async commit, rockchip_drm_atomic_commit will schedule a work task to update later. Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Diffstat (limited to 'drivers/gpu/drm/rockchip/rockchip_drm_drv.c')
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_drv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 929eb30e49e5..8397d1b62ef9 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -140,6 +140,9 @@ static int rockchip_drm_load(struct drm_device *drm_dev, unsigned long flags)
if (!private)
return -ENOMEM;
+ mutex_init(&private->commit.lock);
+ INIT_WORK(&private->commit.work, rockchip_drm_atomic_work);
+
drm_dev->dev_private = private;
drm_mode_config_init(drm_dev);