| /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
| /* |
| * Copyright (c) 2019 Amlogic, Inc. All rights reserved. |
| */ |
| |
| #ifndef __MESON_CRTC_H |
| #define __MESON_CRTC_H |
| |
| #include <linux/kernel.h> |
| #include <drm/drmP.h> |
| #include <drm/drm_plane.h> |
| #include <drm/drm_atomic.h> |
| #include <drm/drm_atomic_helper.h> |
| #include <linux/amlogic/media/vout/vout_notify.h> |
| #ifdef CONFIG_AMLOGIC_MEDIA_ENHANCEMENT |
| #include <linux/amlogic/media/amvecm/amvecm.h> |
| #endif |
| #include "osd.h" |
| #include "osd_drm.h" |
| #include "meson_vpu.h" |
| #include "meson_drv.h" |
| #include "meson_fb.h" |
| |
| struct am_meson_crtc_state { |
| struct drm_crtc_state base; |
| }; |
| |
| struct am_meson_crtc { |
| struct drm_crtc base; |
| struct device *dev; |
| struct drm_device *drm_dev; |
| |
| struct meson_drm *priv; |
| |
| struct drm_pending_vblank_event *event; |
| |
| unsigned int vblank_irq; |
| spinlock_t vblank_irq_lock;/*atomic*/ |
| u32 vblank_enable; |
| |
| struct dentry *crtc_debugfs_dir; |
| |
| struct meson_vpu_pipeline *pipeline; |
| }; |
| |
| #define to_am_meson_crtc(x) container_of(x, \ |
| struct am_meson_crtc, base) |
| #define to_am_meson_crtc_state(x) container_of(x, \ |
| struct am_meson_crtc_state, base) |
| |
| int am_meson_crtc_create(struct am_meson_crtc *amcrtc); |
| |
| #endif |