summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_crtc.c
diff options
context:
space:
mode:
authorAnton Vorontsov <cbouatmailru@gmail.com>2011-11-25 02:49:45 +0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2011-11-25 02:54:59 +0400
commit47f0ac2b0a8c7f26b513a2a18045219b030aedf1 (patch)
tree27f33a5c1e40ee2a494758c1da2e03e86a09e32c /drivers/gpu/drm/nouveau/nv50_crtc.c
parent7925231037447d1a9036f31c823d362bf2ef4bb0 (diff)
parentc3b92c8787367a8bb53d57d9789b558f1295cc96 (diff)
downloadtalos-op-linux-47f0ac2b0a8c7f26b513a2a18045219b030aedf1.tar.gz
talos-op-linux-47f0ac2b0a8c7f26b513a2a18045219b030aedf1.zip
Merge tag 'v3.1' from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git into master
Battery tree missed last merge window, so it became stale enough so that patches no longer apply as people use pretty recent kernels.
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_crtc.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_crtc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
index 46ad59ea2185..5d989073ba6e 100644
--- a/drivers/gpu/drm/nouveau/nv50_crtc.c
+++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
@@ -519,12 +519,18 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc,
struct drm_device *dev = nv_crtc->base.dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_channel *evo = nv50_display(dev)->master;
- struct drm_framebuffer *drm_fb = nv_crtc->base.fb;
- struct nouveau_framebuffer *fb = nouveau_framebuffer(drm_fb);
+ struct drm_framebuffer *drm_fb;
+ struct nouveau_framebuffer *fb;
int ret;
NV_DEBUG_KMS(dev, "index %d\n", nv_crtc->index);
+ /* no fb bound */
+ if (!atomic && !crtc->fb) {
+ NV_DEBUG_KMS(dev, "No FB bound\n");
+ return 0;
+ }
+
/* If atomic, we want to switch to the fb we were passed, so
* now we update pointers to do that. (We don't pin; just
* assume we're already pinned and update the base address.)
@@ -533,6 +539,8 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc,
drm_fb = passed_fb;
fb = nouveau_framebuffer(passed_fb);
} else {
+ drm_fb = crtc->fb;
+ fb = nouveau_framebuffer(crtc->fb);
/* If not atomic, we can go ahead and pin, and unpin the
* old fb we were passed.
*/
OpenPOWER on IntegriCloud