drm/vmwgfx: Don't clear mode::type anymore
authorDeepak Rawat <drawat@vmware.com>
Thu, 27 Sep 2018 00:17:33 +0000 (17:17 -0700)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 5 Dec 2018 09:00:43 +0000 (10:00 +0100)
With kernel commit "drm/modes: Kill off the oddball DRM_MODE_TYPE_CRTC_C
vs. DRM_MODE_TYPE_BUILTIN handling", no need to clear mode::type for
user-space bug.

Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

index 21228b3b1ed75d773c589836cd77b8fdf97d9dab..d8573e7e85338cd773411f1286950b024c8cbfb7 100644 (file)
@@ -2812,28 +2812,6 @@ vmw_kms_create_implicit_placement_property(struct vmw_private *dev_priv,
 
 }
 
-
-/**
- * vmw_kms_set_config - Wrapper around drm_atomic_helper_set_config
- *
- * @set: The configuration to set.
- *
- * The vmwgfx Xorg driver doesn't assign the mode::type member, which
- * when drm_mode_set_crtcinfo is called as part of the configuration setting
- * causes it to return incorrect crtc dimensions causing severe problems in
- * the vmwgfx modesetting. So explicitly clear that member before calling
- * into drm_atomic_helper_set_config.
- */
-int vmw_kms_set_config(struct drm_mode_set *set,
-                      struct drm_modeset_acquire_ctx *ctx)
-{
-       if (set && set->mode)
-               set->mode->type = 0;
-
-       return drm_atomic_helper_set_config(set, ctx);
-}
-
-
 /**
  * vmw_kms_suspend - Save modesetting state and turn modesetting off.
  *
index 3e8b8b3d33aa5fcab525f9624641b406b0fd88fd..bc5bccf1db42d3309b74dae516bb71086bd4bdf7 100644 (file)
@@ -572,9 +572,6 @@ int vmw_kms_stdu_dma(struct vmw_private *dev_priv,
                     bool interruptible,
                     struct drm_crtc *crtc);
 
-int vmw_kms_set_config(struct drm_mode_set *set,
-                      struct drm_modeset_acquire_ctx *ctx);
-
 int vmw_du_helper_plane_update(struct vmw_du_update_plane *update);
 
 /**
index 4b5378495eea78718ae37adab77f488642d34968..aa083ac0dc18440ac253882779f34f77c2112b93 100644 (file)
@@ -233,7 +233,7 @@ static const struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
        .reset = vmw_du_crtc_reset,
        .atomic_duplicate_state = vmw_du_crtc_duplicate_state,
        .atomic_destroy_state = vmw_du_crtc_destroy_state,
-       .set_config = vmw_kms_set_config,
+       .set_config = drm_atomic_helper_set_config,
 };
 
 
index 7a1187e56ce66e7f7585c886e7caf5ceb83d0b5b..eb4c94fe1044f0f70a0174fb1cc0aa9739cf90a5 100644 (file)
@@ -353,7 +353,7 @@ static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
        .reset = vmw_du_crtc_reset,
        .atomic_duplicate_state = vmw_du_crtc_duplicate_state,
        .atomic_destroy_state = vmw_du_crtc_destroy_state,
-       .set_config = vmw_kms_set_config,
+       .set_config = drm_atomic_helper_set_config,
        .page_flip = vmw_sou_crtc_page_flip,
 };
 
index 4a060e6e8297cdce1ddc09d03447425f912f4551..9f645aa00c48970e74c814163dc8c955ce9268d0 100644 (file)
@@ -990,7 +990,7 @@ static const struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
        .reset = vmw_du_crtc_reset,
        .atomic_duplicate_state = vmw_du_crtc_duplicate_state,
        .atomic_destroy_state = vmw_du_crtc_destroy_state,
-       .set_config = vmw_kms_set_config,
+       .set_config = drm_atomic_helper_set_config,
        .page_flip = vmw_stdu_crtc_page_flip,
 };