[Bug 203905] amdgpu:actual_brightness has unreal/wrong value
bugzilla-daemon at bugzilla.kernel.org
bugzilla-daemon at bugzilla.kernel.org
Thu Sep 26 21:07:32 UTC 2019
https://bugzilla.kernel.org/show_bug.cgi?id=203905
--- Comment #3 from Lukáš Krejčí (lskrejci at gmail.com) ---
Commit 262485a50fd4 ("drm/amd/display: Expand dc to use 16.16 bit backlight")
changed the value that is returned for `actual_brightness`:
-static unsigned int dce_abm_get_current_backlight_8_bit(struct abm *abm)
+static unsigned int dce_abm_get_current_backlight(struct abm *abm)
{
struct dce_abm *abm_dce = TO_DCE_ABM(abm);
unsigned int backlight = REG_READ(BL1_PWM_CURRENT_ABM_LEVEL);
- return (backlight >> 8);
+ /* return backlight in hardware format which is unsigned 17 bits, with
+ * 1 bit integer and 16 bit fractional
+ */
+ return backlight;
}
I could not find anything official about the range of `actual_brightness`, only
the following blog says that is has to be in range of `brightness`:
https://nikula.org/~jani/backlight/#index3h3
I guess amdgpu_dm_backlight_get_brightness() could be changed to bring the
`actual_brightness` value in range of `brightness` again since it returns the
value of `brightness` in the error path anyway.
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the dri-devel
mailing list