From: Ville Syrjälä Date: Fri, 28 Feb 2025 21:14:51 +0000 (+0200) Subject: drm/client: Stop using the legacy crtc->mode X-Git-Tag: v6.16-rc1~144^2~21^2~196 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82f9570b3563e9045c70658f474f11a48a21d4b9;p=thirdparty%2Flinux.git drm/client: Stop using the legacy crtc->mode crtc->mode is legacy junk and shouldn't really be used with atomic drivers. Most (all?) atomic drivers do end up still calling drm_atomic_helper_update_legacy_modeset_state() at some point, so crtc->mode does still get populated, and this does work for now. But now that the modes[] lifetime issues have been sorted out we can just switch over to the proper crtc->state->mode. v2: Rebase Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250228211454.8138-6-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula --- diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c index ff034359f0632..4c64535fb82cb 100644 --- a/drivers/gpu/drm/drm_client_modeset.c +++ b/drivers/gpu/drm/drm_client_modeset.c @@ -733,20 +733,9 @@ retry: /* last resort: use current mode */ if (!modes[i]) { - /* - * IMPORTANT: We want to use the adjusted mode (i.e. - * after the panel fitter upscaling) as the initial - * config, not the input mode, which is what crtc->mode - * usually contains. But since our current - * code puts a mode derived from the post-pfit timings - * into crtc->mode this works out correctly. - * - * This is crtc->mode and not crtc->state->mode for the - * fastboot check to work correctly. - */ mode_type = "current"; mode_replace(dev, &modes[i], - &connector->state->crtc->mode); + &new_crtc->state->mode); } /*