Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / drivers / gpu / drm / rcar-du / rcar_du_lvdsenc.h
blob7218ac89333e7b4c168230f0178950e7d44d750e
1 /*
2 * rcar_du_lvdsenc.h -- R-Car Display Unit LVDS Encoder
4 * Copyright (C) 2013-2014 Renesas Electronics Corporation
6 * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
14 #ifndef __RCAR_DU_LVDSENC_H__
15 #define __RCAR_DU_LVDSENC_H__
17 #include <linux/io.h>
18 #include <linux/module.h>
20 struct rcar_drm_crtc;
21 struct rcar_du_lvdsenc;
23 enum rcar_lvds_input {
24 RCAR_LVDS_INPUT_DU0,
25 RCAR_LVDS_INPUT_DU1,
26 RCAR_LVDS_INPUT_DU2,
29 /* Keep in sync with the LVDCR0.LVMD hardware register values. */
30 enum rcar_lvds_mode {
31 RCAR_LVDS_MODE_JEIDA = 0,
32 RCAR_LVDS_MODE_MIRROR = 1,
33 RCAR_LVDS_MODE_VESA = 4,
36 #if IS_ENABLED(CONFIG_DRM_RCAR_LVDS)
37 int rcar_du_lvdsenc_init(struct rcar_du_device *rcdu);
38 void rcar_du_lvdsenc_set_mode(struct rcar_du_lvdsenc *lvds,
39 enum rcar_lvds_mode mode);
40 int rcar_du_lvdsenc_enable(struct rcar_du_lvdsenc *lvds,
41 struct drm_crtc *crtc, bool enable);
42 void rcar_du_lvdsenc_atomic_check(struct rcar_du_lvdsenc *lvds,
43 struct drm_display_mode *mode);
44 #else
45 static inline int rcar_du_lvdsenc_init(struct rcar_du_device *rcdu)
47 return 0;
49 static inline void rcar_du_lvdsenc_set_mode(struct rcar_du_lvdsenc *lvds,
50 enum rcar_lvds_mode mode)
53 static inline int rcar_du_lvdsenc_enable(struct rcar_du_lvdsenc *lvds,
54 struct drm_crtc *crtc, bool enable)
56 return 0;
58 static inline void rcar_du_lvdsenc_atomic_check(struct rcar_du_lvdsenc *lvds,
59 struct drm_display_mode *mode)
62 #endif
64 #endif /* __RCAR_DU_LVDSENC_H__ */