Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] drm/amd/display: KUnit test failures in amdgpu_dm_should_create_sysfs() --
commit 7217c1895d0e9a0b0a4343bbfd37bba3770b7920 Author: Andre Eikmeyer <[email protected]> drm/amd/display: Skip panel power savings on eDP links without a panel This commit updates amdgpu_dm_should_create_sysfs() to return false when dc_link->edp_sink_present is false, preventing creation of the panel_power_savings sysfs attribute on eDP links without an attached panel. > 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 703d0617df6d4..c8fbd2167b6b2 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; [Severity: Medium] Does this break the existing KUnit tests for amdgpu_dm_should_create_sysfs() in drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_backlight_test.c? In setup_test_connector(), fixture->link is zero-allocated with kunit_kzalloc(), leaving edp_sink_present set to false: fixture->link = kunit_kzalloc(test, sizeof(*fixture->link), GFP_KERNEL); ... fixture->aconnector->bl_idx = bl_idx; fixture->aconnector->dc_link = fixture->link; fixture->aconnector->base.dev = &fixture->adev->ddev; fixture->link->connector_signal = signal; Because edp_sink_present is never initialized to true in setup_test_connector() or in the test cases, amdgpu_dm_should_create_sysfs() now returns false unconditionally in: - dm_test_should_create_sysfs_no_backlight_index() - dm_test_should_create_sysfs_oled_cacp() - dm_test_should_create_sysfs_lcd_panel() causing their KUNIT_EXPECT_TRUE() assertions to fail, while dm_test_should_create_sysfs_oled_no_cacp() returns early at the edp_sink_present check before testing the panel_type and cacp_supported condition. Should setup_test_connector() or those KUnit tests be updated to set edp_sink_present = true? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=13
