summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_atomic.c
diff options
context:
space:
mode:
authorRob Clark2016-03-15 22:22:13 +0100
committerRob Clark2016-05-08 16:19:51 +0200
commitca762a8ae7f453978a4769af9dcd3cb08e45b932 (patch)
tree1869cbdbcd1ec7cc4aec82e4dced7acc1a0a3535 /drivers/gpu/drm/msm/msm_atomic.c
parentdrm/msm: split locking and pinning BO's (diff)
downloadkernel-qcow2-linux-ca762a8ae7f453978a4769af9dcd3cb08e45b932.tar.gz
kernel-qcow2-linux-ca762a8ae7f453978a4769af9dcd3cb08e45b932.tar.xz
kernel-qcow2-linux-ca762a8ae7f453978a4769af9dcd3cb08e45b932.zip
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.c9
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);