Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: refactor HPD to increase flexibility

Currently all dcn revisions have to follow the same codepath for
hotplug detection. This change allows per dcn hpd handling consolidating
hpd code in link_encoder.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Signed-off-by: Roman Li <roman.li@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Dmytro Laktyushkin and committed by
Alex Deucher
def3488e 6afc422e

+316 -273
-1
drivers/gpu/drm/amd/display/dc/dc.h
··· 1708 1708 struct dc_link_status link_status; 1709 1709 struct dprx_states dprx_states; 1710 1710 1711 - struct gpio *hpd_gpio; 1712 1711 enum dc_link_fec_state fec_state; 1713 1712 bool is_dds; 1714 1713 bool is_display_mux_present;
+1 -21
drivers/gpu/drm/amd/display/dc/hwss/dce110/dce110_hwseq.c
··· 728 728 { 729 729 struct dc_context *ctx = link->ctx; 730 730 struct graphics_object_id connector = link->link_enc->connector; 731 - struct gpio *hpd; 732 731 bool edp_hpd_high = false; 733 732 uint32_t time_elapsed = 0; 734 733 uint32_t timeout = power_up ? ··· 751 752 * we need to wait until SENSE bit is high/low. 752 753 */ 753 754 754 - /* obtain HPD */ 755 - /* TODO what to do with this? */ 756 - hpd = ctx->dc->link_srv->get_hpd_gpio(ctx->dc_bios, connector, ctx->gpio_service); 757 - 758 - if (!hpd) { 759 - BREAK_TO_DEBUGGER(); 760 - return; 761 - } 762 - 763 755 if (link->panel_config.pps.extra_t3_ms > 0) { 764 756 int extra_t3_in_ms = link->panel_config.pps.extra_t3_ms; 765 757 766 758 msleep(extra_t3_in_ms); 767 759 } 768 760 769 - dal_gpio_open(hpd, GPIO_MODE_INTERRUPT); 770 - 771 761 /* wait until timeout or panel detected */ 772 762 773 763 do { 774 - uint32_t detected = 0; 775 - 776 - dal_gpio_get_value(hpd, &detected); 777 - 778 - if (!(detected ^ power_up)) { 764 + if (!(link->dc->link_srv->get_hpd_state(link) ^ power_up)) { 779 765 edp_hpd_high = true; 780 766 break; 781 767 } ··· 769 785 770 786 time_elapsed += HPD_CHECK_INTERVAL; 771 787 } while (time_elapsed < timeout); 772 - 773 - dal_gpio_close(hpd); 774 - 775 - dal_gpio_destroy_irq(&hpd); 776 788 777 789 /* ensure that the panel is detected */ 778 790 if (!edp_hpd_high)
+4 -1
drivers/gpu/drm/amd/display/dc/resource/dcn32/dcn32_resource.h
··· 317 317 AUX_REG_LIST_RI(id), SRI_ARR(AUX_DPHY_TX_CONTROL, DP_AUX, id) 318 318 319 319 /* HDP */ 320 - #define HPD_REG_LIST_RI(id) SRI_ARR(DC_HPD_CONTROL, HPD, id) 320 + #define HPD_REG_LIST_RI(id) \ 321 + (SRI_ARR(DC_HPD_CONTROL, HPD, id), \ 322 + SRI_ARR(DC_HPD_INT_STATUS, HPD, id), \ 323 + SRI_ARR(DC_HPD_TOGGLE_FILT_CNTL, HPD, id)) 321 324 322 325 /* Link encoder */ 323 326 #define LE_DCN3_REG_LIST_RI(id) \