vmwgfx: Optimize the command submission resource list

Use a list for resources referenced during command submission, instead of
an array.
As long as we don't implement parallell command submission this works fine
and simplifies things a bit.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Thomas Hellstrom
2011-10-04 20:13:31 +02:00
committed by Dave Airlie
parent e2fa3a7683
commit f18c8840be
3 changed files with 26 additions and 30 deletions

View File

@@ -127,6 +127,7 @@ static int vmw_resource_init(struct vmw_private *dev_priv,
res->avail = false;
res->dev_priv = dev_priv;
INIT_LIST_HEAD(&res->query_head);
INIT_LIST_HEAD(&res->validate_head);
do {
if (unlikely(idr_pre_get(idr, GFP_KERNEL) == 0))
return -ENOMEM;