ok, so I just tested that this actually works on my n900.

You need to use upstream and apply two patches on top of it, both
attached (the first was also sent to the list for review).

The resolution is still an issue.

Btw what's the cpu on the n800? what does cat /proc/cpuinfo say, and uname -a?


----- "Alon Levy" <al...@redhat.com> wrote:

> I just pushed some of the fixes to upstream spice
> (git://anongit.freedesktop.org/spice/spice)
> 
> It is broken now with the autogenerated protocol. I'm trying to fix
> that. I'll update you.
> 
> ----- Original Message -----
> From: "Steven Tan" <stevenph...@yahoo.com>
> To: "Alon Levy" <al...@redhat.com>
> Sent: Thursday, July 29, 2010 10:21:47 AM (GMT+0200) Auto-Detected
> Subject: Re: [Spice-devel] SPICE developers wanted
> 
> Hi Alon,
> 
> Really appreciate if you could provide the patches.
> 
> Thanks
> Steven
> 
> On Jul 28, 2010, at 3:31 PM, Alon Levy <al...@redhat.com> wrote:
> 
> 
> ----- "steven" <stevenph...@yahoo.com> wrote:
> 
> Hi Guys
> 
> 
> I'm looking for someone who can help with porting SPICE onto an
> ARM-based platform using Linux. Write me if you are interested and
> I'll furnish more details. Please include a self-introduction in your
> email with your skills and experience.
> 
> 
> 
> Just FYI, spice has been ported to N900 and to PC-Z1, both arm based
> platforms. (different
> variants). The patches are not committed but I would gladly provide
> them.
> 
> Thanks
> Steven
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>From d4240f4829e4fba20a1ffd9c85dc327fe0e854c9 Mon Sep 17 00:00:00 2001
From: Alon Levy <al...@redhat.com>
Date: Thu, 29 Jul 2010 18:53:14 +0300
Subject: [PATCH] codegen+demarshal: cast to void** through a temporary

---
 python_modules/codegen.py   |   14 ++++++++++++++
 python_modules/demarshal.py |    4 ++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/python_modules/codegen.py b/python_modules/codegen.py
index 03c67e6..fe55e91 100644
--- a/python_modules/codegen.py
+++ b/python_modules/codegen.py
@@ -160,6 +160,20 @@ class CodeWriter:
         self.newline()
         return self
 
+    def assign_voidpp(self, var, val):
+        """
+        The direct approach is:
+            var = (void**)&val;
+        and produces this warning if typeof val == uint8_t*
+            warning: dereferencing type-punned pointer will break strict-aliasing rules
+        The solution is to use a temp variable (hidden within a scope) and typeof
+        operator for it's type.
+        """
+        with self.block(""):
+            self.variable_def("typeof %s*" % val, "p = &%s" % val)
+            self.assign(var, "(void **)p")
+        return self
+
     def increment(self, var, val):
         self.write("%s += %s" % (var, val))
         self.write(";")
diff --git a/python_modules/demarshal.py b/python_modules/demarshal.py
index cbe3599..9df5a6f 100644
--- a/python_modules/demarshal.py
+++ b/python_modules/demarshal.py
@@ -821,7 +821,7 @@ def write_array_parser(writer, member, nelements, array, dest, scope):
                 scope.variable_def("void **", "ptr_array")
                 scope.variable_def("int", "ptr_array_index")
                 writer.assign("ptr_array_index", 0)
-                writer.assign("ptr_array", "(void **)%s" % array_start)
+                writer.assign_voidpp("ptr_array", array_start)
                 writer.increment("end", "sizeof(void *) * %s" % nelements)
                 array_start = "end"
                 array_pos = "*(%s *)end" % (element_type.c_type())
@@ -852,7 +852,7 @@ def write_parse_pointer_core(writer, target_type, offset, at_end, dest, member_n
         writer.assign("ptr_info[n_ptr].dest", "(void **)end")
         writer.increment("end", "sizeof(void *)");
     else:
-        writer.assign("ptr_info[n_ptr].dest", "(void **)&%s" % dest.get_ref(member_name))
+        writer.assign_voidpp("ptr_info[n_ptr].dest", dest.get_ref(member_name))
     if target_type.is_array():
         nelements = read_array_len(writer, member_name, target_type, dest, scope, True)
         writer.assign("ptr_info[n_ptr].nelements", nelements)
-- 
1.5.6.1

>From 8b607490e5e0b89adc33d4f0e4675227bf2dfab3 Mon Sep 17 00:00:00 2001
From: Alon Levy <al...@redhat.com>
Date: Thu, 29 Jul 2010 11:13:35 +0300
Subject: [PATCH] disable atomic ops for n900

---
 client/x11/atomic_count.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/client/x11/atomic_count.h b/client/x11/atomic_count.h
index f48c667..3b1a3b8 100644
--- a/client/x11/atomic_count.h
+++ b/client/x11/atomic_count.h
@@ -24,12 +24,14 @@ public:
 
     uint32_t operator ++ ()
     {
-        return __sync_add_and_fetch(&_count, 1);
+        //return __sync_add_and_fetch(&_count, 1);
+        return ++_count;
     }
 
     uint32_t operator -- ()
     {
-        return __sync_sub_and_fetch(&_count, 1);
+        //return __sync_sub_and_fetch(&_count, 1);
+        return --_count;
     }
 
     operator uint32_t () { return _count;}
-- 
1.5.6.1

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to