mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
drm/amd/display: Make GPIO HPD path conditional
[Why] Avoid unnecessary GPIO configuration attempts on dcn that doesn't support it. [How] Conditionally use GPIO HPD detection or rely on hw encoder path. Reviewed-by: Charlene Liu <charlene.liu@amd.com> Signed-off-by: Roman Li <Roman.Li@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
318917e1d8
commit
4bff89bad9
|
|
@ -564,9 +564,11 @@ static bool construct_phy(struct dc_link *link,
|
|||
enc_init_data.analog_engine = find_analog_engine(link, &enc_init_data.analog_encoder);
|
||||
enc_init_data.encoder = link_encoder;
|
||||
enc_init_data.analog_engine = link_analog_engine;
|
||||
enc_init_data.hpd_gpio = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
|
||||
link->ctx->gpio_service);
|
||||
|
||||
if (link->ctx->dce_version <= DCN_VERSION_4_01)
|
||||
enc_init_data.hpd_gpio = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
|
||||
link->ctx->gpio_service);
|
||||
else
|
||||
enc_init_data.hpd_gpio = NULL;
|
||||
if (enc_init_data.hpd_gpio) {
|
||||
dal_gpio_open(enc_init_data.hpd_gpio, GPIO_MODE_INTERRUPT);
|
||||
dal_gpio_unlock_pin(enc_init_data.hpd_gpio);
|
||||
|
|
|
|||
|
|
@ -136,8 +136,13 @@ enum hpd_source_id get_hpd_line(struct dc_link *link)
|
|||
|
||||
hpd_id = HPD_SOURCEID_UNKNOWN;
|
||||
|
||||
hpd = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
|
||||
link->ctx->gpio_service);
|
||||
/* Use GPIO path where supported, otherwise use hardware encoder path */
|
||||
if (link->ctx && link->ctx->dce_version <= DCN_VERSION_4_01) {
|
||||
hpd = link_get_hpd_gpio(link->ctx->dc_bios, link->link_id,
|
||||
link->ctx->gpio_service);
|
||||
} else {
|
||||
hpd = NULL;
|
||||
}
|
||||
|
||||
if (hpd) {
|
||||
switch (dal_irq_get_source(hpd)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user