if(((var->rotate == 270)||(var->rotate == 90) || (var->rotate == 180)) && (inf->video_mode))
{
#ifdef CONFIG_FB_ROTATE_VIDEO
- // if(xact > screen->x_res)
+ if(xact > screen->x_res)
{
xact = screen->x_res; /* visible resolution */
yact = screen->y_res;
xvir = screen->x_res; /* virtual resolution */
yvir = screen->y_res;
- } // else {
- // xact = var->yres; /* visible resolution */
- // yact = var->xres;
- // xvir = var->yres_virtual; /* virtual resolution */
- // yvir = var->xres_virtual;
- // }
+ } else {
+ xact = var->xres; /* visible resolution */
+ yact = var->yres;
+ xvir = var->xres_virtual; /* virtual resolution */
+ yvir = var->yres_virtual;
+ printk("xact=%d yact =%d \n",xact,yact);
+ }
#else //CONFIG_FB_ROTATE_VIDEO
printk("LCDC not support rotate!\n");
return -EINVAL;
ipp_req.dst0.fmt = 3;
ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*2*dstoffset;
ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*(2*dstoffset+1);
- // if(var->xres > screen->x_res)
- // {
+ if(var->xres > screen->x_res)
+ {
ipp_req.dst0.w = screen->x_res;
ipp_req.dst0.h = screen->y_res;
- // } else {
- // ipp_req.dst0.w = var->yres;
- // ipp_req.dst0.h = var->xres;
- // }
- //ipp_req.src_vir_w = ipp_req.src0.w;
- //ipp_req.dst_vir_w = ipp_req.dst0.w;
+ } else {
+ ipp_req.dst0.w = var->xres;
+ ipp_req.dst0.h = var->yres;
+ }
+ ipp_req.dst_vir_w = (ipp_req.dst0.w + 15) & (~15);
+
ipp_req.timeout = 100;
if(var->rotate == 90)
ipp_req.flag = IPP_ROT_90;
ipp_req.dst0.fmt = 3;
ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*2*dstoffset;
ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*(2*dstoffset+1);
- // if(var->xres > screen->x_res)
- // {
+ if(var->xres > screen->x_res)
+ {
ipp_req.dst0.w = screen->x_res;
ipp_req.dst0.h = screen->y_res;
- // } else {
- // ipp_req.dst0.w = var->yres;
- // ipp_req.dst0.h = var->xres;
- // }
- // ipp_req.src_vir_w = ipp_req.src0.w;
- // ipp_req.dst_vir_w = ipp_req.dst0.w;
+ } else {
+ ipp_req.dst0.w = var->xres;
+ ipp_req.dst0.h = var->yres;
+
+ }
+ ipp_req.dst_vir_w = (ipp_req.dst0.w + 15) & (~15);
ipp_req.timeout = 100;
if(var->rotate == 90)
ipp_req.flag = IPP_ROT_90;
ipp_req.flag = IPP_ROT_270;
//ipp_do_blit(&ipp_req);
ipp_blit_sync(&ipp_req);
+
fbprintk("yaddr=0x%x,uvaddr=0x%x\n",ipp_req.dst0.YrgbMst,ipp_req.dst0.CbrMst);
yuv_phy[0] = ipp_req.dst0.YrgbMst;
yuv_phy[1] = ipp_req.dst0.CbrMst;