From: Andre Eikmeyer <[email protected]> When GMUX routes the internal panel to the integrated GPU, the eDP link of the AMD GPU has no sink. It still exposed panel_power_savings, and tuned writes it on every switch between AC and battery. Each write sends a hotplug event and the following connector probe runtime resumes the GPU that GMUX had powered off. Only create the attribute when the link has a panel.
Signed-off-by: Atharva Tiwari <[email protected]> Signed-off-by: Andre Eikmeyer <[email protected]> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_backlight.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_backlight.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_backlight.c index 703d0617d..c8fbd2167 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_backlight.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_backlight.c @@ -761,6 +761,9 @@ amdgpu_dm_should_create_sysfs(struct amdgpu_dm_connector *amdgpu_dm_connector) if (amdgpu_dm_connector->base.connector_type != DRM_MODE_CONNECTOR_eDP) return false; + if (!amdgpu_dm_connector->dc_link->edp_sink_present) + return false; + if (link->panel_type != PANEL_TYPE_LCD && !link->panel_config.cacp.cacp_supported) return false; -- 2.55.0
