spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
}
+static int hibmc_crtc_enable_vblank(struct drm_crtc *crtc)
+{
+ struct hibmc_drm_private *priv = crtc->dev->dev_private;
+
+ writel(HIBMC_RAW_INTERRUPT_EN_VBLANK(1),
+ priv->mmio + HIBMC_RAW_INTERRUPT_EN);
+
+ return 0;
+}
+
+static void hibmc_crtc_disable_vblank(struct drm_crtc *crtc)
+{
+ struct hibmc_drm_private *priv = crtc->dev->dev_private;
+
+ writel(HIBMC_RAW_INTERRUPT_EN_VBLANK(0),
+ priv->mmio + HIBMC_RAW_INTERRUPT_EN);
+}
+
static const struct drm_crtc_funcs hibmc_crtc_funcs = {
.page_flip = drm_atomic_helper_page_flip,
.set_config = drm_atomic_helper_set_config,
.reset = drm_atomic_helper_crtc_reset,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
+ .enable_vblank = hibmc_crtc_enable_vblank,
+ .disable_vblank = hibmc_crtc_disable_vblank,
};
static const struct drm_crtc_helper_funcs hibmc_crtc_helper_funcs = {
.llseek = no_llseek,
};
-static int hibmc_enable_vblank(struct drm_device *dev, unsigned int pipe)
-{
- struct hibmc_drm_private *priv =
- (struct hibmc_drm_private *)dev->dev_private;
-
- writel(HIBMC_RAW_INTERRUPT_EN_VBLANK(1),
- priv->mmio + HIBMC_RAW_INTERRUPT_EN);
-
- return 0;
-}
-
-static void hibmc_disable_vblank(struct drm_device *dev, unsigned int pipe)
-{
- struct hibmc_drm_private *priv =
- (struct hibmc_drm_private *)dev->dev_private;
-
- writel(HIBMC_RAW_INTERRUPT_EN_VBLANK(0),
- priv->mmio + HIBMC_RAW_INTERRUPT_EN);
-}
-
irqreturn_t hibmc_drm_interrupt(int irq, void *arg)
{
struct drm_device *dev = (struct drm_device *)arg;
.desc = "hibmc drm driver",
.major = 1,
.minor = 0,
- .enable_vblank = hibmc_enable_vblank,
- .disable_vblank = hibmc_disable_vblank,
.gem_free_object_unlocked = hibmc_gem_free_object,
.dumb_create = hibmc_dumb_create,
.dumb_map_offset = hibmc_dumb_mmap_offset,