w100_pan_display
他所のpan対応パッチや、先日の描画回りログの結果からして、「とりあえずpan_display()でY軸方向に首振りできるようにすればいいのかな?」と推測。
ということで、いろいろなpan対応パッチやw100_set_dispregs()をマネマネしてみたらこんなのができた。landscapeな画面でしか確認してないけどもキー飛び飛び現象は直ったっぽい。これでいいのか知らんけど動いてるからいいや。
--- w100fb.c.orig 2008-04-18 09:33:45.000000000 +0900 +++ w100fb.c 2008-04-18 09:36:01.000000000 +0900 @@ -680,6 +680,11 @@ */ static int w100fb_set_par(struct fb_info *info) { + return 0; +} + +static int w100fb_set_par_init(struct fb_info *info) +{ struct w100fb_par *par=info->par; if (par->xres != info->var.xres || par->yres != info->var.yres) { @@ -688,7 +693,7 @@ par->mode = w100fb_get_mode(par, &par->xres, &par->yres, 0); info->fix.visual = FB_VISUAL_TRUECOLOR; - info->fix.ypanstep = 0; + info->fix.ypanstep = 1; info->fix.ywrapstep = 0; info->fix.line_length = par->xres * BITS_PER_PIXEL / 8; @@ -706,6 +711,41 @@ } +static int w100fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) +{ + struct w100fb_par *par = info->par; + int yres = 0, offset = 0; + + if (par->xres == par->mode->xres) { + if (par->flip) { + /* 180 degree */ + yres = info->var.yres + var->yoffset; + offset = (info->var.xres * yres) - 1; + } else { + /* 0 degree */ + offset = info->var.xres * var->yoffset; + } + } else { + if (par->flip) { + /* 270 degree */ + offset = info->var.xres * var->yoffset - 1; + } else { + /* 90 degree */ + yres = info->var.yres + var->yoffset; + offset = par->xres * (yres - 1); + } + } + + w100_update_disable(); + + writel(W100_FB_BASE + ((offset * BITS_PER_PIXEL / 8) & ~0x03UL), + remapped_regs + mmGRAPHIC_OFFSET); + + w100_update_enable(); + + return 0; +} + /* * Frame buffer operations */ @@ -720,6 +760,7 @@ .fb_copyarea = w100fb_copyarea, .fb_imageblit = w100fb_imageblit, .fb_sync = w100fb_sync, + .fb_pan_display = w100fb_pan_display, }; #ifdef CONFIG_PM @@ -922,7 +963,7 @@ goto out; } - w100fb_set_par(info); + w100fb_set_par_init(info); if (register_framebuffer(info) < 0) { err = -EINVAL;