From: Stephen Rothwell Date: Tue, 25 Feb 2025 01:12:32 +0000 (+1100) Subject: Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux X-Git-Tag: next-20250225~94 X-Git-Url: https://gentwo.org/gitweb/?a=commitdiff_plain;h=372f0f77557d79644ba92639ec2701a792de2b05;p=linux%2F.git Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux # Conflicts: # drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c --- 372f0f77557d79644ba92639ec2701a792de2b05 diff --cc drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 1ea40696c955,8672c0c3c5db..16e4eb474eec --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@@ -7476,9 -7536,11 +7536,12 @@@ enum drm_mode_status amdgpu_dm_connecto { int result = MODE_ERROR; struct dc_sink *dc_sink; + struct drm_display_mode *test_mode; /* TODO: Unhardcode stream count */ struct dc_stream_state *stream; + /* we always have an amdgpu_dm_connector here since we got + * here via the amdgpu_dm_connector_helper_funcs + */ struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector); if ((mode->flags & DRM_MODE_FLAG_INTERLACE) || @@@ -7501,16 -7563,11 +7564,16 @@@ goto fail; } - drm_mode_set_crtcinfo(mode, 0); + test_mode = drm_mode_duplicate(connector->dev, mode); + if (!test_mode) + goto fail; + + drm_mode_set_crtcinfo(test_mode, 0); - stream = create_validate_stream_for_sink(aconnector, test_mode, - stream = create_validate_stream_for_sink(connector, mode, ++ stream = create_validate_stream_for_sink(connector, test_mode, to_dm_connector_state(connector->state), NULL); + drm_mode_destroy(connector->dev, test_mode); if (stream) { dc_stream_release(stream); result = MODE_OK;