Skip to content

Commit b4fa61b

Browse files
deepak-rawatthomashvmw
authored andcommitted
drm/vmwgfx: Don't clear mode::type anymore
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>
1 parent 2f5544f commit b4fa61b

File tree

5 files changed

+3
-28
lines changed

5 files changed

+3
-28
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,28 +2812,6 @@ vmw_kms_create_implicit_placement_property(struct vmw_private *dev_priv,
28122812

28132813
}
28142814

2815-
2816-
/**
2817-
* vmw_kms_set_config - Wrapper around drm_atomic_helper_set_config
2818-
*
2819-
* @set: The configuration to set.
2820-
*
2821-
* The vmwgfx Xorg driver doesn't assign the mode::type member, which
2822-
* when drm_mode_set_crtcinfo is called as part of the configuration setting
2823-
* causes it to return incorrect crtc dimensions causing severe problems in
2824-
* the vmwgfx modesetting. So explicitly clear that member before calling
2825-
* into drm_atomic_helper_set_config.
2826-
*/
2827-
int vmw_kms_set_config(struct drm_mode_set *set,
2828-
struct drm_modeset_acquire_ctx *ctx)
2829-
{
2830-
if (set && set->mode)
2831-
set->mode->type = 0;
2832-
2833-
return drm_atomic_helper_set_config(set, ctx);
2834-
}
2835-
2836-
28372815
/**
28382816
* vmw_kms_suspend - Save modesetting state and turn modesetting off.
28392817
*

drivers/gpu/drm/vmwgfx/vmwgfx_kms.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,6 @@ int vmw_kms_stdu_dma(struct vmw_private *dev_priv,
572572
bool interruptible,
573573
struct drm_crtc *crtc);
574574

575-
int vmw_kms_set_config(struct drm_mode_set *set,
576-
struct drm_modeset_acquire_ctx *ctx);
577-
578575
int vmw_du_helper_plane_update(struct vmw_du_update_plane *update);
579576

580577
/**

drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static const struct drm_crtc_funcs vmw_legacy_crtc_funcs = {
233233
.reset = vmw_du_crtc_reset,
234234
.atomic_duplicate_state = vmw_du_crtc_duplicate_state,
235235
.atomic_destroy_state = vmw_du_crtc_destroy_state,
236-
.set_config = vmw_kms_set_config,
236+
.set_config = drm_atomic_helper_set_config,
237237
};
238238

239239

drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = {
353353
.reset = vmw_du_crtc_reset,
354354
.atomic_duplicate_state = vmw_du_crtc_duplicate_state,
355355
.atomic_destroy_state = vmw_du_crtc_destroy_state,
356-
.set_config = vmw_kms_set_config,
356+
.set_config = drm_atomic_helper_set_config,
357357
.page_flip = vmw_sou_crtc_page_flip,
358358
};
359359

drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ static const struct drm_crtc_funcs vmw_stdu_crtc_funcs = {
990990
.reset = vmw_du_crtc_reset,
991991
.atomic_duplicate_state = vmw_du_crtc_duplicate_state,
992992
.atomic_destroy_state = vmw_du_crtc_destroy_state,
993-
.set_config = vmw_kms_set_config,
993+
.set_config = drm_atomic_helper_set_config,
994994
.page_flip = vmw_stdu_crtc_page_flip,
995995
};
996996

0 commit comments

Comments
 (0)