aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr
diff options
context:
space:
mode:
authorsayen mohanty <sayenmohanty@ti.com>2011-08-25 03:00:50 -0400
committerPaolo Pisati <paolo.pisati@canonical.com>2012-08-17 04:18:38 -0400
commit6d0c51a1c0e31dd1620fc71b8f5806b47a18a30c (patch)
treed9350c89df0c72089b7e5959c7fbf387f3048830 /drivers/gpu/pvr
parent54b03318901a3e7278c7084b7543ce9a2951e8a2 (diff)
SGX: UDD: Avoid sending a black frame at initialization
This patch removes the fb_set_var used when the flipping is being done with the DSS APIs. When the UDD initializes it asks the framebuffer if it can hold certain number of buffers, that call makes a transfer to the display of whatever contents are in the framebuffer (black at init time).This patch avoids such transfer. Change-Id: I04972ce1f9ac8b9b0f1a1232da01e1d68664dc53 Signed-off-by: sayen mohanty <sayenmohanty@ti.com> Signed-off-by: Gustavo Diaz Prado <x0083741@ti.com>
Diffstat (limited to 'drivers/gpu/pvr')
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c36
1 files changed, 27 insertions, 9 deletions
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
index 425059c29a4..88f23656f02 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
@@ -1386,11 +1386,34 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINFO *psDevInfo, int fb_idx)
1386 DESIRED_BPP); 1386 DESIRED_BPP);
1387 } 1387 }
1388 acquire_console_sem(); 1388 acquire_console_sem();
1389
1390 FBSize = (psLINFBInfo->screen_size) != 0 ?
1391 psLINFBInfo->screen_size : psLINFBInfo->fix.smem_len;
1392 psPVRFBInfo->sSysAddr.uiAddr = psLINFBInfo->fix.smem_start;
1393 psPVRFBInfo->sCPUVAddr = psLINFBInfo->screen_base;
1394 psPVRFBInfo->ulWidth = psLINFBInfo->var.xres;
1395 psPVRFBInfo->ulHeight = psLINFBInfo->var.yres;
1396 psPVRFBInfo->ulByteStride = psLINFBInfo->fix.line_length;
1397 psPVRFBInfo->ulFBSize = FBSize;
1398 psPVRFBInfo->ulBufferSize =
1399 psPVRFBInfo->ulHeight * psPVRFBInfo->ulByteStride;
1400
1401 /* Calculate the buffers according to the flipping technique */
1402#if defined(FLIP_TECHNIQUE_FRAMEBUFFER)
1389 psLINFBInfo->var.activate = FB_ACTIVATE_FORCE; 1403 psLINFBInfo->var.activate = FB_ACTIVATE_FORCE;
1390 fb_set_var(psLINFBInfo, &psLINFBInfo->var); 1404 fb_set_var(psLINFBInfo, &psLINFBInfo->var);
1391 buffers_available = 1405 buffers_available =
1392 psLINFBInfo->var.yres_virtual / psLINFBInfo->var.yres; 1406 psLINFBInfo->var.yres_virtual / psLINFBInfo->var.yres;
1393 1407
1408#elif defined(FLIP_TECHNIQUE_OVERLAY)
1409 buffers_available =
1410 psPVRFBInfo->ulFBSize / psPVRFBInfo->ulBufferSize;
1411
1412#else
1413#error No flipping technique selected, please define \
1414 FLIP_TECHNIQUE_FRAMEBUFFER or FLIP_TECHNIQUE_OVERLAY
1415#endif
1416
1394 if(buffers_available <= 1) 1417 if(buffers_available <= 1)
1395 { 1418 {
1396 /* 1419 /*
@@ -1442,13 +1465,6 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINFO *psDevInfo, int fb_idx)
1442 DEBUG_PRINTK("*Stride (bytes): %u", 1465 DEBUG_PRINTK("*Stride (bytes): %u",
1443 (unsigned int)psLINFBInfo->fix.line_length); 1466 (unsigned int)psLINFBInfo->fix.line_length);
1444 1467
1445 psPVRFBInfo->sSysAddr.uiAddr = psLINFBInfo->fix.smem_start;
1446 psPVRFBInfo->sCPUVAddr = psLINFBInfo->screen_base;
1447 psPVRFBInfo->ulWidth = psLINFBInfo->var.xres;
1448 psPVRFBInfo->ulHeight = psLINFBInfo->var.yres;
1449 psPVRFBInfo->ulByteStride = psLINFBInfo->fix.line_length;
1450 psPVRFBInfo->ulFBSize = FBSize;
1451
1452#ifdef CONFIG_TILER_OMAP 1468#ifdef CONFIG_TILER_OMAP
1453 /* If TILER is being used, use correct physical stride and FB size */ 1469 /* If TILER is being used, use correct physical stride and FB size */
1454 if ((psPVRFBInfo->sSysAddr.uiAddr >= TILER_MIN_PADDR) && 1470 if ((psPVRFBInfo->sSysAddr.uiAddr >= TILER_MIN_PADDR) &&
@@ -1463,10 +1479,12 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINFO *psDevInfo, int fb_idx)
1463 psPVRFBInfo->ulByteStride = tiler_stride(tiler_naddr); 1479 psPVRFBInfo->ulByteStride = tiler_stride(tiler_naddr);
1464 /* Calculate the whole TILER region to map in bytes */ 1480 /* Calculate the whole TILER region to map in bytes */
1465 psPVRFBInfo->ulFBSize = max_rows * psPVRFBInfo->ulByteStride; 1481 psPVRFBInfo->ulFBSize = max_rows * psPVRFBInfo->ulByteStride;
1482 /* Re-calculate buffer size with previous stride */
1483 psPVRFBInfo->ulBufferSize =
1484 psPVRFBInfo->ulHeight * psPVRFBInfo->ulByteStride;
1466 } 1485 }
1467#endif 1486#endif
1468 psPVRFBInfo->ulBufferSize = 1487
1469 psPVRFBInfo->ulHeight * psPVRFBInfo->ulByteStride;
1470 /* Get physical display size for DPI calculation */ 1488 /* Get physical display size for DPI calculation */
1471 if (psLINFBInfo->var.width < 0 || psLINFBInfo->var.height < 0) { 1489 if (psLINFBInfo->var.width < 0 || psLINFBInfo->var.height < 0) {
1472 psDevInfo->sDisplayInfo.ui32PhysicalWidthmm = 0; 1490 psDevInfo->sDisplayInfo.ui32PhysicalWidthmm = 0;