summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2007-04-20 11:17:16 -0600
committerJordan Crouse <jordan.crouse@amd.com>2007-04-20 11:18:32 -0600
commit46b29acf1f239dd89adabf1cb2c138cf8a2b1700 (patch)
tree1f315183e23acf7dbc5290035bce7094b36c0978
parent8bfed84a1f972325cdf61876d7f7dfd0e8f0d4d5 (diff)
Several fixes to support OLPC LX turnon
These are fixes discovered during the OLPC LX turn on. The compression was incorrectly being configured, resulting in bad drawing, that has bee repaired. Assume by default that we're going to use a panel and the CRT, no longer read the straps MSR because it is unreliable. Finally, fix the MSR hooks by moving the hook definitions where they will do some good and disabling the VSA method.
-rw-r--r--src/amd_lx_driver.c58
-rw-r--r--src/cimarron.c2
2 files changed, 11 insertions, 49 deletions
diff --git a/src/amd_lx_driver.c b/src/amd_lx_driver.c
index e1e555b..d757eb0 100644
--- a/src/amd_lx_driver.c
+++ b/src/amd_lx_driver.c
@@ -227,41 +227,6 @@ lx_set_custom_mode(GeodeRec *pGeode, DisplayModePtr pMode, int bpp)
return vg_set_custom_mode(&mode, bpp);
}
-void LXGetOutputs(GeodeRec *pGeode)
-{
- Q_WORD msr;
-
- msr_read64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_CONFIG, &msr);
-
- /* XXX: VOP is always on? */
-
- pGeode->Output = OUTPUT_VOP;
-
- switch((msr.low >> 3) & 0x07) {
- case 4:
- case 2:
- case 0:
- pGeode->Output = OUTPUT_CRT;
- break;
- case 1:
- case 3:
- case 5:
- pGeode->Output = OUTPUT_PANEL;
-
- if ((msr.low & 0x8000) != 0)
- pGeode->Output |= OUTPUT_CRT;
- break;
-
- case 6:
- /* VOP */
- break;
-
- default:
- ErrorF("Geode LX - unusual output strap %x\'n", msr.low);
- break;
- }
-}
-
static Bool
LXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate)
{
@@ -296,7 +261,8 @@ LXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate)
if (size <= fbavail) {
pGeode->CBData.compression_offset = fboffset;
-
+ pGeode->CBData.size = LX_CB_PITCH;
+ pGeode->CBData.pitch = LX_CB_PITCH;
fboffset += size;
fbavail -= size;
@@ -473,12 +439,6 @@ LXMapMem(ScrnInfoPtr pScrni)
pGeode->FBBase = cim_fb_ptr;
- /* This may not be the best place to do this */
- /* Set up the MSR read/write hooks for cimarron */
-
- cim_rdmsr = LXReadMSR;
- cim_wrmsr = LXWriteMSR;
-
if (!pGeode->NoAccel)
pGeode->pExa->memoryBase = pGeode->FBBase;
@@ -563,6 +523,9 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
return TRUE;
}
+ cim_rdmsr = LXReadMSR;
+ cim_wrmsr = LXWriteMSR;
+
/* Detect the chipset with Cimarron */
init_detect_cpu(&cpuver, &cpurev);
@@ -572,10 +535,11 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
"No Geode LX chipset was detected.\n");
- /* Check the straps to figure out what is attached - these can be changed by
- config options */
+ /* By default, we support panel and CRT - the config file should
+ * disable the ones we don't want
+ */
- LXGetOutputs(pGeode);
+ pGeode->Output = OUTPUT_PANEL | OUTPUT_CRT;
/* Fill in the monitor information */
pScrni->monitor = pScrni->confScreen->monitor;
@@ -698,7 +662,7 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
return FALSE;
xf86LoaderReqSymLists(amdInt10Symbols, NULL);
-
+
pVesa = pGeode->vesa;
if ((pVesa->pInt = xf86InitInt10(pGeode->pEnt->index)) == NULL) {
@@ -1238,8 +1202,6 @@ LXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv)
pGeode->starting = TRUE;
- ErrorF("SCREENINIT!\n");
-
/* If we are using VGA then go ahead and map the memory */
if (pGeode->useVGA) {
diff --git a/src/cimarron.c b/src/cimarron.c
index 52da038..65df4d2 100644
--- a/src/cimarron.c
+++ b/src/cimarron.c
@@ -130,7 +130,7 @@
#define CIMARRON_INCLUDE_MSR_MACROS
#define CIMARRON_MSR_DIRECT_ASM 0
#define CIMARRON_MSR_VSA_IO 0
-#define CIMARRON_MSR_ABSTRACTED_ASM 1
+#define CIMARRON_MSR_ABSTRACTED_ASM 0
#define CIMARRON_MSR_KERNEL_ROUTINE 0
#define CIMARRON_MSR_HOOKS 1