mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-08-09 06:14:34 +02:00
Handling of the HPD events in the MSM DP driver is plagued with lots of problems. It tries to work aside of the main DRM framework, handling the HPD signals on its own. There are two separate paths, one for the HPD signals coming from the DP HPD pin and another path for signals coming from outside (e.g. from the Type-C AltMode). It lies about the connected state, returning the link established state instead. It is not easy to understand or modify it. Having a separate event machine doesn't add extra clarity. Drop the whole event machine. When the DP receives a HPD event, send it to the DRM core. Then handle the events in the hpd_notify callback, unifying paths for HPD signals. Signed-off-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com> Tested-by: Val Packett <val@packett.cool> # x1e80100-dell-latitude-7455 Tested-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com> # Hamoa IOT EVK, QCS8300 Ride Co-developed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Patchwork: https://patchwork.freedesktop.org/patch/727616/ Link: https://lore.kernel.org/r/20260524-hpd-refactor-v6-7-cf3ab488dd7b@oss.qualcomm.com
49 lines
1.6 KiB
C
49 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _DP_CTRL_H_
|
|
#define _DP_CTRL_H_
|
|
|
|
#include "dp_aux.h"
|
|
#include "dp_panel.h"
|
|
#include "dp_link.h"
|
|
|
|
struct msm_dp_ctrl {
|
|
bool wide_bus_en;
|
|
};
|
|
|
|
struct phy;
|
|
|
|
int msm_dp_ctrl_on_link(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
int msm_dp_ctrl_on_stream(struct msm_dp_ctrl *msm_dp_ctrl, bool force_link_train);
|
|
void msm_dp_ctrl_off_link_stream(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
void msm_dp_ctrl_off(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
void msm_dp_ctrl_push_idle(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
irqreturn_t msm_dp_ctrl_isr(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
void msm_dp_ctrl_handle_sink_request(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
struct msm_dp_ctrl *msm_dp_ctrl_get(struct device *dev,
|
|
struct msm_dp_link *link,
|
|
struct msm_dp_panel *panel,
|
|
struct drm_dp_aux *aux,
|
|
struct phy *phy,
|
|
void __iomem *ahb_base,
|
|
void __iomem *link_base);
|
|
|
|
void msm_dp_ctrl_reset(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
void msm_dp_ctrl_phy_init(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
void msm_dp_ctrl_phy_exit(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
void msm_dp_ctrl_irq_phy_exit(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
|
|
void msm_dp_ctrl_set_psr(struct msm_dp_ctrl *msm_dp_ctrl, bool enable);
|
|
void msm_dp_ctrl_config_psr(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
|
|
int msm_dp_ctrl_core_clk_enable(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
void msm_dp_ctrl_core_clk_disable(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
|
|
void msm_dp_ctrl_enable_irq(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
void msm_dp_ctrl_disable_irq(struct msm_dp_ctrl *msm_dp_ctrl);
|
|
|
|
#endif /* _DP_CTRL_H_ */
|