]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/vmwgfx: Convert to CRTC VBLANK callbacks
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 23 Jan 2020 13:59:41 +0000 (14:59 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 13 Feb 2020 12:10:10 +0000 (13:10 +0100)
VBLANK callbacks in struct drm_driver are deprecated in favor of
their equivalents in struct drm_crtc_funcs. Convert vmwgfx over.

v2:
* remove accidental whitespace fixes

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200123135943.24140-21-tzimmermann@suse.de
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

index e962048f65d20f2618923ecea8ec905952226fb1..673d6920fc298a2e6c244f9e686a8df8854714e5 100644 (file)
@@ -1393,9 +1393,6 @@ static struct drm_driver driver = {
        DRIVER_MODESET | DRIVER_RENDER | DRIVER_ATOMIC,
        .load = vmw_driver_load,
        .unload = vmw_driver_unload,
-       .get_vblank_counter = vmw_get_vblank_counter,
-       .enable_vblank = vmw_enable_vblank,
-       .disable_vblank = vmw_disable_vblank,
        .ioctls = vmw_ioctls,
        .num_ioctls = ARRAY_SIZE(vmw_ioctls),
        .master_set = vmw_master_set,
index a31e726d6d712297225f1ddd2f128ea8dcd4fade..845b3b8c29ca172ce340132ea7c8b476c0f40eb4 100644 (file)
@@ -1100,9 +1100,9 @@ int vmw_kms_write_svga(struct vmw_private *vmw_priv,
 bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv,
                                uint32_t pitch,
                                uint32_t height);
-u32 vmw_get_vblank_counter(struct drm_device *dev, unsigned int pipe);
-int vmw_enable_vblank(struct drm_device *dev, unsigned int pipe);
-void vmw_disable_vblank(struct drm_device *dev, unsigned int pipe);
+u32 vmw_get_vblank_counter(struct drm_crtc *crtc);
+int vmw_enable_vblank(struct drm_crtc *crtc);
+void vmw_disable_vblank(struct drm_crtc *crtc);
 int vmw_kms_present(struct vmw_private *dev_priv,
                    struct drm_file *file_priv,
                    struct vmw_framebuffer *vfb,
index f47d5710cc9515840883db080991fe98bb320915..eb6e23e8d8ef722b3d07c31bf8f49a186b362fba 100644 (file)
@@ -1991,7 +1991,7 @@ bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv,
 /**
  * Function called by DRM code called with vbl_lock held.
  */
-u32 vmw_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
+u32 vmw_get_vblank_counter(struct drm_crtc *crtc)
 {
        return 0;
 }
@@ -1999,7 +1999,7 @@ u32 vmw_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
 /**
  * Function called by DRM code called with vbl_lock held.
  */
-int vmw_enable_vblank(struct drm_device *dev, unsigned int pipe)
+int vmw_enable_vblank(struct drm_crtc *crtc)
 {
        return -EINVAL;
 }
@@ -2007,7 +2007,7 @@ int vmw_enable_vblank(struct drm_device *dev, unsigned int pipe)
 /**
  * Function called by DRM code called with vbl_lock held.
  */
-void vmw_disable_vblank(struct drm_device *dev, unsigned int pipe)
+void vmw_disable_vblank(struct drm_crtc *crtc)
 {
 }
 
index 5702219ec38f64a209b126699911b4be314a65ba..16dafff5cab19f13d0023daae64a5be78eb251ac 100644 (file)
@@ -236,6 +236,9 @@ static const struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
        .atomic_duplicate_state = vmw_du_crtc_duplicate_state,
        .atomic_destroy_state = vmw_du_crtc_destroy_state,
        .set_config = drm_atomic_helper_set_config,
+       .get_vblank_counter = vmw_get_vblank_counter,
+       .enable_vblank = vmw_enable_vblank,
+       .disable_vblank = vmw_disable_vblank,
 };
 
 
index e5a283263211fc8cb18bd70d9e21c3cf5a42842a..32a22e4eddb1a334352e0c30c980881f86fe1990 100644 (file)
@@ -319,6 +319,9 @@ static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
        .atomic_destroy_state = vmw_du_crtc_destroy_state,
        .set_config = drm_atomic_helper_set_config,
        .page_flip = drm_atomic_helper_page_flip,
+       .get_vblank_counter = vmw_get_vblank_counter,
+       .enable_vblank = vmw_enable_vblank,
+       .disable_vblank = vmw_disable_vblank,
 };
 
 /*
index 41a96fb49835702ba56fc91f533ff241b21a227a..570687a1a327f40a4b4f6f2fe8b75b86987b53f3 100644 (file)
@@ -916,6 +916,9 @@ static const struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
        .atomic_destroy_state = vmw_du_crtc_destroy_state,
        .set_config = drm_atomic_helper_set_config,
        .page_flip = drm_atomic_helper_page_flip,
+       .get_vblank_counter = vmw_get_vblank_counter,
+       .enable_vblank = vmw_enable_vblank,
+       .disable_vblank = vmw_disable_vblank,
 };