aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tilcdc
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/tilcdc
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/tilcdc')
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_crtc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index d36efc13b16f..d642d4a02134 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -74,7 +74,7 @@ static void set_scanout(struct drm_crtc *crtc, int n)
74 drm_flip_work_queue(&tilcdc_crtc->unref_work, tilcdc_crtc->scanout[n]); 74 drm_flip_work_queue(&tilcdc_crtc->unref_work, tilcdc_crtc->scanout[n]);
75 drm_flip_work_commit(&tilcdc_crtc->unref_work, priv->wq); 75 drm_flip_work_commit(&tilcdc_crtc->unref_work, priv->wq);
76 } 76 }
77 tilcdc_crtc->scanout[n] = crtc->fb; 77 tilcdc_crtc->scanout[n] = crtc->primary->fb;
78 drm_framebuffer_reference(tilcdc_crtc->scanout[n]); 78 drm_framebuffer_reference(tilcdc_crtc->scanout[n]);
79 tilcdc_crtc->dirty &= ~stat[n]; 79 tilcdc_crtc->dirty &= ~stat[n];
80 pm_runtime_put_sync(dev->dev); 80 pm_runtime_put_sync(dev->dev);
@@ -84,7 +84,7 @@ static void update_scanout(struct drm_crtc *crtc)
84{ 84{
85 struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc); 85 struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
86 struct drm_device *dev = crtc->dev; 86 struct drm_device *dev = crtc->dev;
87 struct drm_framebuffer *fb = crtc->fb; 87 struct drm_framebuffer *fb = crtc->primary->fb;
88 struct drm_gem_cma_object *gem; 88 struct drm_gem_cma_object *gem;
89 unsigned int depth, bpp; 89 unsigned int depth, bpp;
90 90
@@ -159,7 +159,7 @@ static int tilcdc_crtc_page_flip(struct drm_crtc *crtc,
159 return -EBUSY; 159 return -EBUSY;
160 } 160 }
161 161
162 crtc->fb = fb; 162 crtc->primary->fb = fb;
163 tilcdc_crtc->event = event; 163 tilcdc_crtc->event = event;
164 update_scanout(crtc); 164 update_scanout(crtc);
165 165
@@ -339,7 +339,7 @@ static int tilcdc_crtc_mode_set(struct drm_crtc *crtc,
339 if (priv->rev == 2) { 339 if (priv->rev == 2) {
340 unsigned int depth, bpp; 340 unsigned int depth, bpp;
341 341
342 drm_fb_get_bpp_depth(crtc->fb->pixel_format, &depth, &bpp); 342 drm_fb_get_bpp_depth(crtc->primary->fb->pixel_format, &depth, &bpp);
343 switch (bpp) { 343 switch (bpp) {
344 case 16: 344 case 16:
345 break; 345 break;