提交 fffeba2a 编写于 作者: B Ben Skeggs

drm/nvc0/fb: ignore readback page alloc failure to support userspace

Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 c5bd028b
...@@ -178,7 +178,8 @@ nvc0_fb_init(struct nouveau_object *object) ...@@ -178,7 +178,8 @@ nvc0_fb_init(struct nouveau_object *object)
if (ret) if (ret)
return ret; return ret;
nv_wr32(priv, 0x100c10, priv->r100c10 >> 8); if (priv->r100c10_page)
nv_wr32(priv, 0x100c10, priv->r100c10 >> 8);
return 0; return 0;
} }
...@@ -217,13 +218,13 @@ nvc0_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine, ...@@ -217,13 +218,13 @@ nvc0_fb_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv->base.ram.put = nv50_fb_vram_del; priv->base.ram.put = nv50_fb_vram_del;
priv->r100c10_page = alloc_page(GFP_KERNEL | __GFP_ZERO); priv->r100c10_page = alloc_page(GFP_KERNEL | __GFP_ZERO);
if (!priv->r100c10_page) if (priv->r100c10_page) {
return -ENOMEM; priv->r100c10 = pci_map_page(device->pdev, priv->r100c10_page,
0, PAGE_SIZE,
priv->r100c10 = pci_map_page(device->pdev, priv->r100c10_page, 0, PCI_DMA_BIDIRECTIONAL);
PAGE_SIZE, PCI_DMA_BIDIRECTIONAL); if (pci_dma_mapping_error(device->pdev, priv->r100c10))
if (pci_dma_mapping_error(device->pdev, priv->r100c10)) return -EFAULT;
return -EFAULT; }
return nouveau_fb_preinit(&priv->base); return nouveau_fb_preinit(&priv->base);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册