Skip to content

Commit d5712cd

Browse files
committed
drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
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: https://gitlab.freedesktop.org/drm/nouveau/-/issues/238 Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/245 Fixes: 20a2ce8 ("drm/nouveau/dp: check for NULL nv_connector->native_mode") Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230805101813.2603989-1-kherbst@redhat.com
1 parent 3c6bd1b commit d5712cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/nouveau/nouveau_connector.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ nouveau_connector_get_modes(struct drm_connector *connector)
967967
/* Determine display colour depth for everything except LVDS now,
968968
* DP requires this before mode_valid() is called.
969969
*/
970-
if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode)
970+
if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS)
971971
nouveau_connector_detect_depth(connector);
972972

973973
/* Find the native mode if this is a digital panel, if we didn't

0 commit comments

Comments
 (0)