aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rcar-du
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/rcar-du
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/rcar-du')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_crtc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
index fbf4be316d0b..299267db2898 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
@@ -299,7 +299,7 @@ static void rcar_du_crtc_update_base(struct rcar_du_crtc *rcrtc)
299{ 299{
300 struct drm_crtc *crtc = &rcrtc->crtc; 300 struct drm_crtc *crtc = &rcrtc->crtc;
301 301
302 rcar_du_plane_compute_base(rcrtc->plane, crtc->fb); 302 rcar_du_plane_compute_base(rcrtc->plane, crtc->primary->fb);
303 rcar_du_plane_update_base(rcrtc->plane); 303 rcar_du_plane_update_base(rcrtc->plane);
304} 304}
305 305
@@ -358,10 +358,10 @@ static int rcar_du_crtc_mode_set(struct drm_crtc *crtc,
358 const struct rcar_du_format_info *format; 358 const struct rcar_du_format_info *format;
359 int ret; 359 int ret;
360 360
361 format = rcar_du_format_info(crtc->fb->pixel_format); 361 format = rcar_du_format_info(crtc->primary->fb->pixel_format);
362 if (format == NULL) { 362 if (format == NULL) {
363 dev_dbg(rcdu->dev, "mode_set: unsupported format %08x\n", 363 dev_dbg(rcdu->dev, "mode_set: unsupported format %08x\n",
364 crtc->fb->pixel_format); 364 crtc->primary->fb->pixel_format);
365 ret = -EINVAL; 365 ret = -EINVAL;
366 goto error; 366 goto error;
367 } 367 }
@@ -377,7 +377,7 @@ static int rcar_du_crtc_mode_set(struct drm_crtc *crtc,
377 rcrtc->plane->width = mode->hdisplay; 377 rcrtc->plane->width = mode->hdisplay;
378 rcrtc->plane->height = mode->vdisplay; 378 rcrtc->plane->height = mode->vdisplay;
379 379
380 rcar_du_plane_compute_base(rcrtc->plane, crtc->fb); 380 rcar_du_plane_compute_base(rcrtc->plane, crtc->primary->fb);
381 381
382 rcrtc->outputs = 0; 382 rcrtc->outputs = 0;
383 383
@@ -510,7 +510,7 @@ static int rcar_du_crtc_page_flip(struct drm_crtc *crtc,
510 } 510 }
511 spin_unlock_irqrestore(&dev->event_lock, flags); 511 spin_unlock_irqrestore(&dev->event_lock, flags);
512 512
513 crtc->fb = fb; 513 crtc->primary->fb = fb;
514 rcar_du_crtc_update_base(rcrtc); 514 rcar_du_crtc_update_base(rcrtc);
515 515
516 if (event) { 516 if (event) {