Skip to content
Snippets Groups Projects
Commit 43006691 authored by Karol Herbst's avatar Karol Herbst :crab: Committed by Greg Kroah-Hartman
Browse files

drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes

commit d5712cd2 upstream.

The original commit adding that check tried to protect the kenrel against
a potential invalid NULL pointer access.

However we call nouveau_connector_detect_depth once without a native_mode
set on purpose for non LVDS connectors and this broke DP support in a few
cases.

Cc: Olaf Skibbe <news@kravcenko.com>
Cc: Lyude Paul <lyude@redhat.com>
Closes: #238
Closes: #245


Fixes: 20a2ce87 ("drm/nouveau/dp: check for NULL nv_connector->native_mode")
Signed-off-by: Karol Herbst's avatarKarol Herbst <kherbst@redhat.com>
Reviewed-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230805101813.2603989-1-kherbst@redhat.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4cfe8823
No related merge requests found
...@@ -945,7 +945,7 @@ nouveau_connector_get_modes(struct drm_connector *connector) ...@@ -945,7 +945,7 @@ nouveau_connector_get_modes(struct drm_connector *connector)
/* Determine display colour depth for everything except LVDS now, /* Determine display colour depth for everything except LVDS now,
* DP requires this before mode_valid() is called. * DP requires this before mode_valid() is called.
*/ */
if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode) if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS)
nouveau_connector_detect_depth(connector); nouveau_connector_detect_depth(connector);
/* Find the native mode if this is a digital panel, if we didn't /* Find the native mode if this is a digital panel, if we didn't
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment