OrangePi_CM5/drivers/gpu/drm/i915/display
Jani Nikula b84857c06e drm/i915/opregion: check port number bounds for SWSCI display power state
commit 24a644ebbfd3b13cda702f98907f9dd123e34bf9 upstream.

The mapping from enum port to whatever port numbering scheme is used by
the SWSCI Display Power State Notification is odd, and the memory of it
has faded. In any case, the parameter only has space for ports numbered
[0..4], and UBSAN reports bit shift beyond it when the platform has port
F or more.

Since the SWSCI functionality is supposed to be obsolete for new
platforms (i.e. ones that might have port F or more), just bail out
early if the mapped and mangled port number is beyond what the Display
Power State Notification can support.

Fixes: 9c4b0a6831 ("drm/i915: add opregion function to notify bios of encoder enable/disable")
Cc: <stable@vger.kernel.org> # v3.13+
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4800
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/cc363f42d6b5a5932b6d218fefcc8bdfb15dbbe5.1644489329.git.jani.nikula@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-04-08 14:39:58 +02:00
..
dvo_ch7xxx.c
…
dvo_ch7017.c
…
dvo_ivch.c
…
dvo_ns2501.c
…
dvo_sil164.c
…
dvo_tfp410.c
…
icl_dsi.c drm/i915/icl: Fix initing the DSI DSC power refcount during HW readout 2021-01-19 18:27:32 +01:00
intel_acpi.c drm/i915: Fix invalid access to ACPI _DSM objects 2021-04-14 08:41:58 +02:00
intel_acpi.h
…
intel_atomic.c drm/i915: Remove the old global state stuff 2020-09-17 20:08:08 +03:00
intel_atomic.h drm/i915: Remove the old global state stuff 2020-09-17 20:08:08 +03:00
intel_atomic_plane.c
…
intel_atomic_plane.h
…
intel_audio.c drm/i915: Nuke force_min_cdclk_changed 2020-09-17 20:10:21 +03:00
intel_audio.h
…
intel_bios.c drm/i915: Add VBT AUX CH H and I 2020-09-15 17:47:55 +03:00
intel_bios.h
…
intel_bw.c
…
intel_bw.h
…
intel_cdclk.c drm/i915: Nuke force_min_cdclk_changed 2020-09-17 20:10:21 +03:00
intel_cdclk.h drm/i915: Nuke force_min_cdclk_changed 2020-09-17 20:10:21 +03:00
intel_color.c
…
intel_color.h
…
intel_combo_phy.c drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state 2020-09-02 10:48:09 +03:00
intel_combo_phy.h
…
intel_connector.c
…
intel_connector.h
…
intel_crt.c drm/i915: Reduce INTEL_DISPLAY_ENABLED to just treat outputs as disconnected 2020-09-15 15:28:21 +03:00
intel_crt.h
…
intel_csr.c
…
intel_csr.h
…
intel_ddi.c drm/i915: Skip vswing programming for TBT 2021-02-13 13:55:16 +01:00
intel_ddi.h drm/i915: Use the cpu_transcoder in intel_hdcp to toggle HDCP signalling 2020-09-01 13:02:33 +05:30
intel_de.h
…
intel_display.c drm/i915/display: Prevent double YUV range correction on HDR planes 2021-02-10 09:29:18 +01:00
intel_display.h drm/i915: Add more AUX CHs to the enum 2020-09-15 17:46:56 +03:00
intel_display_debugfs.c drm/dp: Pimp drm_dp_downstream_max_bpc() 2020-09-17 17:12:15 +03:00
intel_display_debugfs.h
…
intel_display_power.c drm/i915/tgl: Fix stepping WA matching 2020-08-28 10:29:06 -07:00
intel_display_power.h
…
intel_display_types.h drm/i915/dp: Track pm_qos per connector 2021-01-17 14:17:04 +01:00
intel_dp.c drm/i915/dp: Ensure sink rate values are always valid 2021-11-26 10:39:21 +01:00
intel_dp.h drm/i915: Only enable DFP 4:4:4->4:2:0 conversion when outputting YCbCr 4:4:4 2021-01-27 11:55:19 +01:00
intel_dp_aux_backlight.c drm/i915/dp: Tweak initial dpcd backlight.enabled value 2020-10-19 13:29:42 -04:00
intel_dp_aux_backlight.h
…
intel_dp_hdcp.c drm/i915: Add HDCP 1.4 support for MST connectors 2020-09-01 13:03:05 +05:30
intel_dp_link_training.c
…
intel_dp_link_training.h
…
intel_dp_mst.c drm/i915: Fix the MST PBN divider calculation 2021-02-10 09:29:18 +01:00
intel_dp_mst.h
…
intel_dpio_phy.c
…
intel_dpio_phy.h
…
intel_dpll_mgr.c drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock 2021-01-09 13:46:23 +01:00
intel_dpll_mgr.h
…
intel_dsb.c
…
intel_dsb.h
…
intel_dsi.c
…
intel_dsi.h
…
intel_dsi_dcs_backlight.c
…
intel_dsi_dcs_backlight.h
…
intel_dsi_vbt.c
…
intel_dvo.c drm/i915: Reduce INTEL_DISPLAY_ENABLED to just treat outputs as disconnected 2020-09-15 15:28:21 +03:00
intel_dvo.h
…
intel_dvo_dev.h
…
intel_fbc.c UAPI Changes: 2020-08-28 14:09:31 +10:00
intel_fbc.h
…
intel_fbdev.c drm/i915: Reduce INTEL_DISPLAY_ENABLED to just removing the outputs 2020-09-15 14:57:13 +03:00
intel_fbdev.h
…
intel_fifo_underrun.c
…
intel_fifo_underrun.h
…
intel_frontbuffer.c
…
intel_frontbuffer.h
…
intel_global_state.c
…
intel_global_state.h
…
intel_gmbus.c drm/i915: Reduce INTEL_DISPLAY_ENABLED to just removing the outputs 2020-09-15 14:57:13 +03:00
intel_gmbus.h
…
intel_hdcp.c drm/i915/hdcp: Get conn while content_type changed 2021-01-27 11:55:28 +01:00
intel_hdcp.h drm/i915: Plumb port through hdcp init 2020-09-01 13:02:33 +05:30
intel_hdmi.c drm/i915: Reject 446-480MHz HDMI clock on GLK 2021-03-04 11:38:46 +01:00
intel_hdmi.h drm/i915: Do YCbCr 444->420 conversion via DP protocol converters 2020-09-17 18:43:09 +03:00
intel_hotplug.c drm/i915: Nuke pointless variable 2020-09-15 18:01:57 +03:00
intel_hotplug.h
…
intel_lpe_audio.c
…
intel_lpe_audio.h
…
intel_lspcon.c drm/i915/dp: Extract drm_dp_read_dpcd_caps() 2020-08-31 19:10:09 -04:00
intel_lspcon.h
…
intel_lvds.c drm/i915: Reduce INTEL_DISPLAY_ENABLED to just treat outputs as disconnected 2020-09-15 15:28:21 +03:00
intel_lvds.h
…
intel_opregion.c drm/i915/opregion: check port number bounds for SWSCI display power state 2022-04-08 14:39:58 +02:00
intel_opregion.h
…
intel_overlay.c drm/i915/overlay: Prevent divide by zero bugs in scaling 2022-02-08 18:30:38 +01:00
intel_overlay.h
…
intel_panel.c drm/i915/backlight: fix CPU mode backlight takeover on LPT 2021-01-19 18:27:18 +01:00
intel_panel.h drm/i915: Reduce INTEL_DISPLAY_ENABLED to just treat outputs as disconnected 2020-09-15 15:28:21 +03:00
intel_pipe_crc.c
…
intel_pipe_crc.h
…
intel_psr.c drm/i915: Fix encoder lookup during PSR atomic check 2020-11-03 19:14:15 -05:00
intel_psr.h
…
intel_quirks.c
…
intel_quirks.h
…
intel_sdvo.c drm/i915: Reduce INTEL_DISPLAY_ENABLED to just treat outputs as disconnected 2020-09-15 15:28:21 +03:00
intel_sdvo.h
…
intel_sdvo_regs.h
…
intel_sprite.c drm/i915/display: Prevent double YUV range correction on HDR planes 2021-02-10 09:29:18 +01:00
intel_sprite.h
…
intel_tc.c drm/i915/tgl+: Make sure TypeC FIA is powered up when initializing it 2021-02-17 11:02:21 +01:00
intel_tc.h
…
intel_tv.c drm/i915: Reduce INTEL_DISPLAY_ENABLED to just treat outputs as disconnected 2020-09-15 15:28:21 +03:00
intel_tv.h
…
intel_vbt_defs.h drm/i915: Add VBT AUX CH H and I 2020-09-15 17:47:55 +03:00
intel_vdsc.c
…
intel_vdsc.h
…
intel_vga.c
…
intel_vga.h
…
vlv_dsi.c drm/i915/dsi: Use unconditional msleep for the panel_on_delay when there is no reset-deassert MIPI-sequence 2021-01-19 18:27:32 +01:00
vlv_dsi_pll.c drm/i915/vlv_dsi_pll: fix spelling mistake "Cant" -> "Can't" 2020-08-27 16:28:21 +03:00