diff options
author | Rob Clark <robdclark@gmail.com> | 2016-03-16 00:22:13 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-05-08 17:19:51 +0300 |
commit | ca762a8ae7f453978a4769af9dcd3cb08e45b932 (patch) | |
tree | 1869cbdbcd1ec7cc4aec82e4dced7acc1a0a3535 /drivers/gpu/drm/msm/msm_atomic.c | |
parent | 340faef2418989b2573b82e6c708ef9e24ca439b (diff) | |
download | linux-ca762a8ae7f453978a4769af9dcd3cb08e45b932.tar.xz |
drm/msm: introduce msm_fence_context
Better encapsulate the per-timeline stuff into fence-context. For now
there is just a single fence-context, but eventually we'll also have one
per-CRTC to enable fully explicit fencing.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_atomic.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_atomic.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c index fab0c2d41f66..a2a3d9f25b7b 100644 --- a/drivers/gpu/drm/msm/msm_atomic.c +++ b/drivers/gpu/drm/msm/msm_atomic.c @@ -18,6 +18,7 @@ #include "msm_drv.h" #include "msm_kms.h" #include "msm_gem.h" +#include "msm_gpu.h" /* temporary */ #include "msm_fence.h" struct msm_commit { @@ -202,6 +203,7 @@ int msm_atomic_check(struct drm_device *dev, int msm_atomic_commit(struct drm_device *dev, struct drm_atomic_state *state, bool nonblock) { + struct msm_drm_private *priv = dev->dev_private; int nplanes = dev->mode_config.num_total_plane; int ncrtcs = dev->mode_config.num_crtc; ktime_t timeout; @@ -276,15 +278,16 @@ int msm_atomic_commit(struct drm_device *dev, * current layout. */ - if (nonblock) { - msm_queue_fence_cb(dev, &c->fence_cb, c->fence); + if (nonblock && priv->gpu) { + msm_queue_fence_cb(priv->gpu->fctx, &c->fence_cb, c->fence); return 0; } timeout = ktime_add_ms(ktime_get(), 1000); /* uninterruptible wait */ - msm_wait_fence(dev, c->fence, &timeout, false); + if (priv->gpu) + msm_wait_fence(priv->gpu->fctx, c->fence, &timeout, false); complete_commit(c); |