mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-04 18:00:22 +01:00
nouveau: don't touch PMC_BOOT_1 on x86, it seems to be undefined on some early cards.
This commit is contained in:
parent
1e2a2babab
commit
cc745fcc3a
1 changed files with 4 additions and 0 deletions
|
|
@ -283,11 +283,13 @@ nouveau_card_init(struct drm_device *dev)
|
|||
ret = nouveau_init_card_mappings(dev);
|
||||
if (ret) return ret;
|
||||
|
||||
#if defined(__powerpc__)
|
||||
/* Put the card in BE mode if it's not */
|
||||
if (NV_READ(NV03_PMC_BOOT_1))
|
||||
NV_WRITE(NV03_PMC_BOOT_1,0x00000001);
|
||||
|
||||
DRM_MEMORYBARRIER();
|
||||
#endif
|
||||
|
||||
/* Determine exact chipset we're running on */
|
||||
if (dev_priv->card_type < NV_10)
|
||||
|
|
@ -431,8 +433,10 @@ int nouveau_load(struct drm_device *dev, unsigned long flags)
|
|||
|
||||
reg0 = readl(regs+NV03_PMC_BOOT_0);
|
||||
reg1 = readl(regs+NV03_PMC_BOOT_1);
|
||||
#if defined(__powerpc__)
|
||||
if (reg1)
|
||||
reg0=___swab32(reg0);
|
||||
#endif
|
||||
|
||||
/* We're dealing with >=NV10 */
|
||||
if ((reg0 & 0x0f000000) > 0 ) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue