aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2017-06-30 05:36:44 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-06-30 08:53:14 -0400
commit0b20a0f8c3cb6f74fe326101b62eeb5e2c56a53c (patch)
treea0710ff9f78eca95996537f90f9b965e3ddc8823 /drivers/gpu/drm/tilcdc/tilcdc_crtc.c
parentf1e8c67123cf171e2b0357e885e426328b241d7d (diff)
drm: Add old state pointer to CRTC .enable() helper function
The old state is useful for drivers that need to perform operations at enable time that depend on the transition between the old and new states. While at it, rename the operation to .atomic_enable() to be consistent with .atomic_disable(), as the .enable() operation is used by atomic helpers only. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> # for sun4i Acked-by: Philipp Zabel <p.zabel@pengutronix.de> # for imx-drm and mediatek Acked-by: Alexey Brodkin <abrodkin@synopsys.com> # for arcpgu Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> # for atmel-hlcdc Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> # for hdlcd and mali-dp Acked-by: Stefan Agner <stefan@agner.ch> # for fsl-dcu Tested-by: Philippe Cornu <philippe.cornu@st.com> # for stm Acked-by: Philippe Cornu <philippe.cornu@st.com> # for stm Acked-by: Vincent Abriou <vincent.abriou@st.com> # for sti Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> # for vmwgfx Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20170630093646.7928-2-laurent.pinchart+renesas@ideasonboard.com
Diffstat (limited to 'drivers/gpu/drm/tilcdc/tilcdc_crtc.c')
-rw-r--r--drivers/gpu/drm/tilcdc/tilcdc_crtc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
index d524ed0d5146..6c5892763d27 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c
@@ -504,6 +504,12 @@ static void tilcdc_crtc_enable(struct drm_crtc *crtc)
504 mutex_unlock(&tilcdc_crtc->enable_lock); 504 mutex_unlock(&tilcdc_crtc->enable_lock);
505} 505}
506 506
507static void tilcdc_crtc_atomic_enable(struct drm_crtc *crtc,
508 struct drm_crtc_state *old_state)
509{
510 tilcdc_crtc_enable(crtc);
511}
512
507static void tilcdc_crtc_off(struct drm_crtc *crtc, bool shutdown) 513static void tilcdc_crtc_off(struct drm_crtc *crtc, bool shutdown)
508{ 514{
509 struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc); 515 struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
@@ -729,9 +735,9 @@ static const struct drm_crtc_funcs tilcdc_crtc_funcs = {
729 735
730static const struct drm_crtc_helper_funcs tilcdc_crtc_helper_funcs = { 736static const struct drm_crtc_helper_funcs tilcdc_crtc_helper_funcs = {
731 .mode_fixup = tilcdc_crtc_mode_fixup, 737 .mode_fixup = tilcdc_crtc_mode_fixup,
732 .enable = tilcdc_crtc_enable,
733 .disable = tilcdc_crtc_disable, 738 .disable = tilcdc_crtc_disable,
734 .atomic_check = tilcdc_crtc_atomic_check, 739 .atomic_check = tilcdc_crtc_atomic_check,
740 .atomic_enable = tilcdc_crtc_atomic_enable,
735}; 741};
736 742
737int tilcdc_crtc_max_width(struct drm_crtc *crtc) 743int tilcdc_crtc_max_width(struct drm_crtc *crtc)