On Fri, May 15, 2026 at 11:02:10AM +0200, Javier Martinez Canillas wrote: > Move the existing .mode_set logic to the .atomic_enable callback. The > former is deprecated and drivers are supposed to use the latter instead. > > Suggested-by: Maxime Ripard > Signed-off-by: Javier Martinez Canillas > --- > > Changes in v4: > - New patch for v4 > > drivers/gpu/drm/bridge/ite-it66121.c | 79 +++++++++++++++------------- > 1 file changed, 42 insertions(+), 37 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c > index 947b7a0f0a45..c8795247cfa8 100644 > --- a/drivers/gpu/drm/bridge/ite-it66121.c > +++ b/drivers/gpu/drm/bridge/ite-it66121.c > @@ -654,6 +654,47 @@ static int it66121_bridge_attach(struct drm_bridge *bridge, > return 0; > } > > +static void it66121_set_mode(struct it66121_ctx *ctx, > + struct drm_atomic_commit *state) > +{ > + struct drm_connector *connector = ctx->connector; We should drop this entirely now. It's available in atomic_enable, you should pass it as an argument. > + const struct drm_crtc_state *crtc_state; > + const struct drm_display_mode *mode; > + struct drm_crtc *crtc; > + > + crtc = drm_atomic_get_new_connector_state(state, connector)->crtc; > + crtc_state = drm_atomic_get_new_crtc_state(state, crtc); drm_atomic_get_new_connector_state and drm_atomic_get_new_crtc_state can return a NULL pointer. We should check, warn and return if it's the case. Maxime