diff options
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c index 0660d3c6b82..edfecc79d95 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | |||
@@ -39,7 +39,6 @@ struct vmw_screen_object_display { | |||
39 | struct list_head active; | 39 | struct list_head active; |
40 | 40 | ||
41 | unsigned num_active; | 41 | unsigned num_active; |
42 | unsigned last_num_active; | ||
43 | 42 | ||
44 | struct vmw_framebuffer *fb; | 43 | struct vmw_framebuffer *fb; |
45 | }; | 44 | }; |
@@ -84,12 +83,8 @@ static int vmw_sou_del_active(struct vmw_private *vmw_priv, | |||
84 | 83 | ||
85 | /* Must init otherwise list_empty(&sou->active) will not work. */ | 84 | /* Must init otherwise list_empty(&sou->active) will not work. */ |
86 | list_del_init(&sou->active); | 85 | list_del_init(&sou->active); |
87 | if (--(ld->num_active) == 0) { | 86 | if (--(ld->num_active) == 0) |
88 | BUG_ON(!ld->fb); | ||
89 | if (ld->fb->unpin) | ||
90 | ld->fb->unpin(ld->fb); | ||
91 | ld->fb = NULL; | 87 | ld->fb = NULL; |
92 | } | ||
93 | 88 | ||
94 | return 0; | 89 | return 0; |
95 | } | 90 | } |
@@ -103,13 +98,7 @@ static int vmw_sou_add_active(struct vmw_private *vmw_priv, | |||
103 | struct list_head *at; | 98 | struct list_head *at; |
104 | 99 | ||
105 | BUG_ON(!ld->num_active && ld->fb); | 100 | BUG_ON(!ld->num_active && ld->fb); |
106 | if (vfb != ld->fb) { | 101 | ld->fb = vfb; |
107 | if (ld->fb && ld->fb->unpin) | ||
108 | ld->fb->unpin(ld->fb); | ||
109 | if (vfb->pin) | ||
110 | vfb->pin(vfb); | ||
111 | ld->fb = vfb; | ||
112 | } | ||
113 | 102 | ||
114 | if (!list_empty(&sou->active)) | 103 | if (!list_empty(&sou->active)) |
115 | return 0; | 104 | return 0; |
@@ -522,7 +511,6 @@ int vmw_kms_init_screen_object_display(struct vmw_private *dev_priv) | |||
522 | 511 | ||
523 | INIT_LIST_HEAD(&dev_priv->sou_priv->active); | 512 | INIT_LIST_HEAD(&dev_priv->sou_priv->active); |
524 | dev_priv->sou_priv->num_active = 0; | 513 | dev_priv->sou_priv->num_active = 0; |
525 | dev_priv->sou_priv->last_num_active = 0; | ||
526 | dev_priv->sou_priv->fb = NULL; | 514 | dev_priv->sou_priv->fb = NULL; |
527 | 515 | ||
528 | ret = drm_vblank_init(dev, VMWGFX_NUM_DISPLAY_UNITS); | 516 | ret = drm_vblank_init(dev, VMWGFX_NUM_DISPLAY_UNITS); |