diff options
author | Dave Airlie <airlied@redhat.com> | 2024-03-19 14:36:06 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2024-03-19 14:36:15 +1000 |
commit | 02ac43711111b9e36dbbecfe85bfd1dbfa2b49bb (patch) | |
tree | 1a0a3ba280fa6fb67dbbbb1247821c3bec8cc20e /drivers/gpu/drm/drm_probe_helper.c | |
parent | 341f7081587da6d66b9b47e76c0e2ebd2350624f (diff) | |
parent | 9dd81b2e1ec72a3759f8d6bb6e9cbef93aab6227 (diff) |
Merge tag 'drm-misc-next-fixes-2024-03-14' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
Short summary of fixes pull:
probe-helper:
- never return negative values from .get_modes() plus driver fixes
nouveau:
- clear bo resource bus after eviction
- documentation fixes
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20240314082833.GA8761@localhost.localdomain
Diffstat (limited to 'drivers/gpu/drm/drm_probe_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_probe_helper.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index 19ecb749704b..75f84753f6ee 100644 --- a/drivers/gpu/drm/drm_probe_helper.c +++ b/drivers/gpu/drm/drm_probe_helper.c @@ -422,6 +422,13 @@ static int drm_helper_probe_get_modes(struct drm_connector *connector) count = connector_funcs->get_modes(connector); + /* The .get_modes() callback should not return negative values. */ + if (count < 0) { + drm_err(connector->dev, ".get_modes() returned %pe\n", + ERR_PTR(count)); + count = 0; + } + /* * Fallback for when DDC probe failed in drm_get_edid() and thus skipped * override/firmware EDID. |