mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
rk29fb : fix : playing low resolution video in rotation err
use win0 scale to fix the scale not enough in video rotation
This commit is contained in:
@@ -1055,18 +1055,19 @@ static int win0_set_par(struct fb_info *info)
|
||||
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;
|
||||
@@ -2041,16 +2042,16 @@ static int fb1_set_par(struct fb_info *info)
|
||||
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;
|
||||
@@ -2250,16 +2251,16 @@ static int fb1_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
|
||||
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;
|
||||
@@ -2269,6 +2270,7 @@ static int fb1_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user