diff mbox series

[v3,18/18] drm/vmwgfx: Don't clear mode::type anymore

Message ID 20181011001657.1715-18-drawat@vmware.com (mailing list archive)
State New, archived
Headers show
Series [v3,01/18] drm: Add a new plane property to send damage during plane update | expand

Commit Message

Deepak Singh Rawat Oct. 11, 2018, 12:16 a.m. UTC
With kernel commit 4f09c77b5c3b7, no need to clear mode::type for
user-space bug.

Signed-off-by: Deepak Rawat <drawat@vmware.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c  | 22 ----------------------
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h  |  3 ---
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c  |  2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |  2 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c |  2 +-
 5 files changed, 3 insertions(+), 28 deletions(-)

Comments

Thomas Hellstrom Oct. 15, 2018, 1:12 p.m. UTC | #1
On 10/11/2018 02:16 AM, Deepak Rawat wrote:
> With kernel commit 4f09c77b5c3b7, no need to clear mode::type for
> user-space bug.

That commit-id will change as soon as we put the commit on vmwgfx-next. 
I'd recomment citing the commit title instead.
/Thomas

>
> Signed-off-by: Deepak Rawat <drawat@vmware.com>
> ---
>   drivers/gpu/drm/vmwgfx/vmwgfx_kms.c  | 22 ----------------------
>   drivers/gpu/drm/vmwgfx/vmwgfx_kms.h  |  3 ---
>   drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c  |  2 +-
>   drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |  2 +-
>   drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c |  2 +-
>   5 files changed, 3 insertions(+), 28 deletions(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> index 21dcb46a233b..12ce38bb6846 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
> @@ -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.
>    *
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
> index 3e8b8b3d33aa..bc5bccf1db42 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
> @@ -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);
>   
>   /**
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
> index 723578117191..b909fbc540ff 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
> @@ -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,
>   };
>   
>   
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> index 77521075e803..09118ca199fa 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> @@ -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,
>   };
>   
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> index ae9063482141..b5245a9b5608 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> @@ -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,
>   };
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 21dcb46a233b..12ce38bb6846 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -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.
  *
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
index 3e8b8b3d33aa..bc5bccf1db42 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
@@ -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);
 
 /**
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
index 723578117191..b909fbc540ff 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c
@@ -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,
 };
 
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
index 77521075e803..09118ca199fa 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
@@ -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,
 };
 
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
index ae9063482141..b5245a9b5608 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
@@ -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,
 };