diff options
| author | Gustavo Diaz Prado <x0083741@ti.com> | 2011-05-31 09:25:00 +0100 |
|---|---|---|
| committer | Andy Green <andy.green@linaro.org> | 2011-05-31 11:06:31 +0100 |
| commit | a029707459c63855d49aaa5b9bbf7f5a707e62d4 (patch) | |
| tree | d9a0067afa933286845a9b6d517d2c2bc7aef6fe /drivers | |
| parent | ae8604589edd607be04c74a0780cd3796e99493a (diff) | |
SGX: UDD: Give support to calculate DPI from framebuffer information
This patch populates the information needed in the DisplayClass
structure reported to SGX Services to determine the panel DPI
based on the information given by the framebuffer
Signed-off-by: sayen mohanty <sayenmohanty@ti.com>
Signed-off-by: Gustavo Diaz Prado <x0083741@ti.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c index a2ad4e6e5d6..548e352c56a 100644 --- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c +++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c @@ -1470,6 +1470,16 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINFO *psDevInfo, int fb_idx) psPVRFBInfo->ulFBSize = FBSize; psPVRFBInfo->ulBufferSize = psPVRFBInfo->ulHeight * psPVRFBInfo->ulByteStride; + /* Get physical display size for DPI calculation */ + if (psLINFBInfo->var.width < 0 || psLINFBInfo->var.height < 0) { + psDevInfo->sDisplayInfo.ui32PhysicalWidthmm = 0; + psDevInfo->sDisplayInfo.ui32PhysicalHeightmm = 0; + } else { + psDevInfo->sDisplayInfo.ui32PhysicalWidthmm = + psLINFBInfo->var.width; + psDevInfo->sDisplayInfo.ui32PhysicalHeightmm = + psLINFBInfo->var.height; + } /* XXX: Page aligning with 16bpp causes the * position of framebuffer address to look in the wrong place. |
