summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/dba_bridge.h
blob: edc130f92257f5026669740228b7826af87dc0db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef _DBA_BRIDGE_H_
#define _DBA_BRIDGE_H_

#include <linux/types.h>
#include <drm/drmP.h>
#include <drm/drm_crtc.h>
#include <drm/drm_crtc_helper.h>

#include "msm_drv.h"

/**
 * struct dba_bridge_init - Init parameters for DBA bridge
 * @client_name:          Client's name who calls the init
 * @chip_name:            Bridge chip name
 * @id:                   Bridge driver index
 * @display:              Private display handle
 * @hdmi_mode:            HDMI or DVI mode for the sink
 * @num_of_input_lanes:   Number of input lanes in case of DSI/LVDS
 * @precede_bridge:       Precede bridge chip
 * @pluggable:            If it's pluggable
 * @panel_count:          Number of panels attached to this display
 */
struct dba_bridge_init {
	const char *client_name;
	const char *chip_name;
	u32 id;
	void *display;
	bool hdmi_mode;
	u32 num_of_input_lanes;
	struct drm_bridge *precede_bridge;
	bool pluggable;
	u32 panel_count;
	bool cont_splash_enabled;
};

/**
 * dba_bridge_init - Initialize the DBA bridge
 * @dev:           Pointer to drm device handle
 * @encoder:       Pointer to drm encoder handle
 * @data:          Pointer to init data
 * Returns: pointer of struct drm_bridge
 */
struct drm_bridge *dba_bridge_init(struct drm_device *dev,
				struct drm_encoder *encoder,
				struct dba_bridge_init *data);

/**
 * dba_bridge_cleanup - Clean up the DBA bridge
 * @bridge:           Pointer to DBA bridge handle
 * Returns: void
 */
void dba_bridge_cleanup(struct drm_bridge *bridge);

#endif /* _DBA_BRIDGE_H_ */