diff options
| author | Jin Li <jinl@codeaurora.org> | 2016-10-06 14:43:08 -0400 |
|---|---|---|
| committer | Yunyun Cao <yunyunc@codeaurora.org> | 2017-03-20 17:10:39 +0800 |
| commit | a12f96b0d2d11a89b68d6581acf759b10c36a68f (patch) | |
| tree | e5e77734f1f78a4cb132f38ff2f6372e14c815ca /drivers/gpu/drm/msm/dba_bridge.h | |
| parent | d6ca6477e2a6f0458e8e287844b532b7c0385066 (diff) | |
drm/sde: add bridge chip support for drm driver
Display Bridgechip Abstration layer is a common framework to support
different kind of bridge chips with multi client accessing. This
change is to add a DRM bridge driver and hook it up with DBA
framework.
Change-Id: Ie225a7cdb55a4982199c1735c37986950c5fad05
Signed-off-by: Jin Li <jinl@codeaurora.org>
Signed-off-by: Yunyun Cao <yunyunc@codeaurora.org>
Diffstat (limited to 'drivers/gpu/drm/msm/dba_bridge.h')
| -rw-r--r-- | drivers/gpu/drm/msm/dba_bridge.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/dba_bridge.h b/drivers/gpu/drm/msm/dba_bridge.h new file mode 100644 index 000000000000..42a43846c3c6 --- /dev/null +++ b/drivers/gpu/drm/msm/dba_bridge.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2016-2017, 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 + */ +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; +}; + +/** + * 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_ */ |
