1
0
Fork 0
alistair23-linux/drivers/gpu/drm/i915/display
Jani Nikula 425faacff2 drm/i915/backlight: fix CPU mode backlight takeover on LPT
[ Upstream commit bb83d5fb55 ]

The pch_get_backlight(), lpt_get_backlight(), and lpt_set_backlight()
functions operate directly on the hardware registers. If inverting the
value is needed, using intel_panel_compute_brightness(), it should only
be done in the interface between hardware registers and
panel->backlight.level.

The CPU mode takeover code added in commit 5b1ec9ac7a
("drm/i915/backlight: Fix backlight takeover on LPT, v3.") reads the
hardware register and converts to panel->backlight.level correctly,
however the value written back should remain in the hardware register
"domain".

This hasn't been an issue, because GM45 machines are the only known
users of i915.invert_brightness and the brightness invert quirk, and
without one of them no conversion is made. It's likely nobody's ever hit
the problem.

Fixes: 5b1ec9ac7a ("drm/i915/backlight: Fix backlight takeover on LPT, v3.")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: <stable@vger.kernel.org> # v5.1+
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210108152841.6944-1-jani.nikula@intel.com
(cherry picked from commit 0d4ced1c5b)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-19 18:26:13 +01:00
..
Makefile drm/i915: use upstream version of header tests 2019-07-30 12:11:57 +03:00
dvo_ch7xxx.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
dvo_ch7017.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
dvo_ivch.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
dvo_ns2501.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
dvo_sil164.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
dvo_tfp410.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
icl_dsi.c drm/i915: Wrappers for display register waits 2019-08-16 22:19:05 +01:00
intel_acpi.c
intel_acpi.h
intel_atomic.c drm/i915: Preload LUTs if the hw isn't currently using them 2019-11-18 09:20:27 -08:00
intel_atomic.h
intel_atomic_plane.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_atomic_plane.h drm/i915: Pass intel state to plane functions as well 2019-07-01 10:32:45 +02:00
intel_audio.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_audio.h
intel_bios.c drm/i915: Favor last VBT child device with conflicting AUX ch/DDC pin 2019-10-16 10:56:50 -07:00
intel_bios.h drm/i915: Propagate "_remove" function name suffix down 2019-07-12 13:05:08 +01:00
intel_bw.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_bw.h drm/i915/bw: make intel_atomic_get_bw_state() static 2019-08-07 12:01:46 +03:00
intel_cdclk.c drm/i915: Wrappers for display register waits 2019-08-16 22:19:05 +01:00
intel_cdclk.h
intel_color.c drm/i915: Preload LUTs if the hw isn't currently using them 2019-11-18 09:20:27 -08:00
intel_color.h
intel_combo_phy.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_combo_phy.h drm/i915/gen11: Convert combo PHY logic to use new 'enum phy' namespace 2019-07-10 18:22:34 -07:00
intel_connector.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_connector.h
intel_crt.c drm/i915: Avoid HPD poll detect triggering a new detect cycle 2019-11-04 13:24:11 -08:00
intel_crt.h
intel_ddi.c drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode 2020-04-17 10:50:25 +02:00
intel_ddi.h
intel_display.c drm/i915: Handle max_bpc==16 2020-11-24 13:29:23 +01:00
intel_display.h drm/i915/dp: Fix dsc bpp calculations, v5. 2019-10-02 22:20:22 -07:00
intel_display_power.c drm/i915: Program MBUS with rmw during initialization 2020-03-12 13:00:27 +01:00
intel_display_power.h drm/i915: Move i915_power_well_id out of i915_reg.h 2019-08-16 21:52:47 +01:00
intel_display_types.h drm/i915: Preload LUTs if the hw isn't currently using them 2019-11-18 09:20:27 -08:00
intel_dp.c drm/i915/display/dp: Compute the correct slice count for VDSC on DP 2020-12-16 10:56:58 +01:00
intel_dp.h drm/i915/dp: Fix dsc bpp calculations, v5. 2019-10-02 22:20:22 -07:00
intel_dp_aux_backlight.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_dp_aux_backlight.h
intel_dp_link_training.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_dp_link_training.h
intel_dp_mst.c drm/i915: fix port checks for MST support on gen >= 11 2020-06-07 13:18:48 +02:00
intel_dp_mst.h drm/i915/mst: un-inline intel_dp_mst_encoder_active_links() 2019-08-07 12:01:51 +03:00
intel_dpio_phy.c drm/i915: Wrappers for display register waits 2019-08-16 22:19:05 +01:00
intel_dpio_phy.h
intel_dpll_mgr.c drm/i915: Fix PCH reference clock for FDI on HSW/BDW 2019-10-29 21:50:24 -07:00
intel_dpll_mgr.h drm/i915/tgl: Fix doc not corresponding to code 2019-10-29 15:33:12 -07:00
intel_dsi.c
intel_dsi.h drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_dsi_dcs_backlight.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_dsi_dcs_backlight.h
intel_dsi_vbt.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_dvo.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_dvo.h
intel_dvo_dev.h
intel_fbc.c Make the "Reducing compressed framebufer size" message be DRM_INFO_ONCE() 2020-05-20 08:20:32 +02:00
intel_fbc.h
intel_fbdev.c drm/i915/fbdev: Restore physical addresses for fb_mmap() 2019-11-21 00:09:22 -08:00
intel_fbdev.h
intel_fifo_underrun.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_fifo_underrun.h
intel_frontbuffer.c drm/i915: Extract intel_frontbuffer active tracking 2019-08-16 09:51:11 +01:00
intel_frontbuffer.h drm/i915: Extract intel_frontbuffer active tracking 2019-08-16 09:51:11 +01:00
intel_gmbus.c drm/i915/gen11: Allow usage of all GPIO pins 2019-08-19 07:51:12 -07:00
intel_gmbus.h drm/i915: Move gmbus definitions out of i915_reg.h 2019-08-16 21:52:49 +01:00
intel_hdcp.c Merge drm/drm-next into drm-intel-next-queued 2019-08-22 00:10:36 -07:00
intel_hdcp.h drm/i915: Attach content type property 2019-08-06 13:15:41 +05:30
intel_hdmi.c drm/i915: Avoid HPD poll detect triggering a new detect cycle 2019-11-04 13:24:11 -08:00
intel_hdmi.h
intel_hotplug.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_hotplug.h drm/i915: Add support for retrying hotplug 2019-07-15 12:13:34 -07:00
intel_lpe_audio.c
intel_lpe_audio.h
intel_lspcon.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_lspcon.h
intel_lvds.c drm/i915: Wrappers for display register waits 2019-08-16 22:19:05 +01:00
intel_lvds.h
intel_opregion.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_opregion.h
intel_overlay.c drm/i915: Replace i915_vma_put_fence() 2019-08-22 08:53:42 +01:00
intel_overlay.h
intel_panel.c drm/i915/backlight: fix CPU mode backlight takeover on LPT 2021-01-19 18:26:13 +01:00
intel_panel.h
intel_pipe_crc.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_pipe_crc.h
intel_psr.c drm/i915: Wrappers for display register waits 2019-08-16 22:19:05 +01:00
intel_psr.h
intel_quirks.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_quirks.h
intel_sdvo.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_sdvo.h
intel_sdvo_regs.h
intel_sprite.c drm/i915: Fix g4x sprite scaling stride check with GTT remapping 2019-10-02 22:20:33 -07:00
intel_sprite.h drm/i915/sprite: un-inline icl_is_hdr_plane() 2019-08-07 12:01:35 +03:00
intel_tc.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_tc.h drm/i915/tc: un-inline intel_tc_port_ref_held() 2019-08-07 12:02:02 +03:00
intel_tv.c drm/i915: rename intel_drv.h to display/intel_display_types.h 2019-08-07 12:43:50 +03:00
intel_tv.h
intel_vbt_defs.h drm/i915/gen11: Allow usage of all GPIO pins 2019-08-19 07:51:12 -07:00
intel_vdsc.c drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
intel_vdsc.h
vlv_dsi.c drm/i915: Wrappers for display register waits 2019-08-16 22:19:05 +01:00
vlv_dsi_pll.c drm/i915: Wrappers for display register waits 2019-08-16 22:19:05 +01:00