]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/stm: move enable/disable_vblank to crtc
authorPhilippe CORNU <philippe.cornu@st.com>
Sat, 7 Apr 2018 21:29:37 +0000 (23:29 +0200)
committerPhilippe Cornu <philippe.cornu@st.com>
Thu, 19 Apr 2018 10:03:11 +0000 (12:03 +0200)
enable/disable_vblank() functions at drm_driver level
are deprecated. Move them to the ltdc drm_crtc_funcs
structure.

Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
Reviewed-by: Vincent Abriou <vincent.abriou@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180407212937.30407-1-philippe.cornu@st.com
drivers/gpu/drm/stm/drv.c
drivers/gpu/drm/stm/ltdc.c
drivers/gpu/drm/stm/ltdc.h

index 9ab00a87f7cc87c8c00b1806b7f7a9f7b7b2f253..8698e08313e1ef4411b8568116582ffb8adfcf03 100644 (file)
@@ -72,8 +72,6 @@ static struct drm_driver drv_driver = {
        .gem_prime_vmap = drm_gem_cma_prime_vmap,
        .gem_prime_vunmap = drm_gem_cma_prime_vunmap,
        .gem_prime_mmap = drm_gem_cma_prime_mmap,
-       .enable_vblank = ltdc_crtc_enable_vblank,
-       .disable_vblank = ltdc_crtc_disable_vblank,
 };
 
 static int drv_load(struct drm_device *ddev)
index 1a3277e483d529e3e8906806b7943588ead830fe..2b745cfc9000e8917ef7a6676ab21dfa1ba49b26 100644 (file)
@@ -569,9 +569,9 @@ static const struct drm_crtc_helper_funcs ltdc_crtc_helper_funcs = {
        .atomic_disable = ltdc_crtc_atomic_disable,
 };
 
-int ltdc_crtc_enable_vblank(struct drm_device *ddev, unsigned int pipe)
+static int ltdc_crtc_enable_vblank(struct drm_crtc *crtc)
 {
-       struct ltdc_device *ldev = ddev->dev_private;
+       struct ltdc_device *ldev = crtc_to_ltdc(crtc);
 
        DRM_DEBUG_DRIVER("\n");
        reg_set(ldev->regs, LTDC_IER, IER_LIE);
@@ -579,9 +579,9 @@ int ltdc_crtc_enable_vblank(struct drm_device *ddev, unsigned int pipe)
        return 0;
 }
 
-void ltdc_crtc_disable_vblank(struct drm_device *ddev, unsigned int pipe)
+static void ltdc_crtc_disable_vblank(struct drm_crtc *crtc)
 {
-       struct ltdc_device *ldev = ddev->dev_private;
+       struct ltdc_device *ldev = crtc_to_ltdc(crtc);
 
        DRM_DEBUG_DRIVER("\n");
        reg_clear(ldev->regs, LTDC_IER, IER_LIE);
@@ -594,6 +594,8 @@ static const struct drm_crtc_funcs ltdc_crtc_funcs = {
        .reset = drm_atomic_helper_crtc_reset,
        .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
        .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
+       .enable_vblank = ltdc_crtc_enable_vblank,
+       .disable_vblank = ltdc_crtc_disable_vblank,
        .gamma_set = drm_atomic_helper_legacy_gamma_set,
 };
 
index edb268129c543838ba9f58bb2d812252bda21a0e..61a80d00bc3b1de92820046ad56392c1e0039315 100644 (file)
@@ -29,8 +29,6 @@ struct ltdc_device {
        u32 irq_status;
 };
 
-int ltdc_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe);
-void ltdc_crtc_disable_vblank(struct drm_device *dev, unsigned int pipe);
 int ltdc_load(struct drm_device *ddev);
 void ltdc_unload(struct drm_device *ddev);