1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * shmob_drm.h -- SH Mobile DRM driver
5 * Copyright (C) 2012 Renesas Electronics Corporation
10 #ifndef __SHMOB_DRM_DRV_H__
11 #define __SHMOB_DRM_DRV_H__
13 #include <linux/kernel.h>
14 #include <linux/platform_data/shmob_drm.h>
15 #include <linux/spinlock.h>
17 #include "shmob_drm_crtc.h"
23 struct shmob_drm_config {
24 enum shmob_drm_clk_source clk_source;
28 struct shmob_drm_device {
30 const struct shmob_drm_platform_data *pdata;
31 struct shmob_drm_config config;
38 spinlock_t irq_lock; /* Protects hardware LDINTR register */
40 struct drm_device ddev;
42 struct shmob_drm_crtc crtc;
43 struct drm_encoder encoder;
44 struct drm_connector *connector;
47 static inline struct shmob_drm_device *to_shmob_device(struct drm_device *dev)
49 return container_of(dev, struct shmob_drm_device, ddev);
52 #endif /* __SHMOB_DRM_DRV_H__ */