Antoine Martin <antoine <at> nagafix.co.uk> writes:

> 
> Whilst I was looking at all the docs and patches that I have for the
> wiki/uml website, I found the old x11-fb patch from Gerd Knorr's and
> forward ported it to 3.2
> Got as far as the point where it builds and shows a window when you
> start the kernel with:
> ./vmlinux x11=800x600
> As reported at the time of the original patch, all I get is a black
> window... I'll try to see if I can figure out why it's not updating.
> Here it is if you want to try it / comment / help:
> http://uml.devloop.org.uk/vfb-3.2.patch

I was just playing with this the other evening. I tweaked your/Gerd's patch in 
a 
few places (using it on 3.5.0-rc2), but the main non-porting related change 
seems to be in the nopage helper.  It uses pgoff as if it were the virtual 
address instead of as a direct offset for the VMA.  Fixing that got me a 
working 
fb.

I've only tested with the test program from here:
  http://cep.xor.aps.anl.gov/software/qt4-x11-4.2.2/qtopiacore-
testingframebuffer.html
which draws a gradient.

Here's the tiny tweak (which is not stylistically correct, etc):

@static int
@x11_fb_vm_nopage(struct vm_area_struct *vma, struct vm_fault *vmf)
@{
...
->-------int pgnr = (vmf->pgoff - vma->vm_start) >> PAGE_SHIFT;
+>-------unsigned long pgnr = vmf->pgoff;

Not sure if anyone still cares, but if I end up getting it more cleaned up, 
I'll 
post a 3.5 port in a weekend in the near future :)

cheers!
will


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to