2 * drivers/amlogic/drm/meson_crtc.h
4 * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 #ifndef __MESON_CRTC_H
19 #define __MESON_CRTC_H
21 #include <linux/kernel.h>
23 #include <drm/drm_plane.h>
24 #include <drm/drm_atomic.h>
25 #include <drm/drm_atomic_helper.h>
26 #include <linux/amlogic/media/vout/vout_notify.h>
27 #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT
28 #include <linux/amlogic/media/amvecm/amvecm.h>
32 #include "meson_vpu.h"
33 #include "meson_drv.h"
36 struct am_meson_crtc_state {
37 struct drm_crtc_state base;
40 struct am_meson_crtc {
43 struct drm_device *drm_dev;
45 struct meson_drm *priv;
47 struct drm_pending_vblank_event *event;
49 unsigned int vblank_irq;
50 spinlock_t vblank_irq_lock;/*atomic*/
53 struct dentry *crtc_debugfs_dir;
55 struct meson_vpu_pipeline *pipeline;
61 char osddump_path[64];
64 #define to_am_meson_crtc(x) container_of(x, \
65 struct am_meson_crtc, base)
66 #define to_am_meson_crtc_state(x) container_of(x, \
67 struct am_meson_crtc_state, base)
69 int am_meson_crtc_create(struct am_meson_crtc *amcrtc);