drm: Replace crtc fb with primary plane fb (v3)
[deliverable/linux.git] / drivers / gpu / drm / qxl / qxl_display.c
index 798bde2e5881db484fd3797013aa11a04f11c902..41bdd174657e6ea34c4ad8a703d3288e721d919f 100644 (file)
@@ -527,7 +527,7 @@ static int qxl_crtc_mode_set(struct drm_crtc *crtc,
        bool recreate_primary = false;
        int ret;
        int surf_id;
-       if (!crtc->fb) {
+       if (!crtc->primary->fb) {
                DRM_DEBUG_KMS("No FB bound\n");
                return 0;
        }
@@ -536,7 +536,7 @@ static int qxl_crtc_mode_set(struct drm_crtc *crtc,
                qfb = to_qxl_framebuffer(old_fb);
                old_bo = gem_to_qxl_bo(qfb->obj);
        }
-       qfb = to_qxl_framebuffer(crtc->fb);
+       qfb = to_qxl_framebuffer(crtc->primary->fb);
        bo = gem_to_qxl_bo(qfb->obj);
        if (!m)
                /* and do we care? */
@@ -609,14 +609,14 @@ static void qxl_crtc_disable(struct drm_crtc *crtc)
        struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
        struct drm_device *dev = crtc->dev;
        struct qxl_device *qdev = dev->dev_private;
-       if (crtc->fb) {
-               struct qxl_framebuffer *qfb = to_qxl_framebuffer(crtc->fb);
+       if (crtc->primary->fb) {
+               struct qxl_framebuffer *qfb = to_qxl_framebuffer(crtc->primary->fb);
                struct qxl_bo *bo = gem_to_qxl_bo(qfb->obj);
                int ret;
                ret = qxl_bo_reserve(bo, false);
                qxl_bo_unpin(bo);
                qxl_bo_unreserve(bo);
-               crtc->fb = NULL;
+               crtc->primary->fb = NULL;
        }
 
        qxl_monitors_config_set(qdev, qcrtc->index, 0, 0, 0, 0, 0);
This page took 0.02454 seconds and 5 git commands to generate.