Commit 7e156fa7 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by sanglipeng
Browse files

drm/i915: Make intel_get_crtc_new_encoder() less oopsy

stable inclusion
from stable-v5.10.180
commit 780f303233c35eeb5132e3ee1cbc8f4cebe86dd2
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8DDFN

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=780f303233c35eeb5132e3ee1cbc8f4cebe86dd2



--------------------------------

[ Upstream commit 631420b0 ]

The point of the WARN was to print something, not oops
straight up. Currently that is precisely what happens
if we can't find the connector for the crtc in the atomic
state. Get the dev pointer from the atomic state instead
of the potentially NULL encoder to avoid that.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230413200602.6037-2-ville.syrjala@linux.intel.com


Fixes: 3a47ae20 ("drm/i915/display: Make WARN* drm specific where encoder ptr is available")
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
(cherry picked from commit 3b669235)
Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent eb8fd6a0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment