[libvirt] [PATCH] Support for 3d Acceleration in video tag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I have added support for 3d Acceleration in the video tag, the patch for the 
same is attached here.

Regards,
Pritesh
commit c2bfc05a3dd0176396ba55c3c7fc3c004323c9d9
Author: Pritesh Kothari <Pritesh.Kothari@xxxxxxx>
Date:   Mon Aug 10 13:38:45 2009 +0200

    libvirt: support for 3d Acceleration in video tag

diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index f857301..71c9069 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -814,6 +814,14 @@
               <ref name="unsignedInt"/>
             </attribute>
           </optional>
+          <optional>
+            <attribute name="support3d">
+              <choice>
+                <value>yes</value>
+                <value>no</value>
+              </choice>
+            </attribute>
+          </optional>
 	</element>
       </optional>
     </element>
diff --git a/src/domain_conf.c b/src/domain_conf.c
index 2301a96..fdefe85 100644
--- a/src/domain_conf.c
+++ b/src/domain_conf.c
@@ -1784,6 +1784,7 @@ virDomainVideoDefParseXML(virConnectPtr conn,
     char *type = NULL;
     char *heads = NULL;
     char *vram = NULL;
+    char *support3d = NULL;
 
     if (VIR_ALLOC(def) < 0) {
         virReportOOMError(conn);
@@ -1793,11 +1794,13 @@ virDomainVideoDefParseXML(virConnectPtr conn,
     cur = node->children;
     while (cur != NULL) {
         if (cur->type == XML_ELEMENT_NODE) {
-            if ((type == NULL) && (vram == NULL) && (heads == NULL) &&
+            if ((type == NULL) && (vram == NULL) &&
+                (heads == NULL) && (support3d == NULL) &&
                 xmlStrEqual(cur->name, BAD_CAST "model")) {
                 type = virXMLPropString(cur, "type");
                 vram = virXMLPropString(cur, "vram");
                 heads = virXMLPropString(cur, "heads");
+                support3d = virXMLPropString(cur, "support3d");
             }
         }
         cur = cur->next;
@@ -1837,6 +1840,12 @@ virDomainVideoDefParseXML(virConnectPtr conn,
         def->heads = 1;
     }
 
+    if (support3d != NULL) {
+        if (STREQ(support3d, "yes"))
+            def->support3d = 1;
+        VIR_FREE(support3d);
+    }
+
     VIR_FREE(type);
     VIR_FREE(vram);
     VIR_FREE(heads);
@@ -1848,6 +1857,7 @@ error:
     VIR_FREE(type);
     VIR_FREE(vram);
     VIR_FREE(heads);
+    VIR_FREE(support3d);
     return NULL;
 }
 
@@ -3806,6 +3816,9 @@ virDomainVideoDefFormat(virConnectPtr conn,
         virBufferVSprintf(buf, " vram='%u'", def->vram);
     if (def->heads)
         virBufferVSprintf(buf, " heads='%u'", def->heads);
+
+    virBufferVSprintf(buf, " support3d='%s'", def->support3d ? "yes" : "no");
+
     virBufferAddLit(buf, "/>\n");
     virBufferAddLit(buf, "    </video>\n");
 
diff --git a/src/domain_conf.h b/src/domain_conf.h
index 63fca76..7f619ff 100644
--- a/src/domain_conf.h
+++ b/src/domain_conf.h
@@ -313,6 +313,7 @@ struct _virDomainVideoDef {
     int type;
     unsigned int vram;
     unsigned int heads;
+    int support3d : 1;
 };
 
 /* 3 possible graphics console modes */
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]