Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 94187
b: refs/heads/master
c: fd96795
h: refs/heads/master
i:
  94185: 789b940
  94183: 74d3994
v: v3
  • Loading branch information
Andres Salomon authored and Linus Torvalds committed Apr 28, 2008
1 parent b399cd1 commit 5173231
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61a517a063abf659cbf61df11f8e2131fdafccec
refs/heads/master: fd96795630428ceca775bd1effc5bf41a9fe5272
18 changes: 17 additions & 1 deletion trunk/drivers/video/geode/display_gx.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,23 @@ unsigned int gx_frame_buffer_size(void)
{
unsigned int val;

/* FB size is reported by a virtual register */
if (!geode_has_vsa2()) {
uint32_t hi, lo;

/* The number of pages is (PMAX - PMIN)+1 */
rdmsr(MSR_GLIU_P2D_RO0, lo, hi);

/* PMAX */
val = ((hi & 0xff) << 12) | ((lo & 0xfff00000) >> 20);
/* PMIN */
val -= (lo & 0x000fffff);
val += 1;

/* The page size is 4k */
return (val << 12);
}

/* FB size can be obtained from the VSA II */
/* Virtual register class = 0x02 */
/* VG_MEM_SIZE(512Kb units) = 0x00 */

Expand Down
16 changes: 16 additions & 0 deletions trunk/drivers/video/geode/lxfb_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,22 @@ unsigned int lx_framebuffer_size(void)
{
unsigned int val;

if (!geode_has_vsa2()) {
uint32_t hi, lo;

/* The number of pages is (PMAX - PMIN)+1 */
rdmsr(MSR_GLIU_P2D_RO0, lo, hi);

/* PMAX */
val = ((hi & 0xff) << 12) | ((lo & 0xfff00000) >> 20);
/* PMIN */
val -= (lo & 0x000fffff);
val += 1;

/* The page size is 4k */
return (val << 12);
}

/* The frame buffer size is reported by a VSM in VSA II */
/* Virtual Register Class = 0x02 */
/* VG_MEM_SIZE (1MB units) = 0x00 */
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-x86/geode.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ extern int geode_get_dev_base(unsigned int dev);

/* MSRS */

#define MSR_GLIU_P2D_RO0 0x10000029

#define MSR_LX_GLD_MSR_CONFIG 0x48002001
#define MSR_LX_MSR_PADSEL 0x48002011 /* NOT 0x48000011; the data
* sheet has the wrong value */
Expand Down

0 comments on commit 5173231

Please sign in to comment.