1 From 41661de0a014d606f6f55dd030a14bc341e677fc Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 8 Oct 2020 14:44:08 +0200
4 Subject: [PATCH] drm/atomic: Pass the full state to CRTC atomic
7 Commit 351f950db4ab28c321a1bd4b92e4bb03e34c4703 upstream.
9 If the CRTC driver ever needs to access the full DRM state, it can't do so
10 at atomic_enable / atomic_disable time since drm_atomic_helper_swap_state
11 will have cleared the pointer from the struct drm_crtc_state to the struct
12 drm_atomic_state before calling those hooks.
14 In order to allow that, let's pass the full DRM state to atomic_enable and
15 atomic_disable. The conversion was done using the coccinelle script below,
16 built tested on all the drivers and actually tested on vc4.
21 struct drm_crtc_helper_funcs *FUNCS;
22 identifier dev, state;
23 identifier crtc, crtc_state;
26 disable_outputs(struct drm_device *dev, struct drm_atomic_state *state)
29 - FUNCS->atomic_disable(crtc, crtc_state);
30 + FUNCS->atomic_disable(crtc, state);
35 struct drm_crtc_helper_funcs *FUNCS;
36 identifier dev, state;
37 identifier crtc, crtc_state;
40 drm_atomic_helper_commit_modeset_enables(struct drm_device *dev, struct drm_atomic_state *state)
43 - FUNCS->atomic_enable(crtc, crtc_state);
44 + FUNCS->atomic_enable(crtc, state);
49 identifier crtc, old_state;
52 struct drm_crtc_helper_funcs {
54 - void (*atomic_enable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state);
55 + void (*atomic_enable)(struct drm_crtc *crtc, struct drm_atomic_state *state);
57 - void (*atomic_disable)(struct drm_crtc *crtc, struct drm_crtc_state *old_state);
58 + void (*atomic_disable)(struct drm_crtc *crtc, struct drm_atomic_state *state);
68 static struct drm_crtc_helper_funcs helpers = {
70 .atomic_enable = func,
74 static struct drm_crtc_helper_funcs helpers = {
76 .atomic_disable = func,
82 identifier crtc_atomic_func.func;
83 identifier crtc, old_state;
86 void func(struct drm_crtc *crtc,
87 struct drm_crtc_state *old_state)
92 @ adds_old_state depends on crtc_atomic_func && !ignores_old_state @
93 identifier crtc_atomic_func.func;
94 identifier crtc, old_state;
97 void func(struct drm_crtc *crtc, struct drm_crtc_state *old_state)
99 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state, crtc);
103 @ depends on crtc_atomic_func @
104 identifier crtc_atomic_func.func;
121 @ depends on crtc_atomic_func @
122 identifier crtc_atomic_func.func;
138 @ depends on crtc_atomic_func @
139 identifier crtc_atomic_func.func;
140 identifier old_state;
144 void func(struct drm_crtc *crtc,
145 - struct drm_crtc_state *old_state
146 + struct drm_atomic_state *state
150 @ include depends on adds_old_state @
153 #include <drm/drm_atomic.h>
155 @ no_include depends on !include && adds_old_state @
158 + #include <drm/drm_atomic.h>
161 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
162 Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
163 Link: https://patchwork.freedesktop.org/patch/msgid/845aa10ef171fc0ea060495efef142a0c13f7870.1602161031.git-series.maxime@cerno.tech
165 drivers/gpu/drm/arc/arcpgu_crtc.c | 4 ++--
166 drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 8 ++++++--
167 drivers/gpu/drm/arm/hdlcd_crtc.c | 4 ++--
168 drivers/gpu/drm/arm/malidp_crtc.c | 6 ++++--
169 drivers/gpu/drm/armada/armada_crtc.c | 8 ++++++--
170 drivers/gpu/drm/ast/ast_mode.c | 6 ++++--
171 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 4 ++--
172 drivers/gpu/drm/drm_atomic_helper.c | 4 ++--
173 drivers/gpu/drm/drm_simple_kms_helper.c | 4 ++--
174 drivers/gpu/drm/exynos/exynos_drm_crtc.c | 4 ++--
175 drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 6 ++++--
176 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 4 ++--
177 drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 4 ++--
178 drivers/gpu/drm/imx/dcss/dcss-crtc.c | 9 +++++++--
179 drivers/gpu/drm/imx/ipuv3-crtc.c | 6 ++++--
180 drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 4 ++--
181 drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 4 ++--
182 drivers/gpu/drm/meson/meson_crtc.c | 8 ++++----
183 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 7 +++++--
184 drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 4 ++--
185 drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 4 ++--
186 drivers/gpu/drm/mxsfb/mxsfb_kms.c | 4 ++--
187 drivers/gpu/drm/omapdrm/omap_crtc.c | 4 ++--
188 drivers/gpu/drm/qxl/qxl_display.c | 4 ++--
189 drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 6 ++++--
190 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 ++++--
191 drivers/gpu/drm/sti/sti_crtc.c | 4 ++--
192 drivers/gpu/drm/stm/ltdc.c | 4 ++--
193 drivers/gpu/drm/sun4i/sun4i_crtc.c | 4 ++--
194 drivers/gpu/drm/tegra/dc.c | 8 ++++----
195 drivers/gpu/drm/tidss/tidss_crtc.c | 6 ++++--
196 drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 4 ++--
197 drivers/gpu/drm/vboxvideo/vbox_mode.c | 4 ++--
198 drivers/gpu/drm/vc4/vc4_crtc.c | 8 ++++++--
199 drivers/gpu/drm/vc4/vc4_txp.c | 9 +++++++--
200 drivers/gpu/drm/virtio/virtgpu_display.c | 4 ++--
201 drivers/gpu/drm/vkms/vkms_crtc.c | 4 ++--
202 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 4 ++--
203 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 4 ++--
204 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 ++--
205 drivers/gpu/drm/xlnx/zynqmp_disp.c | 6 ++++--
206 drivers/gpu/drm/zte/zx_vou.c | 4 ++--
207 include/drm/drm_modeset_helper_vtables.h | 13 ++-----------
208 43 files changed, 131 insertions(+), 99 deletions(-)
210 --- a/drivers/gpu/drm/arc/arcpgu_crtc.c
211 +++ b/drivers/gpu/drm/arc/arcpgu_crtc.c
212 @@ -116,7 +116,7 @@ static void arc_pgu_crtc_mode_set_nofb(s
215 static void arc_pgu_crtc_atomic_enable(struct drm_crtc *crtc,
216 - struct drm_crtc_state *old_state)
217 + struct drm_atomic_state *state)
219 struct arcpgu_drm_private *arcpgu = crtc_to_arcpgu_priv(crtc);
221 @@ -127,7 +127,7 @@ static void arc_pgu_crtc_atomic_enable(s
224 static void arc_pgu_crtc_atomic_disable(struct drm_crtc *crtc,
225 - struct drm_crtc_state *old_state)
226 + struct drm_atomic_state *state)
228 struct arcpgu_drm_private *arcpgu = crtc_to_arcpgu_priv(crtc);
230 --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
231 +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
232 @@ -273,8 +273,10 @@ komeda_crtc_do_flush(struct drm_crtc *cr
235 komeda_crtc_atomic_enable(struct drm_crtc *crtc,
236 - struct drm_crtc_state *old)
237 + struct drm_atomic_state *state)
239 + struct drm_crtc_state *old = drm_atomic_get_old_crtc_state(state,
241 pm_runtime_get_sync(crtc->dev->dev);
242 komeda_crtc_prepare(to_kcrtc(crtc));
243 drm_crtc_vblank_on(crtc);
244 @@ -319,8 +321,10 @@ komeda_crtc_flush_and_wait_for_flip_done
247 komeda_crtc_atomic_disable(struct drm_crtc *crtc,
248 - struct drm_crtc_state *old)
249 + struct drm_atomic_state *state)
251 + struct drm_crtc_state *old = drm_atomic_get_old_crtc_state(state,
253 struct komeda_crtc *kcrtc = to_kcrtc(crtc);
254 struct komeda_crtc_state *old_st = to_kcrtc_st(old);
255 struct komeda_pipeline *master = kcrtc->master;
256 --- a/drivers/gpu/drm/arm/hdlcd_crtc.c
257 +++ b/drivers/gpu/drm/arm/hdlcd_crtc.c
258 @@ -168,7 +168,7 @@ static void hdlcd_crtc_mode_set_nofb(str
261 static void hdlcd_crtc_atomic_enable(struct drm_crtc *crtc,
262 - struct drm_crtc_state *old_state)
263 + struct drm_atomic_state *state)
265 struct hdlcd_drm_private *hdlcd = crtc_to_hdlcd_priv(crtc);
267 @@ -179,7 +179,7 @@ static void hdlcd_crtc_atomic_enable(str
270 static void hdlcd_crtc_atomic_disable(struct drm_crtc *crtc,
271 - struct drm_crtc_state *old_state)
272 + struct drm_atomic_state *state)
274 struct hdlcd_drm_private *hdlcd = crtc_to_hdlcd_priv(crtc);
276 --- a/drivers/gpu/drm/arm/malidp_crtc.c
277 +++ b/drivers/gpu/drm/arm/malidp_crtc.c
278 @@ -46,7 +46,7 @@ static enum drm_mode_status malidp_crtc_
281 static void malidp_crtc_atomic_enable(struct drm_crtc *crtc,
282 - struct drm_crtc_state *old_state)
283 + struct drm_atomic_state *state)
285 struct malidp_drm *malidp = crtc_to_malidp_device(crtc);
286 struct malidp_hw_device *hwdev = malidp->dev;
287 @@ -70,8 +70,10 @@ static void malidp_crtc_atomic_enable(st
290 static void malidp_crtc_atomic_disable(struct drm_crtc *crtc,
291 - struct drm_crtc_state *old_state)
292 + struct drm_atomic_state *state)
294 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
296 struct malidp_drm *malidp = crtc_to_malidp_device(crtc);
297 struct malidp_hw_device *hwdev = malidp->dev;
299 --- a/drivers/gpu/drm/armada/armada_crtc.c
300 +++ b/drivers/gpu/drm/armada/armada_crtc.c
301 @@ -467,8 +467,10 @@ static void armada_drm_crtc_atomic_flush
304 static void armada_drm_crtc_atomic_disable(struct drm_crtc *crtc,
305 - struct drm_crtc_state *old_state)
306 + struct drm_atomic_state *state)
308 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
310 struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
311 struct drm_pending_vblank_event *event;
313 @@ -503,8 +505,10 @@ static void armada_drm_crtc_atomic_disab
316 static void armada_drm_crtc_atomic_enable(struct drm_crtc *crtc,
317 - struct drm_crtc_state *old_state)
318 + struct drm_atomic_state *state)
320 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
322 struct armada_crtc *dcrtc = drm_to_armada_crtc(crtc);
324 DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
325 --- a/drivers/gpu/drm/ast/ast_mode.c
326 +++ b/drivers/gpu/drm/ast/ast_mode.c
327 @@ -793,7 +793,7 @@ ast_crtc_helper_atomic_flush(struct drm_
330 ast_crtc_helper_atomic_enable(struct drm_crtc *crtc,
331 - struct drm_crtc_state *old_crtc_state)
332 + struct drm_atomic_state *state)
334 struct drm_device *dev = crtc->dev;
335 struct ast_private *ast = to_ast_private(dev);
336 @@ -816,8 +816,10 @@ ast_crtc_helper_atomic_enable(struct drm
339 ast_crtc_helper_atomic_disable(struct drm_crtc *crtc,
340 - struct drm_crtc_state *old_crtc_state)
341 + struct drm_atomic_state *state)
343 + struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state,
345 struct drm_device *dev = crtc->dev;
346 struct ast_private *ast = to_ast_private(dev);
348 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
349 +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
350 @@ -165,7 +165,7 @@ atmel_hlcdc_crtc_mode_valid(struct drm_c
353 static void atmel_hlcdc_crtc_atomic_disable(struct drm_crtc *c,
354 - struct drm_crtc_state *old_state)
355 + struct drm_atomic_state *state)
357 struct drm_device *dev = c->dev;
358 struct atmel_hlcdc_crtc *crtc = drm_crtc_to_atmel_hlcdc_crtc(c);
359 @@ -200,7 +200,7 @@ static void atmel_hlcdc_crtc_atomic_disa
362 static void atmel_hlcdc_crtc_atomic_enable(struct drm_crtc *c,
363 - struct drm_crtc_state *old_state)
364 + struct drm_atomic_state *state)
366 struct drm_device *dev = c->dev;
367 struct atmel_hlcdc_crtc *crtc = drm_crtc_to_atmel_hlcdc_crtc(c);
368 --- a/drivers/gpu/drm/drm_atomic_helper.c
369 +++ b/drivers/gpu/drm/drm_atomic_helper.c
370 @@ -1093,7 +1093,7 @@ disable_outputs(struct drm_device *dev,
371 if (new_crtc_state->enable && funcs->prepare)
372 funcs->prepare(crtc);
373 else if (funcs->atomic_disable)
374 - funcs->atomic_disable(crtc, old_crtc_state);
375 + funcs->atomic_disable(crtc, old_state);
376 else if (funcs->disable)
377 funcs->disable(crtc);
378 else if (funcs->dpms)
379 @@ -1358,7 +1358,7 @@ void drm_atomic_helper_commit_modeset_en
380 DRM_DEBUG_ATOMIC("enabling [CRTC:%d:%s]\n",
381 crtc->base.id, crtc->name);
382 if (funcs->atomic_enable)
383 - funcs->atomic_enable(crtc, old_crtc_state);
384 + funcs->atomic_enable(crtc, old_state);
385 else if (funcs->commit)
388 --- a/drivers/gpu/drm/drm_simple_kms_helper.c
389 +++ b/drivers/gpu/drm/drm_simple_kms_helper.c
390 @@ -99,7 +99,7 @@ static int drm_simple_kms_crtc_check(str
393 static void drm_simple_kms_crtc_enable(struct drm_crtc *crtc,
394 - struct drm_crtc_state *old_state)
395 + struct drm_atomic_state *state)
397 struct drm_plane *plane;
398 struct drm_simple_display_pipe *pipe;
399 @@ -113,7 +113,7 @@ static void drm_simple_kms_crtc_enable(s
402 static void drm_simple_kms_crtc_disable(struct drm_crtc *crtc,
403 - struct drm_crtc_state *old_state)
404 + struct drm_atomic_state *state)
406 struct drm_simple_display_pipe *pipe;
408 --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
409 +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
411 #include "exynos_drm_plane.h"
413 static void exynos_drm_crtc_atomic_enable(struct drm_crtc *crtc,
414 - struct drm_crtc_state *old_state)
415 + struct drm_atomic_state *state)
417 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
419 @@ -30,7 +30,7 @@ static void exynos_drm_crtc_atomic_enabl
422 static void exynos_drm_crtc_atomic_disable(struct drm_crtc *crtc,
423 - struct drm_crtc_state *old_state)
424 + struct drm_atomic_state *state)
426 struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
428 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
429 +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c
430 @@ -43,8 +43,10 @@ static void fsl_dcu_drm_crtc_atomic_flus
433 static void fsl_dcu_drm_crtc_atomic_disable(struct drm_crtc *crtc,
434 - struct drm_crtc_state *old_crtc_state)
435 + struct drm_atomic_state *state)
437 + struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state,
439 struct drm_device *dev = crtc->dev;
440 struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
442 @@ -62,7 +64,7 @@ static void fsl_dcu_drm_crtc_atomic_disa
445 static void fsl_dcu_drm_crtc_atomic_enable(struct drm_crtc *crtc,
446 - struct drm_crtc_state *old_state)
447 + struct drm_atomic_state *state)
449 struct drm_device *dev = crtc->dev;
450 struct fsl_dcu_drm_device *fsl_dev = dev->dev_private;
451 --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
452 +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
453 @@ -172,7 +172,7 @@ static void hibmc_crtc_dpms(struct drm_c
456 static void hibmc_crtc_atomic_enable(struct drm_crtc *crtc,
457 - struct drm_crtc_state *old_state)
458 + struct drm_atomic_state *state)
461 struct hibmc_drm_private *priv = crtc->dev->dev_private;
462 @@ -191,7 +191,7 @@ static void hibmc_crtc_atomic_enable(str
465 static void hibmc_crtc_atomic_disable(struct drm_crtc *crtc,
466 - struct drm_crtc_state *old_state)
467 + struct drm_atomic_state *state)
470 struct hibmc_drm_private *priv = crtc->dev->dev_private;
471 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
472 +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c
473 @@ -436,7 +436,7 @@ static void ade_dump_regs(void __iomem *
476 static void ade_crtc_atomic_enable(struct drm_crtc *crtc,
477 - struct drm_crtc_state *old_state)
478 + struct drm_atomic_state *state)
480 struct kirin_crtc *kcrtc = to_kirin_crtc(crtc);
481 struct ade_hw_ctx *ctx = kcrtc->hw_ctx;
482 @@ -459,7 +459,7 @@ static void ade_crtc_atomic_enable(struc
485 static void ade_crtc_atomic_disable(struct drm_crtc *crtc,
486 - struct drm_crtc_state *old_state)
487 + struct drm_atomic_state *state)
489 struct kirin_crtc *kcrtc = to_kirin_crtc(crtc);
490 struct ade_hw_ctx *ctx = kcrtc->hw_ctx;
491 --- a/drivers/gpu/drm/imx/dcss/dcss-crtc.c
492 +++ b/drivers/gpu/drm/imx/dcss/dcss-crtc.c
494 * Copyright 2019 NXP.
497 +#include <drm/drm_atomic.h>
498 #include <drm/drm_atomic_helper.h>
499 #include <drm/drm_vblank.h>
500 #include <linux/platform_device.h>
501 @@ -77,8 +78,10 @@ static void dcss_crtc_atomic_flush(struc
504 static void dcss_crtc_atomic_enable(struct drm_crtc *crtc,
505 - struct drm_crtc_state *old_crtc_state)
506 + struct drm_atomic_state *state)
508 + struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state,
510 struct dcss_crtc *dcss_crtc = container_of(crtc, struct dcss_crtc,
512 struct dcss_dev *dcss = dcss_crtc->base.dev->dev_private;
513 @@ -111,8 +114,10 @@ static void dcss_crtc_atomic_enable(stru
516 static void dcss_crtc_atomic_disable(struct drm_crtc *crtc,
517 - struct drm_crtc_state *old_crtc_state)
518 + struct drm_atomic_state *state)
520 + struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state,
522 struct dcss_crtc *dcss_crtc = container_of(crtc, struct dcss_crtc,
524 struct dcss_dev *dcss = dcss_crtc->base.dev->dev_private;
525 --- a/drivers/gpu/drm/imx/ipuv3-crtc.c
526 +++ b/drivers/gpu/drm/imx/ipuv3-crtc.c
527 @@ -47,7 +47,7 @@ static inline struct ipu_crtc *to_ipu_cr
530 static void ipu_crtc_atomic_enable(struct drm_crtc *crtc,
531 - struct drm_crtc_state *old_state)
532 + struct drm_atomic_state *state)
534 struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc);
535 struct ipu_soc *ipu = dev_get_drvdata(ipu_crtc->dev->parent);
536 @@ -79,8 +79,10 @@ static void ipu_crtc_disable_planes(stru
539 static void ipu_crtc_atomic_disable(struct drm_crtc *crtc,
540 - struct drm_crtc_state *old_crtc_state)
541 + struct drm_atomic_state *state)
543 + struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state,
545 struct ipu_crtc *ipu_crtc = to_ipu_crtc(crtc);
546 struct ipu_soc *ipu = dev_get_drvdata(ipu_crtc->dev->parent);
548 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
549 +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
550 @@ -112,7 +112,7 @@ static inline struct ingenic_drm *drm_cr
553 static void ingenic_drm_crtc_atomic_enable(struct drm_crtc *crtc,
554 - struct drm_crtc_state *state)
555 + struct drm_atomic_state *state)
557 struct ingenic_drm *priv = drm_crtc_get_priv(crtc);
559 @@ -126,7 +126,7 @@ static void ingenic_drm_crtc_atomic_enab
562 static void ingenic_drm_crtc_atomic_disable(struct drm_crtc *crtc,
563 - struct drm_crtc_state *state)
564 + struct drm_atomic_state *state)
566 struct ingenic_drm *priv = drm_crtc_get_priv(crtc);
568 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
569 +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
570 @@ -517,7 +517,7 @@ void mtk_drm_crtc_async_update(struct dr
573 static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc,
574 - struct drm_crtc_state *old_state)
575 + struct drm_atomic_state *state)
577 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
578 struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
579 @@ -542,7 +542,7 @@ static void mtk_drm_crtc_atomic_enable(s
582 static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc,
583 - struct drm_crtc_state *old_state)
584 + struct drm_atomic_state *state)
586 struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
587 struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
588 --- a/drivers/gpu/drm/meson/meson_crtc.c
589 +++ b/drivers/gpu/drm/meson/meson_crtc.c
590 @@ -82,7 +82,7 @@ static const struct drm_crtc_funcs meson
593 static void meson_g12a_crtc_atomic_enable(struct drm_crtc *crtc,
594 - struct drm_crtc_state *old_state)
595 + struct drm_atomic_state *state)
597 struct meson_crtc *meson_crtc = to_meson_crtc(crtc);
598 struct drm_crtc_state *crtc_state = crtc->state;
599 @@ -118,7 +118,7 @@ static void meson_g12a_crtc_atomic_enabl
602 static void meson_crtc_atomic_enable(struct drm_crtc *crtc,
603 - struct drm_crtc_state *old_state)
604 + struct drm_atomic_state *state)
606 struct meson_crtc *meson_crtc = to_meson_crtc(crtc);
607 struct drm_crtc_state *crtc_state = crtc->state;
608 @@ -146,7 +146,7 @@ static void meson_crtc_atomic_enable(str
611 static void meson_g12a_crtc_atomic_disable(struct drm_crtc *crtc,
612 - struct drm_crtc_state *old_state)
613 + struct drm_atomic_state *state)
615 struct meson_crtc *meson_crtc = to_meson_crtc(crtc);
616 struct meson_drm *priv = meson_crtc->priv;
617 @@ -171,7 +171,7 @@ static void meson_g12a_crtc_atomic_disab
620 static void meson_crtc_atomic_disable(struct drm_crtc *crtc,
621 - struct drm_crtc_state *old_state)
622 + struct drm_atomic_state *state)
624 struct meson_crtc *meson_crtc = to_meson_crtc(crtc);
625 struct meson_drm *priv = meson_crtc->priv;
626 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
627 +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
629 #include <linux/ktime.h>
630 #include <linux/bits.h>
632 +#include <drm/drm_atomic.h>
633 #include <drm/drm_crtc.h>
634 #include <drm/drm_flip_work.h>
635 #include <drm/drm_mode.h>
636 @@ -706,10 +707,12 @@ static struct drm_crtc_state *dpu_crtc_d
639 static void dpu_crtc_disable(struct drm_crtc *crtc,
640 - struct drm_crtc_state *old_crtc_state)
641 + struct drm_atomic_state *state)
643 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
644 struct dpu_crtc_state *cstate = to_dpu_crtc_state(crtc->state);
645 + struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state,
647 struct drm_encoder *encoder;
649 bool release_bandwidth = false;
650 @@ -770,7 +773,7 @@ static void dpu_crtc_disable(struct drm_
653 static void dpu_crtc_enable(struct drm_crtc *crtc,
654 - struct drm_crtc_state *old_crtc_state)
655 + struct drm_atomic_state *state)
657 struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
658 struct drm_encoder *encoder;
659 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
660 +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c
661 @@ -264,7 +264,7 @@ static void mdp4_crtc_mode_set_nofb(stru
664 static void mdp4_crtc_atomic_disable(struct drm_crtc *crtc,
665 - struct drm_crtc_state *old_state)
666 + struct drm_atomic_state *state)
668 struct mdp4_crtc *mdp4_crtc = to_mdp4_crtc(crtc);
669 struct mdp4_kms *mdp4_kms = get_kms(crtc);
670 @@ -284,7 +284,7 @@ static void mdp4_crtc_atomic_disable(str
673 static void mdp4_crtc_atomic_enable(struct drm_crtc *crtc,
674 - struct drm_crtc_state *old_state)
675 + struct drm_atomic_state *state)
677 struct mdp4_crtc *mdp4_crtc = to_mdp4_crtc(crtc);
678 struct mdp4_kms *mdp4_kms = get_kms(crtc);
679 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
680 +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
681 @@ -483,7 +483,7 @@ static u32 mdp5_crtc_get_vblank_counter(
684 static void mdp5_crtc_atomic_disable(struct drm_crtc *crtc,
685 - struct drm_crtc_state *old_state)
686 + struct drm_atomic_state *state)
688 struct mdp5_crtc *mdp5_crtc = to_mdp5_crtc(crtc);
689 struct mdp5_crtc_state *mdp5_cstate = to_mdp5_crtc_state(crtc->state);
690 @@ -529,7 +529,7 @@ static void mdp5_crtc_vblank_on(struct d
693 static void mdp5_crtc_atomic_enable(struct drm_crtc *crtc,
694 - struct drm_crtc_state *old_state)
695 + struct drm_atomic_state *state)
697 struct mdp5_crtc *mdp5_crtc = to_mdp5_crtc(crtc);
698 struct mdp5_crtc_state *mdp5_cstate = to_mdp5_crtc_state(crtc->state);
699 --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
700 +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
701 @@ -343,7 +343,7 @@ static void mxsfb_crtc_atomic_flush(stru
704 static void mxsfb_crtc_atomic_enable(struct drm_crtc *crtc,
705 - struct drm_crtc_state *old_state)
706 + struct drm_atomic_state *state)
708 struct mxsfb_drm_private *mxsfb = to_mxsfb_drm_private(crtc->dev);
709 struct drm_device *drm = mxsfb->drm;
710 @@ -367,7 +367,7 @@ static void mxsfb_crtc_atomic_enable(str
713 static void mxsfb_crtc_atomic_disable(struct drm_crtc *crtc,
714 - struct drm_crtc_state *old_state)
715 + struct drm_atomic_state *state)
717 struct mxsfb_drm_private *mxsfb = to_mxsfb_drm_private(crtc->dev);
718 struct drm_device *drm = mxsfb->drm;
719 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
720 +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
721 @@ -436,7 +436,7 @@ static void omap_crtc_arm_event(struct d
724 static void omap_crtc_atomic_enable(struct drm_crtc *crtc,
725 - struct drm_crtc_state *old_state)
726 + struct drm_atomic_state *state)
728 struct omap_drm_private *priv = crtc->dev->dev_private;
729 struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
730 @@ -462,7 +462,7 @@ static void omap_crtc_atomic_enable(stru
733 static void omap_crtc_atomic_disable(struct drm_crtc *crtc,
734 - struct drm_crtc_state *old_state)
735 + struct drm_atomic_state *state)
737 struct omap_drm_private *priv = crtc->dev->dev_private;
738 struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
739 --- a/drivers/gpu/drm/qxl/qxl_display.c
740 +++ b/drivers/gpu/drm/qxl/qxl_display.c
741 @@ -445,13 +445,13 @@ static const struct drm_framebuffer_func
744 static void qxl_crtc_atomic_enable(struct drm_crtc *crtc,
745 - struct drm_crtc_state *old_state)
746 + struct drm_atomic_state *state)
748 qxl_crtc_update_monitors_config(crtc, "enable");
751 static void qxl_crtc_atomic_disable(struct drm_crtc *crtc,
752 - struct drm_crtc_state *old_state)
753 + struct drm_atomic_state *state)
755 qxl_crtc_update_monitors_config(crtc, "disable");
757 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
758 +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c
759 @@ -710,7 +710,7 @@ static int rcar_du_crtc_atomic_check(str
762 static void rcar_du_crtc_atomic_enable(struct drm_crtc *crtc,
763 - struct drm_crtc_state *old_state)
764 + struct drm_atomic_state *state)
766 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc);
767 struct rcar_du_crtc_state *rstate = to_rcar_crtc_state(crtc->state);
768 @@ -745,8 +745,10 @@ static void rcar_du_crtc_atomic_enable(s
771 static void rcar_du_crtc_atomic_disable(struct drm_crtc *crtc,
772 - struct drm_crtc_state *old_state)
773 + struct drm_atomic_state *state)
775 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
777 struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc);
778 struct rcar_du_crtc_state *rstate = to_rcar_crtc_state(old_state);
779 struct rcar_du_device *rcdu = rcrtc->dev;
780 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
781 +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
782 @@ -693,7 +693,7 @@ static void rockchip_drm_set_win_enabled
785 static void vop_crtc_atomic_disable(struct drm_crtc *crtc,
786 - struct drm_crtc_state *old_state)
787 + struct drm_atomic_state *state)
789 struct vop *vop = to_vop(crtc);
791 @@ -1261,8 +1261,10 @@ static void vop_crtc_atomic_begin(struct
794 static void vop_crtc_atomic_enable(struct drm_crtc *crtc,
795 - struct drm_crtc_state *old_state)
796 + struct drm_atomic_state *state)
798 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
800 struct vop *vop = to_vop(crtc);
801 const struct vop_data *vop_data = vop->data;
802 struct rockchip_crtc_state *s = to_rockchip_crtc_state(crtc->state);
803 --- a/drivers/gpu/drm/sti/sti_crtc.c
804 +++ b/drivers/gpu/drm/sti/sti_crtc.c
808 static void sti_crtc_atomic_enable(struct drm_crtc *crtc,
809 - struct drm_crtc_state *old_state)
810 + struct drm_atomic_state *state)
812 struct sti_mixer *mixer = to_sti_mixer(crtc);
814 @@ -35,7 +35,7 @@ static void sti_crtc_atomic_enable(struc
817 static void sti_crtc_atomic_disable(struct drm_crtc *crtc,
818 - struct drm_crtc_state *old_state)
819 + struct drm_atomic_state *state)
821 struct sti_mixer *mixer = to_sti_mixer(crtc);
823 --- a/drivers/gpu/drm/stm/ltdc.c
824 +++ b/drivers/gpu/drm/stm/ltdc.c
825 @@ -420,7 +420,7 @@ static void ltdc_crtc_update_clut(struct
828 static void ltdc_crtc_atomic_enable(struct drm_crtc *crtc,
829 - struct drm_crtc_state *old_state)
830 + struct drm_atomic_state *state)
832 struct ltdc_device *ldev = crtc_to_ltdc(crtc);
833 struct drm_device *ddev = crtc->dev;
834 @@ -442,7 +442,7 @@ static void ltdc_crtc_atomic_enable(stru
837 static void ltdc_crtc_atomic_disable(struct drm_crtc *crtc,
838 - struct drm_crtc_state *old_state)
839 + struct drm_atomic_state *state)
841 struct ltdc_device *ldev = crtc_to_ltdc(crtc);
842 struct drm_device *ddev = crtc->dev;
843 --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c
844 +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c
845 @@ -101,7 +101,7 @@ static void sun4i_crtc_atomic_flush(stru
848 static void sun4i_crtc_atomic_disable(struct drm_crtc *crtc,
849 - struct drm_crtc_state *old_state)
850 + struct drm_atomic_state *state)
852 struct drm_encoder *encoder = sun4i_crtc_get_encoder(crtc);
853 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc);
854 @@ -122,7 +122,7 @@ static void sun4i_crtc_atomic_disable(st
857 static void sun4i_crtc_atomic_enable(struct drm_crtc *crtc,
858 - struct drm_crtc_state *old_state)
859 + struct drm_atomic_state *state)
861 struct drm_encoder *encoder = sun4i_crtc_get_encoder(crtc);
862 struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc);
863 --- a/drivers/gpu/drm/tegra/dc.c
864 +++ b/drivers/gpu/drm/tegra/dc.c
865 @@ -1748,7 +1748,7 @@ static int tegra_dc_wait_idle(struct teg
868 static void tegra_crtc_atomic_disable(struct drm_crtc *crtc,
869 - struct drm_crtc_state *old_state)
870 + struct drm_atomic_state *state)
872 struct tegra_dc *dc = to_tegra_dc(crtc);
874 @@ -1805,10 +1805,10 @@ static void tegra_crtc_atomic_disable(st
877 static void tegra_crtc_atomic_enable(struct drm_crtc *crtc,
878 - struct drm_crtc_state *old_state)
879 + struct drm_atomic_state *state)
881 struct drm_display_mode *mode = &crtc->state->adjusted_mode;
882 - struct tegra_dc_state *state = to_dc_state(crtc->state);
883 + struct tegra_dc_state *crtc_state = to_dc_state(crtc->state);
884 struct tegra_dc *dc = to_tegra_dc(crtc);
887 @@ -1888,7 +1888,7 @@ static void tegra_crtc_atomic_enable(str
888 tegra_dc_writel(dc, 0, DC_DISP_BORDER_COLOR);
890 /* apply PLL and pixel clock changes */
891 - tegra_dc_commit_state(dc, state);
892 + tegra_dc_commit_state(dc, crtc_state);
894 /* program display mode */
895 tegra_dc_set_timings(dc, mode);
896 --- a/drivers/gpu/drm/tidss/tidss_crtc.c
897 +++ b/drivers/gpu/drm/tidss/tidss_crtc.c
898 @@ -212,8 +212,10 @@ static void tidss_crtc_atomic_flush(stru
901 static void tidss_crtc_atomic_enable(struct drm_crtc *crtc,
902 - struct drm_crtc_state *old_state)
903 + struct drm_atomic_state *state)
905 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
907 struct tidss_crtc *tcrtc = to_tidss_crtc(crtc);
908 struct drm_device *ddev = crtc->dev;
909 struct tidss_device *tidss = to_tidss(ddev);
910 @@ -255,7 +257,7 @@ static void tidss_crtc_atomic_enable(str
913 static void tidss_crtc_atomic_disable(struct drm_crtc *crtc,
914 - struct drm_crtc_state *old_state)
915 + struct drm_atomic_state *state)
917 struct tidss_crtc *tcrtc = to_tidss_crtc(crtc);
918 struct drm_device *ddev = crtc->dev;
919 --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
920 +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
921 @@ -484,7 +484,7 @@ static void tilcdc_crtc_enable(struct dr
924 static void tilcdc_crtc_atomic_enable(struct drm_crtc *crtc,
925 - struct drm_crtc_state *old_state)
926 + struct drm_atomic_state *state)
928 tilcdc_crtc_enable(crtc);
930 @@ -541,7 +541,7 @@ static void tilcdc_crtc_disable(struct d
933 static void tilcdc_crtc_atomic_disable(struct drm_crtc *crtc,
934 - struct drm_crtc_state *old_state)
935 + struct drm_atomic_state *state)
937 tilcdc_crtc_disable(crtc);
939 --- a/drivers/gpu/drm/vboxvideo/vbox_mode.c
940 +++ b/drivers/gpu/drm/vboxvideo/vbox_mode.c
941 @@ -213,12 +213,12 @@ static void vbox_crtc_set_base_and_mode(
944 static void vbox_crtc_atomic_enable(struct drm_crtc *crtc,
945 - struct drm_crtc_state *old_crtc_state)
946 + struct drm_atomic_state *state)
950 static void vbox_crtc_atomic_disable(struct drm_crtc *crtc,
951 - struct drm_crtc_state *old_crtc_state)
952 + struct drm_atomic_state *state)
956 --- a/drivers/gpu/drm/vc4/vc4_crtc.c
957 +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
958 @@ -489,8 +489,10 @@ int vc4_crtc_disable_at_boot(struct drm_
961 static void vc4_crtc_atomic_disable(struct drm_crtc *crtc,
962 - struct drm_crtc_state *old_state)
963 + struct drm_atomic_state *state)
965 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
967 struct vc4_crtc_state *old_vc4_state = to_vc4_crtc_state(old_state);
968 struct drm_device *dev = crtc->dev;
970 @@ -516,8 +518,10 @@ static void vc4_crtc_atomic_disable(stru
973 static void vc4_crtc_atomic_enable(struct drm_crtc *crtc,
974 - struct drm_crtc_state *old_state)
975 + struct drm_atomic_state *state)
977 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
979 struct drm_device *dev = crtc->dev;
980 struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
981 struct drm_encoder *encoder = vc4_get_crtc_encoder(crtc);
982 --- a/drivers/gpu/drm/vc4/vc4_txp.c
983 +++ b/drivers/gpu/drm/vc4/vc4_txp.c
985 #include <linux/of_platform.h>
986 #include <linux/pm_runtime.h>
988 +#include <drm/drm_atomic.h>
989 #include <drm/drm_atomic_helper.h>
990 #include <drm/drm_edid.h>
991 #include <drm/drm_fb_cma_helper.h>
992 @@ -401,15 +402,19 @@ static int vc4_txp_atomic_check(struct d
995 static void vc4_txp_atomic_enable(struct drm_crtc *crtc,
996 - struct drm_crtc_state *old_state)
997 + struct drm_atomic_state *state)
999 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
1001 drm_crtc_vblank_on(crtc);
1002 vc4_hvs_atomic_enable(crtc, old_state);
1005 static void vc4_txp_atomic_disable(struct drm_crtc *crtc,
1006 - struct drm_crtc_state *old_state)
1007 + struct drm_atomic_state *state)
1009 + struct drm_crtc_state *old_state = drm_atomic_get_old_crtc_state(state,
1011 struct drm_device *dev = crtc->dev;
1013 /* Disable vblank irq handling before crtc is disabled. */
1014 --- a/drivers/gpu/drm/virtio/virtgpu_display.c
1015 +++ b/drivers/gpu/drm/virtio/virtgpu_display.c
1016 @@ -95,12 +95,12 @@ static void virtio_gpu_crtc_mode_set_nof
1019 static void virtio_gpu_crtc_atomic_enable(struct drm_crtc *crtc,
1020 - struct drm_crtc_state *old_state)
1021 + struct drm_atomic_state *state)
1025 static void virtio_gpu_crtc_atomic_disable(struct drm_crtc *crtc,
1026 - struct drm_crtc_state *old_state)
1027 + struct drm_atomic_state *state)
1029 struct drm_device *dev = crtc->dev;
1030 struct virtio_gpu_device *vgdev = dev->dev_private;
1031 --- a/drivers/gpu/drm/vkms/vkms_crtc.c
1032 +++ b/drivers/gpu/drm/vkms/vkms_crtc.c
1033 @@ -215,13 +215,13 @@ static int vkms_crtc_atomic_check(struct
1036 static void vkms_crtc_atomic_enable(struct drm_crtc *crtc,
1037 - struct drm_crtc_state *old_state)
1038 + struct drm_atomic_state *state)
1040 drm_crtc_vblank_on(crtc);
1043 static void vkms_crtc_atomic_disable(struct drm_crtc *crtc,
1044 - struct drm_crtc_state *old_state)
1045 + struct drm_atomic_state *state)
1047 drm_crtc_vblank_off(crtc);
1049 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
1050 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
1051 @@ -214,7 +214,7 @@ static void vmw_ldu_crtc_mode_set_nofb(s
1052 * CRTC, it makes more sense to do those at plane update time.
1054 static void vmw_ldu_crtc_atomic_enable(struct drm_crtc *crtc,
1055 - struct drm_crtc_state *old_state)
1056 + struct drm_atomic_state *state)
1060 @@ -224,7 +224,7 @@ static void vmw_ldu_crtc_atomic_enable(s
1061 * @crtc: CRTC to be turned off
1063 static void vmw_ldu_crtc_atomic_disable(struct drm_crtc *crtc,
1064 - struct drm_crtc_state *old_state)
1065 + struct drm_atomic_state *state)
1069 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
1070 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
1071 @@ -279,7 +279,7 @@ static void vmw_sou_crtc_helper_prepare(
1072 * This is called after a mode set has been completed.
1074 static void vmw_sou_crtc_atomic_enable(struct drm_crtc *crtc,
1075 - struct drm_crtc_state *old_state)
1076 + struct drm_atomic_state *state)
1080 @@ -289,7 +289,7 @@ static void vmw_sou_crtc_atomic_enable(s
1081 * @crtc: CRTC to be turned off
1083 static void vmw_sou_crtc_atomic_disable(struct drm_crtc *crtc,
1084 - struct drm_crtc_state *old_state)
1085 + struct drm_atomic_state *state)
1087 struct vmw_private *dev_priv;
1088 struct vmw_screen_object_unit *sou;
1089 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
1090 +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
1091 @@ -408,12 +408,12 @@ static void vmw_stdu_crtc_helper_prepare
1094 static void vmw_stdu_crtc_atomic_enable(struct drm_crtc *crtc,
1095 - struct drm_crtc_state *old_state)
1096 + struct drm_atomic_state *state)
1100 static void vmw_stdu_crtc_atomic_disable(struct drm_crtc *crtc,
1101 - struct drm_crtc_state *old_state)
1102 + struct drm_atomic_state *state)
1104 struct vmw_private *dev_priv;
1105 struct vmw_screen_target_display_unit *stdu;
1106 --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c
1107 +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c
1108 @@ -1441,7 +1441,7 @@ static int zynqmp_disp_crtc_setup_clock(
1111 zynqmp_disp_crtc_atomic_enable(struct drm_crtc *crtc,
1112 - struct drm_crtc_state *old_crtc_state)
1113 + struct drm_atomic_state *state)
1115 struct zynqmp_disp *disp = crtc_to_disp(crtc);
1116 struct drm_display_mode *adjusted_mode = &crtc->state->adjusted_mode;
1117 @@ -1472,8 +1472,10 @@ zynqmp_disp_crtc_atomic_enable(struct dr
1120 zynqmp_disp_crtc_atomic_disable(struct drm_crtc *crtc,
1121 - struct drm_crtc_state *old_crtc_state)
1122 + struct drm_atomic_state *state)
1124 + struct drm_crtc_state *old_crtc_state = drm_atomic_get_old_crtc_state(state,
1126 struct zynqmp_disp *disp = crtc_to_disp(crtc);
1127 struct drm_plane_state *old_plane_state;
1129 --- a/drivers/gpu/drm/zte/zx_vou.c
1130 +++ b/drivers/gpu/drm/zte/zx_vou.c
1131 @@ -350,7 +350,7 @@ static inline void vou_chn_set_update(st
1134 static void zx_crtc_atomic_enable(struct drm_crtc *crtc,
1135 - struct drm_crtc_state *old_state)
1136 + struct drm_atomic_state *state)
1138 struct drm_display_mode *mode = &crtc->state->adjusted_mode;
1139 bool interlaced = mode->flags & DRM_MODE_FLAG_INTERLACE;
1140 @@ -455,7 +455,7 @@ static void zx_crtc_atomic_enable(struct
1143 static void zx_crtc_atomic_disable(struct drm_crtc *crtc,
1144 - struct drm_crtc_state *old_state)
1145 + struct drm_atomic_state *state)
1147 struct zx_crtc *zcrtc = to_zx_crtc(crtc);
1148 const struct zx_crtc_bits *bits = zcrtc->bits;
1149 --- a/include/drm/drm_modeset_helper_vtables.h
1150 +++ b/include/drm/drm_modeset_helper_vtables.h
1151 @@ -417,14 +417,10 @@ struct drm_crtc_helper_funcs {
1152 * @atomic_enable must be the inverse of @atomic_disable for atomic
1155 - * Drivers can use the @old_crtc_state input parameter if the operations
1156 - * needed to enable the CRTC don't depend solely on the new state but
1157 - * also on the transition between the old state and the new state.
1159 * This function is optional.
1161 void (*atomic_enable)(struct drm_crtc *crtc,
1162 - struct drm_crtc_state *old_crtc_state);
1163 + struct drm_atomic_state *state);
1167 @@ -441,15 +437,10 @@ struct drm_crtc_helper_funcs {
1168 * need to implement it if there's no need to disable anything at the
1171 - * Comparing to @disable, this one provides the additional input
1172 - * parameter @old_crtc_state which could be used to access the old
1173 - * state. Atomic drivers should consider to use this one instead
1176 * This function is optional.
1178 void (*atomic_disable)(struct drm_crtc *crtc,
1179 - struct drm_crtc_state *old_crtc_state);
1180 + struct drm_atomic_state *state);
1183 * @get_scanout_position: