Loading...
--- kernel.git/drivers/video/pxafb.c	2008-07-24 09:04:04.000000000 +0800
+++ linux-2.6.25-android-1.0_r1/drivers/video/pxafb.c	2009-06-12 10:36:05.
000000000 +0800
@@ -70,6 +70,18 @@
static char g_options[PXAFB_OPTIONS_SIZE]     devinitdata = "";
#endif

+static int pxafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *	info)
+{
+	struct pxafb_info *fbi = (struct pxafb_info *)info;
+	unsigned long flags;
+
+	local_irq_save(flags);
+
+	fbi->task_state = C_ANDROID_NOP;
+	local_irq_restore(flags);
+	return 0;
+}
+
static inline void pxafb_schedule_work(struct pxafb_info *fbi, u_int state)
{
	unsigned long flags;
@@ -271,7 +283,7 @@
	var->sync	= mode->sync;
	var->grayscale	= mode->cmap_greyscale;
	var->xres_virtual	= var->xres;
-	var->yres_virtual	= var->yres;
+	var->yres_virtual	= var->yres * 2;
}

/*
@@ -496,6 +508,7 @@
	.fb_imageblit	= cfb_imageblit,
	.fb_blank	= pxafb_blank,
	.fb_mmap	= pxafb_mmap,

+	.fb_pan_display = pxafb_pan_display,
};

/*
@@ -688,13 +701,13 @@

	/* populate descriptors */
	fbi->dmadesc_fblow_cpu->fdadr = fbi->dmadesc_fblow_dma;
-	fbi->dmadesc_fblow_cpu->fsadr = fbi->screen_dma + BYTES_PER_PANEL;
+	fbi->dmadesc_fblow_cpu->fsadr = fbi->screen_dma + BYTES_PER_PANEL
+	((fbi->fb.var.yoffset / fbi->fb.var.yres) * (fbi->fb.var.yres) * (fbi->fb.var.xres) *
2);
	fbi->dmadesc_fblow_cpu->fidr	= 0;
	fbi->dmadesc_fblow_cpu->ldcmd = BYTES_PER_PANEL;

	fbi->fdadr1 = fbi->dmadesc_fblow_dma; /* only used in dual-panel mode */

-	fbi->dmadesc_fbhigh_cpu->fsadr = fbi->screen_dma;
+	fbi->dmadesc_fbhigh_cpu->fsadr = fbi->screen_dma + ((fbi->fb.var.yoffset /
fbi->fb.var.yres) * (fbi->fb.var.yres) * (fbi->fb.var.xres) * 2);
	fbi->dmadesc_fbhigh_cpu->fidr = 0;
	fbi->dmadesc_fbhigh_cpu->ldcmd = BYTES_PER_PANEL;

@@ -1166,14 +1179,14 @@
	fbi->fb.fix.type	= FB_TYPE_PACKED_PIXELS;
	fbi->fb.fix.type_aux	= 0;
	fbi->fb.fix.xpanstep	= 0;
-	fbi->fb.fix.ypanstep	= 0;
+	fbi->fb.fix.ypanstep	= 1;
	fbi->fb.fix.ywrapstep	= 0;
	fbi->fb.fix.accel	= FB_ACCEL_NONE;

	fbi->fb.var.nonstd	= 0;
	fbi->fb.var.activate	= FB_ACTIVATE_NOW;

-	fbi->fb.var.height	= -1;
-	fbi->fb.var.width	= -1;
+	fbi->fb.var.height	= 71;
+	fbi->fb.var.width	= 53;

	fbi->fb.var.accel_flags = 0;
	fbi->fb.var.vmode	= FB_VMODE_NONINTERLACED;

@@ -1198,6 +1211,7 @@

	for (i = 0; i num_modes; i++) {
		smemlen = mode[i].xres * mode[i].yres * mode[i].bpp / 8;
+		smemlen *= 2;
		if (smemlen > fbi->fb.fix.smem_len)
			fbi->fb.fix.smem_len = smemlen;
	}
Loading...