forked from Minki/linux
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes
nouveau fixes. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/gm107/gr: bump attrib cb size quite a bit drm/nouveau: fix another lock unbalance in nouveau_crtc_page_flip drm/nouveau/bios: fix shadowing from PROM on big-endian systems drm/nouveau/acpi: allow non-optimus setups to load vbios from acpi
This commit is contained in:
commit
2a1235e53b
@ -863,7 +863,7 @@ gm107_grctx_generate_mods(struct nvc0_graph_priv *priv, struct nvc0_grctx *info)
|
||||
{
|
||||
mmio_data(0x003000, 0x0100, NV_MEM_ACCESS_RW | NV_MEM_ACCESS_SYS);
|
||||
mmio_data(0x008000, 0x0100, NV_MEM_ACCESS_RW | NV_MEM_ACCESS_SYS);
|
||||
mmio_data(0x060000, 0x1000, NV_MEM_ACCESS_RW);
|
||||
mmio_data(0x200000, 0x1000, NV_MEM_ACCESS_RW);
|
||||
|
||||
mmio_list(0x40800c, 0x00000000, 8, 1);
|
||||
mmio_list(0x408010, 0x80000000, 0, 0);
|
||||
@ -877,6 +877,8 @@ gm107_grctx_generate_mods(struct nvc0_graph_priv *priv, struct nvc0_grctx *info)
|
||||
mmio_list(0x418e24, 0x00000000, 8, 0);
|
||||
mmio_list(0x418e28, 0x80000030, 0, 0);
|
||||
|
||||
mmio_list(0x4064c8, 0x018002c0, 0, 0);
|
||||
|
||||
mmio_list(0x418810, 0x80000000, 12, 2);
|
||||
mmio_list(0x419848, 0x10000000, 12, 2);
|
||||
mmio_list(0x419c2c, 0x10000000, 12, 2);
|
||||
|
@ -168,7 +168,8 @@ nouveau_bios_shadow_prom(struct nouveau_bios *bios)
|
||||
*/
|
||||
i = 16;
|
||||
do {
|
||||
if ((nv_rd32(bios, 0x300000) & 0xffff) == 0xaa55)
|
||||
u32 data = le32_to_cpu(nv_rd32(bios, 0x300000)) & 0xffff;
|
||||
if (data == 0xaa55)
|
||||
break;
|
||||
} while (i--);
|
||||
|
||||
@ -176,14 +177,15 @@ nouveau_bios_shadow_prom(struct nouveau_bios *bios)
|
||||
goto out;
|
||||
|
||||
/* read entire bios image to system memory */
|
||||
bios->size = ((nv_rd32(bios, 0x300000) >> 16) & 0xff) * 512;
|
||||
bios->size = (le32_to_cpu(nv_rd32(bios, 0x300000)) >> 16) & 0xff;
|
||||
bios->size = bios->size * 512;
|
||||
if (!bios->size)
|
||||
goto out;
|
||||
|
||||
bios->data = kmalloc(bios->size, GFP_KERNEL);
|
||||
if (bios->data) {
|
||||
for (i = 0; i < bios->size; i+=4)
|
||||
nv_wo32(bios, i, nv_rd32(bios, 0x300000 + i));
|
||||
for (i = 0; i < bios->size; i += 4)
|
||||
((u32 *)bios->data)[i/4] = nv_rd32(bios, 0x300000 + i);
|
||||
}
|
||||
|
||||
/* check the PCI record header */
|
||||
|
@ -389,9 +389,6 @@ bool nouveau_acpi_rom_supported(struct pci_dev *pdev)
|
||||
acpi_status status;
|
||||
acpi_handle dhandle, rom_handle;
|
||||
|
||||
if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
|
||||
return false;
|
||||
|
||||
dhandle = ACPI_HANDLE(&pdev->dev);
|
||||
if (!dhandle)
|
||||
return false;
|
||||
|
@ -764,9 +764,9 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
|
||||
}
|
||||
|
||||
ret = nouveau_page_flip_emit(chan, old_bo, new_bo, s, &fence);
|
||||
mutex_unlock(&chan->cli->mutex);
|
||||
if (ret)
|
||||
goto fail_unreserve;
|
||||
mutex_unlock(&chan->cli->mutex);
|
||||
|
||||
/* Update the crtc struct and cleanup */
|
||||
crtc->primary->fb = fb;
|
||||
|
Loading…
Reference in New Issue
Block a user