aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index a13f2516d52f..f9cdc921ef96 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -35,6 +35,7 @@
35#include "nouveau_connector.h" 35#include "nouveau_connector.h"
36#include "nouveau_software.h" 36#include "nouveau_software.h"
37#include "nouveau_gpio.h" 37#include "nouveau_gpio.h"
38#include "nouveau_fence.h"
38#include "nv50_display.h" 39#include "nv50_display.h"
39 40
40static void 41static void
@@ -465,7 +466,7 @@ nouveau_page_flip_emit(struct nouveau_channel *chan,
465 } 466 }
466 FIRE_RING (chan); 467 FIRE_RING (chan);
467 468
468 ret = nouveau_fence_new(chan, pfence, true); 469 ret = nouveau_fence_new(chan, pfence);
469 if (ret) 470 if (ret)
470 goto fail; 471 goto fail;
471 472
@@ -486,7 +487,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
486 struct nouveau_bo *old_bo = nouveau_framebuffer(crtc->fb)->nvbo; 487 struct nouveau_bo *old_bo = nouveau_framebuffer(crtc->fb)->nvbo;
487 struct nouveau_bo *new_bo = nouveau_framebuffer(fb)->nvbo; 488 struct nouveau_bo *new_bo = nouveau_framebuffer(fb)->nvbo;
488 struct nouveau_page_flip_state *s; 489 struct nouveau_page_flip_state *s;
489 struct nouveau_channel *chan; 490 struct nouveau_channel *chan = NULL;
490 struct nouveau_fence *fence; 491 struct nouveau_fence *fence;
491 int ret; 492 int ret;
492 493
@@ -509,7 +510,9 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
509 new_bo->bo.offset }; 510 new_bo->bo.offset };
510 511
511 /* Choose the channel the flip will be handled in */ 512 /* Choose the channel the flip will be handled in */
512 chan = nouveau_fence_channel(new_bo->bo.sync_obj); 513 fence = new_bo->bo.sync_obj;
514 if (fence)
515 chan = nouveau_channel_get_unlocked(fence->channel);
513 if (!chan) 516 if (!chan)
514 chan = nouveau_channel_get_unlocked(dev_priv->channel); 517 chan = nouveau_channel_get_unlocked(dev_priv->channel);
515 mutex_lock(&chan->mutex); 518 mutex_lock(&chan->mutex);