struct drm_device *dev = crtc->dev;
struct tilcdc_drm_private *priv = dev->dev_private;
- pm_runtime_get_sync(dev->dev);
tilcdc_write(dev, base_reg[n], tilcdc_crtc->start);
tilcdc_write(dev, ceil_reg[n], tilcdc_crtc->end);
if (tilcdc_crtc->scanout[n]) {
tilcdc_crtc->scanout[n] = crtc->primary->fb;
drm_framebuffer_reference(tilcdc_crtc->scanout[n]);
tilcdc_crtc->dirty &= ~stat[n];
- pm_runtime_put_sync(dev->dev);
}
static void update_scanout(struct drm_crtc *crtc)
crtc->primary->fb = fb;
tilcdc_crtc->event = event;
+
+ pm_runtime_get_sync(dev->dev);
+
update_scanout(crtc);
+ pm_runtime_put_sync(dev->dev);
+
return 0;
}
tilcdc_crtc->dpms = mode;
- pm_runtime_get_sync(dev->dev);
-
if (mode == DRM_MODE_DPMS_ON) {
- pm_runtime_forbid(dev->dev);
+ pm_runtime_get_sync(dev->dev);
start(crtc);
} else {
tilcdc_crtc->frame_done = false;
if (ret == 0)
dev_err(dev->dev, "timeout waiting for framedone\n");
}
- pm_runtime_allow(dev->dev);
- }
- pm_runtime_put_sync(dev->dev);
+ pm_runtime_put_sync(dev->dev);
+ }
}
static bool tilcdc_crtc_mode_fixup(struct drm_crtc *crtc,
static int tilcdc_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
struct drm_framebuffer *old_fb)
{
+ struct drm_device *dev = crtc->dev;
int r;
r = tilcdc_verify_fb(crtc, crtc->primary->fb);
if (r)
return r;
+ pm_runtime_get_sync(dev->dev);
update_scanout(crtc);
+ pm_runtime_put_sync(dev->dev);
return 0;
}