summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Diaz Prado <x0083741@ti.com>2011-05-31 09:25:05 +0100
committerAndy Green <andy.green@linaro.org>2011-05-31 11:06:37 +0100
commita6a878c394dfc5c6381cb110829a8cb640dee480 (patch)
tree21ca10e2672aad172e41461e53064b3379c9f12a
parentfa786151f951044d352dacb6c374e92114f12989 (diff)
SGX: UDD: Give support to calculate DPI from framebuffer info
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. This patch is a rebase for DDK 1.6.16.3924. Signed-off-by: sayen mohanty <sayenmohanty@ti.com> Signed-off-by: Gustavo Diaz Prado <x0083741@ti.com> Change-Id: I1234be3711ec61a8da9b1c34065e998066a2d0d0
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c10
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 c5b0f79b15c..84ad6582df8 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
@@ -1443,6 +1443,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.