diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-02-23 15:13:03 +0200 |
---|---|---|
committer | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2022-03-08 08:34:59 +0200 |
commit | 4fe4ed07c815044755075eaad5fe1815436a060f (patch) | |
tree | 755e2c64b2a3033af1532f7eb86302f4d630d2ab /drivers/gpu/drm/i915/intel_pm.c | |
parent | 6de7e4f02640fba2ffa6ac04e2be13785d614175 (diff) |
drm/i915: Avoid negative shift due to bigjoiner_pipes==0
bigjoiner_pipes==0 leads bigjoiner_master_pipe() to
do BIT(ffs(0)-1) which is undefined behaviour. The code should
actually still work fine since the only place we provoke
that is intel_crtc_bigjoiner_slave_pipes() and it'll bitwise
AND the result with 0, so doesn't really matter what we get
out of bigjoiner_master_pipe(). But best not provoke undefined
behaviour anyway.
Reported-by: kernel test robot <oliver.sang@intel.com>
Fixes: a6e7a006f5d5 ("drm/i915: Change bigjoiner state tracking to use the pipe bitmask")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220223131315.18016-2-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
(cherry picked from commit cccc71b552a1040ad3d738d7ec95570801fb0bf6)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
0 files changed, 0 insertions, 0 deletions