Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ee65d7c authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher
Browse files

drm/amd/display: Return hpd_irq_dpcd from hpd_rx handler

parent 3d696cbf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -914,7 +914,7 @@ static void handle_hpd_rx_irq(void *param)
	if (aconnector->dc_link->type != dc_connection_mst_branch)
		mutex_lock(&aconnector->hpd_lock);

	if (dc_link_handle_hpd_rx_irq(aconnector->dc_link) &&
	if (dc_link_handle_hpd_rx_irq(aconnector->dc_link, NULL) &&
			!is_mst_root_connector) {
		/* Downstream Port status changed. */
		if (dc_link_detect(aconnector->dc_link, false)) {
+4 −1
Original line number Diff line number Diff line
@@ -1924,7 +1924,7 @@ static void handle_automated_test(struct core_link *link)
			sizeof(test_response));
}

bool dc_link_handle_hpd_rx_irq(const struct dc_link *dc_link)
bool dc_link_handle_hpd_rx_irq(const struct dc_link *dc_link, union hpd_irq_data *out_hpd_irq_dpcd_data)
{
	struct core_link *link = DC_LINK_TO_LINK(dc_link);
	union hpd_irq_data hpd_irq_dpcd_data = {{{{0}}}};
@@ -1939,12 +1939,15 @@ bool dc_link_handle_hpd_rx_irq(const struct dc_link *dc_link)
		"%s: Got short pulse HPD on link %d\n",
		__func__, link->public.link_index);


	 /* All the "handle_hpd_irq_xxx()" methods
		 * should be called only after
		 * dal_dpsst_ls_read_hpd_irq_data
		 * Order of calls is important too
		 */
	result = read_hpd_rx_irq_data(link, &hpd_irq_dpcd_data);
	if (out_hpd_irq_dpcd_data)
		*out_hpd_irq_dpcd_data = hpd_irq_dpcd_data;

	if (result != DC_OK) {
		dm_logger_write(link->ctx->logger, LOG_HW_HPD_IRQ,
+2 −1
Original line number Diff line number Diff line
@@ -755,7 +755,8 @@ bool dc_link_detect(const struct dc_link *dc_link, bool boot);
 * detection.
 * false - no change in Downstream port status. No further action required
 * from DM. */
bool dc_link_handle_hpd_rx_irq(const struct dc_link *dc_link);
bool dc_link_handle_hpd_rx_irq(const struct dc_link *dc_link,
		union hpd_irq_data *hpd_irq_dpcd_data);

struct dc_sink_init_data;