Linux 4.9.243
[linux/fpc-iii.git] / drivers / gpu / drm / rcar-du / rcar_du_encoder.h
blob7fc10a9c34c3c0ee803d3ad95fb39c1f1f0a080f
1 /*
2 * rcar_du_encoder.h -- R-Car Display Unit 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_ENCODER_H__
15 #define __RCAR_DU_ENCODER_H__
17 #include <drm/drm_crtc.h>
19 struct rcar_du_device;
20 struct rcar_du_hdmienc;
21 struct rcar_du_lvdsenc;
23 enum rcar_du_encoder_type {
24 RCAR_DU_ENCODER_UNUSED = 0,
25 RCAR_DU_ENCODER_NONE,
26 RCAR_DU_ENCODER_VGA,
27 RCAR_DU_ENCODER_LVDS,
28 RCAR_DU_ENCODER_HDMI,
31 struct rcar_du_encoder {
32 struct drm_encoder base;
33 enum rcar_du_output output;
34 struct rcar_du_hdmienc *hdmi;
35 struct rcar_du_lvdsenc *lvds;
38 #define to_rcar_encoder(e) \
39 container_of(e, struct rcar_du_encoder, base)
41 #define rcar_encoder_to_drm_encoder(e) (&(e)->base)
43 struct rcar_du_connector {
44 struct drm_connector connector;
45 struct rcar_du_encoder *encoder;
48 #define to_rcar_connector(c) \
49 container_of(c, struct rcar_du_connector, connector)
51 int rcar_du_encoder_init(struct rcar_du_device *rcdu,
52 enum rcar_du_encoder_type type,
53 enum rcar_du_output output,
54 struct device_node *enc_node,
55 struct device_node *con_node);
57 #endif /* __RCAR_DU_ENCODER_H__ */