Mathijsz / razdroid-kernel

Kernel for Android on the Raspberry Pi
Other
22 stars 9 forks source link

"Page flipping not supported" #1

Open vwarg opened 12 years ago

vwarg commented 12 years ago

Patch for that:

diff --git drivers/video/bcm2708_fb.c drivers/video/bcm2708_fb.c
index a2e0166..a6edbc6 100644
--- drivers/video/bcm2708_fb.c
+++ drivers/video/bcm2708_fb.c
@@ -195,7 +195,7 @@ static int bcm2708_fb_set_par(struct fb_info *info)
    fbinfo->xres = info->var.xres;
    fbinfo->yres = info->var.yres;
    fbinfo->xres_virtual = info->var.xres_virtual;
-   fbinfo->yres_virtual = info->var.yres_virtual;
+   fbinfo->yres_virtual = info->var.yres*2;
    fbinfo->bpp = info->var.bits_per_pixel;
    fbinfo->xoffset = info->var.xoffset;
    fbinfo->yoffset = info->var.yoffset;
@@ -350,7 +350,7 @@ static int bcm2708_fb_register(struct bcm2708_fb *fb)
    fb->fb.var.xres = fbwidth;
    fb->fb.var.yres = fbheight;
    fb->fb.var.xres_virtual = fbwidth;
-   fb->fb.var.yres_virtual = fbheight;
+   fb->fb.var.yres_virtual = fbheight*2;
    fb->fb.var.bits_per_pixel = fbdepth;
    fb->fb.var.vmode = FB_VMODE_NONINTERLACED;
    fb->fb.var.activate = FB_ACTIVATE_NOW;

(URL to patchfile: https://www.dropbox.com/s/kuh79vj5a91knn2/page_flip.patch )

cleverca22 commented 11 years ago

i'm not sure, but shouldnt fb_pan_display also exist on struct fb_ops bcm2708_fb_ops to do the actual flip?

vwarg commented 11 years ago

cleverca22, you are absolutely correct. I had forgotten that I hadn't updated to the latest pageflip-driver (or even the kernel that we're currently using). Will try to remedy that tonight.

cleverca22 commented 11 years ago

after more digging, i see that fb_pan_display doesn't seem to be required

the problem appears to be around https://github.com/raspberrypi/linux/blob/rpi-3.6.y/drivers/video/bcm2708_fb.c#L189

the copy in razdroid is over 6 months old, and calculates yres improperly, causing it to falsely return an error

i used the latest bcm2708_fb.c and the page flipping appears to be fully working, and causing a different bug i cant track down

cleverca22 commented 11 years ago

wait, upon a closer inspecting, that bug was never in the rpi fork, ever, this razdroid copy is somehow missing things that the rpi fork has had since the initial commit