summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2024-07-29 09:35:54 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2024-07-29 09:35:54 +0200
commit0e8655b4e852ef97655648b91ce780384a073ff4 (patch)
tree11052a81da749dda3357f7748bdf93549c8007bf /drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
parent0c3f3a83c7e8dfaaae4ba8a5b69bd6bc13340d0b (diff)
parentd4ef5d2b7ee0cbb5f2d864716140366a618400d6 (diff)
Merge drm/drm-next into drm-misc-next
Backmerging to get a late RC of v6.10 before moving into v6.11. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv04/tvnv17.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv04/tvnv17.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
index c11f58033018..3ecb101d23e9 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
@@ -209,6 +209,8 @@ static int nv17_tv_get_ld_modes(struct drm_encoder *encoder,
struct drm_display_mode *mode;
mode = drm_mode_duplicate(encoder->dev, tv_mode);
+ if (!mode)
+ continue;
mode->clock = tv_norm->tv_enc_mode.vrefresh *
mode->htotal / 1000 *
@@ -258,6 +260,8 @@ static int nv17_tv_get_hd_modes(struct drm_encoder *encoder,
if (modes[i].hdisplay == output_mode->hdisplay &&
modes[i].vdisplay == output_mode->vdisplay) {
mode = drm_mode_duplicate(encoder->dev, output_mode);
+ if (!mode)
+ continue;
mode->type |= DRM_MODE_TYPE_PREFERRED;
} else {
@@ -265,6 +269,8 @@ static int nv17_tv_get_hd_modes(struct drm_encoder *encoder,
modes[i].vdisplay, 60, false,
(output_mode->flags &
DRM_MODE_FLAG_INTERLACE), false);
+ if (!mode)
+ continue;
}
/* CVT modes are sometimes unsuitable... */