drm/ast: astdp: Wake up during connector status detection
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 17 Jul 2024 14:24:16 +0000 (16:24 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 30 Jul 2024 08:17:14 +0000 (10:17 +0200)
commit0ce91928ec62d189b5c51816e325f02587b53118
treef68b9c3999dd30b4da43d3d7caa7ce6e9dafa2c5
parent11dcda9b7a3407abe941092c87e7bc7e2da9e97b
drm/ast: astdp: Wake up during connector status detection

Power up the ASTDP connector for connection status detection if the
connector is not active. Keep it powered if a display is attached.

This fixes a bug where the connector does not come back after
disconnecting the display. The encoder's atomic_disable turns off
power on the physical connector. Further HPD reads will fail,
thus preventing the driver from detecting re-connected displays.

For connectors that are actively used, only test the HPD flag without
touching power.

Fixes: f81bb0ac7872 ("drm/ast: report connection status on Display Port.")
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v6.6+
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240717143319.104012-2-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_dp.c
drivers/gpu/drm/ast/ast_drv.h
drivers/gpu/drm/ast/ast_mode.c