mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-02 07:43:34 +00:00
The DisplayPort controller's hot-plug mechanism is based on pinmuxing a physical signal on a GPIO pin into the controller. This is not always possible, either because there aren't dedicated GPIOs available or because the hot-plug signal is a virtual notification, in cases such as USB Type-C. For these cases, by implementing the hpd_notify() callback for the DisplayPort controller's drm_bridge, a downstream drm_bridge (next_bridge) can be used to track and signal the connection status changes. This makes it possible to use downstream drm_bridges such as display-connector or any virtual mechanism, as long as they are implemented as a drm_bridge. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> [bjorn: Drop connector->fwnode assignment and dev from struct msm_dp] Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com> Patchwork: https://patchwork.freedesktop.org/patch/514410/ Link: https://lore.kernel.org/r/20221207220012.16529-10-quic_bjorande@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
41 lines
1.3 KiB
C
41 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _DP_DRM_H_
|
|
#define _DP_DRM_H_
|
|
|
|
#include <linux/types.h>
|
|
#include <drm/drm_bridge.h>
|
|
|
|
#include "msm_drv.h"
|
|
#include "dp_display.h"
|
|
|
|
struct msm_dp_bridge {
|
|
struct drm_bridge bridge;
|
|
struct msm_dp *dp_display;
|
|
};
|
|
|
|
#define to_dp_bridge(x) container_of((x), struct msm_dp_bridge, bridge)
|
|
|
|
struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display, struct drm_encoder *encoder);
|
|
struct drm_bridge *dp_bridge_init(struct msm_dp *dp_display, struct drm_device *dev,
|
|
struct drm_encoder *encoder);
|
|
|
|
void dp_bridge_enable(struct drm_bridge *drm_bridge);
|
|
void dp_bridge_disable(struct drm_bridge *drm_bridge);
|
|
void dp_bridge_post_disable(struct drm_bridge *drm_bridge);
|
|
enum drm_mode_status dp_bridge_mode_valid(struct drm_bridge *bridge,
|
|
const struct drm_display_info *info,
|
|
const struct drm_display_mode *mode);
|
|
void dp_bridge_mode_set(struct drm_bridge *drm_bridge,
|
|
const struct drm_display_mode *mode,
|
|
const struct drm_display_mode *adjusted_mode);
|
|
void dp_bridge_hpd_enable(struct drm_bridge *bridge);
|
|
void dp_bridge_hpd_disable(struct drm_bridge *bridge);
|
|
void dp_bridge_hpd_notify(struct drm_bridge *bridge,
|
|
enum drm_connector_status status);
|
|
|
|
#endif /* _DP_DRM_H_ */
|