aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/geode/lxfb_ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/geode/lxfb_ops.c')
-rw-r--r--drivers/video/geode/lxfb_ops.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/video/geode/lxfb_ops.c b/drivers/video/geode/lxfb_ops.c
index e42e12489f6d..cd9d4cc26954 100644
--- a/drivers/video/geode/lxfb_ops.c
+++ b/drivers/video/geode/lxfb_ops.c
@@ -329,6 +329,22 @@ unsigned int lx_framebuffer_size(void)
329{ 329{
330 unsigned int val; 330 unsigned int val;
331 331
332 if (!geode_has_vsa2()) {
333 uint32_t hi, lo;
334
335 /* The number of pages is (PMAX - PMIN)+1 */
336 rdmsr(MSR_GLIU_P2D_RO0, lo, hi);
337
338 /* PMAX */
339 val = ((hi & 0xff) << 12) | ((lo & 0xfff00000) >> 20);
340 /* PMIN */
341 val -= (lo & 0x000fffff);
342 val += 1;
343
344 /* The page size is 4k */
345 return (val << 12);
346 }
347
332 /* The frame buffer size is reported by a VSM in VSA II */ 348 /* The frame buffer size is reported by a VSM in VSA II */
333 /* Virtual Register Class = 0x02 */ 349 /* Virtual Register Class = 0x02 */
334 /* VG_MEM_SIZE (1MB units) = 0x00 */ 350 /* VG_MEM_SIZE (1MB units) = 0x00 */