From: Thomas Hellstrom <thellstrom@vmware.com>
To: airlied@gmail.com
Cc: Thomas Hellstrom <thellstrom@vmware.com>,
dri-devel@lists.freedesktop.org
Subject: [PATCH 1/5] vmwgfx: Screen object cleanups
Date: Wed, 2 Nov 2011 09:43:08 +0100 [thread overview]
Message-ID: <1320223393-10540-2-git-send-email-thellstrom@vmware.com> (raw)
In-Reply-To: <1320223393-10540-1-git-send-email-thellstrom@vmware.com>
Remove unused member.
No need to pin / unpin fb.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
---
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
next prev parent reply other threads:[~2011-11-02 8:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-02 8:43 [PATCH -fixes 0/5] vmwgfx fixes Thomas Hellstrom
2011-11-02 8:43 ` Thomas Hellstrom [this message]
2011-11-02 8:43 ` [PATCH 2/5] vmwgfx: Remove screen object active list Thomas Hellstrom
2011-11-02 8:43 ` [PATCH 3/5] vmwgfx: Make the preferred autofit mode have a 60Hz vrefresh Thomas Hellstrom
2011-11-02 8:43 ` [PATCH 4/5] vmwgfx: Infrastructure for explicit placement Thomas Hellstrom
2011-11-02 8:43 ` [PATCH 5/5] vmwgfx: Fix hw cursor position Thomas Hellstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1320223393-10540-2-git-send-email-thellstrom@vmware.com \
--to=thellstrom@vmware.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox