Commit 60a43ec
committed
drm/i915/ddi: only call shutdown hooks for valid encoders
DDI might be HDMI or DP only, leaving the other encoder
uninitialized. Calling the shutdown hook on an uninitialized encoder may
lead to a NULL pointer dereference. Check the encoder types (and thus
validity via the DP output_reg or HDMI hdmi_reg checks) before calling
the hooks.
Reported-and-tested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Closes: https://lore.kernel.org/r/20241031105145.2140590-1-senozhatsky@chromium.org
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/8b197c50e7f3be2bbc07e3935b21e919815015d5.1735568047.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>1 parent efa43b7 commit 60a43ec
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4923 | 4923 | | |
4924 | 4924 | | |
4925 | 4925 | | |
4926 | | - | |
4927 | | - | |
| 4926 | + | |
| 4927 | + | |
| 4928 | + | |
| 4929 | + | |
4928 | 4930 | | |
4929 | 4931 | | |
4930 | 4932 | | |
| |||
0 commit comments