Skip to content

Instantly share code, notes, and snippets.

@satmandu
Last active May 29, 2021 14:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save satmandu/d6c2192f66cd14525049fd34d356d71d to your computer and use it in GitHub Desktop.
Save satmandu/d6c2192f66cd14525049fd34d356d71d to your computer and use it in GitHub Desktop.
Patch to make backlight work for nocturne/Pixel Slate (and maybe also eve) with linux kernel 5.12
diff -Npaur a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c
--- a/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c 2021-05-07 18:57:14.612178675 -0400
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux_backlight.c 2021-05-07 18:58:15.107279925 -0400
@@ -593,7 +593,6 @@ intel_dp_aux_supports_vesa_backlight(str
* work just fine using normal PWM controls anyway.
*/
if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP &&
- (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) &&
(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP)) {
drm_dbg_kms(&i915->drm, "AUX Backlight Control Supported!\n");
return true;
@satmandu
Copy link
Author

Rationale: DPCD Backlight check wants PWM enabled, but PWM is not connected on nocturne or eve. The solution is to change that check, as mentioned here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment