HI igor,
we only use the current buffer register in 8080NPU mode in freertos, it could only out put what we wanted.
however , could we do the same thing in linux driver ? and its in DOTCLK mode. I guess this interface is for screen output in mxsfb.c in linux driver. Is that possible to make some optimization as well ?
static int mxsfb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *fb_info)
{
int ret = 0;
struct mxsfb_info *host = fb_info->par;
unsigned offset;
if (host->cur_blank != FB_BLANK_UNBLANK) {
dev_dbg(fb_info->device, "can't do pan display when fb "
"is blank\n");
return -EINVAL;
}
if (var->xoffset > 0) {
dev_dbg(fb_info->device, "x panning not supported\n");
return -EINVAL;
}
if ((var->yoffset + var->yres > var->yres_virtual)) {
dev_err(fb_info->device, "y panning exceeds\n");
return -EINVAL;
}
init_completion(&host->flip_complete);
offset = fb_info->fix.line_length * var->yoffset;
/* update on next VSYNC */
writel(fb_info->fix.smem_start + offset,
host->base + host->devdata->cur_buf);
writel(CTRL1_CUR_FRAME_DONE_IRQ_EN,
host->base + LCDC_CTRL1 + REG_SET);
/*enable the dotclk mode and RUN bit*/
//writel(CTRL_DOTCLK_MODE | CTRL_RUN, host->base + LCDC_CTRL + REG_SET);
/*disable the dotclk mode*/
//writel(CTRL_DOTCLK_MODE, host->base + LCDC_CTRL + REG_CLR);
ret = wait_for_completion_timeout(&host->flip_complete, HZ / 2);
if (!ret) {
dev_err(fb_info->device,
"mxs wait for pan flip timeout\n");
return -ETIMEDOUT;
}
return 0;
}
thanks.