From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Hellstrom Subject: [PATCH 1/5] vmwgfx: Screen object cleanups Date: Wed, 2 Nov 2011 09:43:08 +0100 Message-ID: <1320223393-10540-2-git-send-email-thellstrom@vmware.com> References: <1320223393-10540-1-git-send-email-thellstrom@vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-outbound-1.vmware.com (smtp-outbound-1.vmware.com [65.115.85.69]) by gabe.freedesktop.org (Postfix) with ESMTP id E904E9E74C for ; Wed, 2 Nov 2011 01:47:07 -0700 (PDT) In-Reply-To: <1320223393-10540-1-git-send-email-thellstrom@vmware.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: airlied@gmail.com Cc: Thomas Hellstrom , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Remove unused member. No need to pin / unpin fb. Signed-off-by: Thomas Hellstrom Reviewed-by: Jakob Bornecrantz --- 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 0660d3c..edfecc7 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 { struct list_head active; unsigned num_active; - unsigned last_num_active; struct vmw_framebuffer *fb; }; @@ -84,12 +83,8 @@ static int vmw_sou_del_active(struct vmw_private *vmw_priv, /* Must init otherwise list_empty(&sou->active) will not work. */ list_del_init(&sou->active); - if (--(ld->num_active) == 0) { - BUG_ON(!ld->fb); - if (ld->fb->unpin) - ld->fb->unpin(ld->fb); + if (--(ld->num_active) == 0) ld->fb = NULL; - } return 0; } @@ -103,13 +98,7 @@ static int vmw_sou_add_active(struct vmw_private *vmw_priv, struct list_head *at; BUG_ON(!ld->num_active && ld->fb); - if (vfb != ld->fb) { - if (ld->fb && ld->fb->unpin) - ld->fb->unpin(ld->fb); - if (vfb->pin) - vfb->pin(vfb); - ld->fb = vfb; - } + ld->fb = vfb; if (!list_empty(&sou->active)) return 0; @@ -522,7 +511,6 @@ int vmw_kms_init_screen_object_display(struct vmw_private *dev_priv) INIT_LIST_HEAD(&dev_priv->sou_priv->active); dev_priv->sou_priv->num_active = 0; - dev_priv->sou_priv->last_num_active = 0; dev_priv->sou_priv->fb = NULL; ret = drm_vblank_init(dev, VMWGFX_NUM_DISPLAY_UNITS); -- 1.7.4.4