diff options
author | Jani Nikula <[email protected]> | 2022-02-10 12:36:42 +0200 |
---|---|---|
committer | Jani Nikula <[email protected]> | 2022-02-11 09:54:11 +0200 |
commit | 24a644ebbfd3b13cda702f98907f9dd123e34bf9 (patch) | |
tree | cd8d55ce9c47f9e9eb6a88500d7742a236f11d48 /lib/test-string_helpers.c | |
parent | 24524e3f43cf77dfdff7187f76d967b3175f68bf (diff) |
drm/i915/opregion: check port number bounds for SWSCI display power state
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: 9c4b0a683193 ("drm/i915: add opregion function to notify bios of encoder enable/disable")
Cc: <[email protected]> # v3.13+
Cc: Ville Syrjälä <[email protected]>
Cc: Lucas De Marchi <[email protected]>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4800
Signed-off-by: Jani Nikula <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/cc363f42d6b5a5932b6d218fefcc8bdfb15dbbe5.1644489329.git.jani.nikula@intel.com
Diffstat (limited to 'lib/test-string_helpers.c')
0 files changed, 0 insertions, 0 deletions