aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/qxl
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2014-04-01 18:22:40 -0400
committerRob Clark <robdclark@gmail.com>2014-04-01 20:18:28 -0400
commitf4510a2752b75ad5847b7935b68c233cab497f97 (patch)
tree0104efe442302d22b705f34605070a009cc633c9 /drivers/gpu/drm/qxl
parent2d82d188b2cb11b6b221eb84dda2344ef3cd1bb4 (diff)
drm: Replace crtc fb with primary plane fb (v3)
Now that CRTC's have a primary plane, there's no need to track the framebuffer in the CRTC. Replace all references to the CRTC fb with the primary plane's fb. This patch was generated by the Coccinelle semantic patching tool using the following rules: @@ struct drm_crtc C; @@ - (C).fb + C.primary->fb @@ struct drm_crtc *C; @@ - (C)->fb + C->primary->fb v3: Generate patch via coccinelle. Actual removal of crtc->fb has been moved to a subsequent patch. v2: Fixup several lingering crtc->fb instances that were missed in the first patch iteration. [Rob Clark] Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/qxl')
-rw-r--r--drivers/gpu/drm/qxl/qxl_display.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c
index 798bde2e5881..41bdd174657e 100644
--- a/drivers/gpu/drm/qxl/qxl_display.c
+++ b/drivers/gpu/drm/qxl/qxl_display.c
@@ -527,7 +527,7 @@ static int qxl_crtc_mode_set(struct drm_crtc *crtc,
527 bool recreate_primary = false; 527 bool recreate_primary = false;
528 int ret; 528 int ret;
529 int surf_id; 529 int surf_id;
530 if (!crtc->fb) { 530 if (!crtc->primary->fb) {
531 DRM_DEBUG_KMS("No FB bound\n"); 531 DRM_DEBUG_KMS("No FB bound\n");
532 return 0; 532 return 0;
533 } 533 }
@@ -536,7 +536,7 @@ static int qxl_crtc_mode_set(struct drm_crtc *crtc,
536 qfb = to_qxl_framebuffer(old_fb); 536 qfb = to_qxl_framebuffer(old_fb);
537 old_bo = gem_to_qxl_bo(qfb->obj); 537 old_bo = gem_to_qxl_bo(qfb->obj);
538 } 538 }
539 qfb = to_qxl_framebuffer(crtc->fb); 539 qfb = to_qxl_framebuffer(crtc->primary->fb);
540 bo = gem_to_qxl_bo(qfb->obj); 540 bo = gem_to_qxl_bo(qfb->obj);
541 if (!m) 541 if (!m)
542 /* and do we care? */ 542 /* and do we care? */
@@ -609,14 +609,14 @@ static void qxl_crtc_disable(struct drm_crtc *crtc)
609 struct qxl_crtc *qcrtc = to_qxl_crtc(crtc); 609 struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
610 struct drm_device *dev = crtc->dev; 610 struct drm_device *dev = crtc->dev;
611 struct qxl_device *qdev = dev->dev_private; 611 struct qxl_device *qdev = dev->dev_private;
612 if (crtc->fb) { 612 if (crtc->primary->fb) {
613 struct qxl_framebuffer *qfb = to_qxl_framebuffer(crtc->fb); 613 struct qxl_framebuffer *qfb = to_qxl_framebuffer(crtc->primary->fb);
614 struct qxl_bo *bo = gem_to_qxl_bo(qfb->obj); 614 struct qxl_bo *bo = gem_to_qxl_bo(qfb->obj);
615 int ret; 615 int ret;
616 ret = qxl_bo_reserve(bo, false); 616 ret = qxl_bo_reserve(bo, false);
617 qxl_bo_unpin(bo); 617 qxl_bo_unpin(bo);
618 qxl_bo_unreserve(bo); 618 qxl_bo_unreserve(bo);
619 crtc->fb = NULL; 619 crtc->primary->fb = NULL;
620 } 620 }
621 621
622 qxl_monitors_config_set(qdev, qcrtc->index, 0, 0, 0, 0, 0); 622 qxl_monitors_config_set(qdev, qcrtc->index, 0, 0, 0, 0, 0);