Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae36ce07 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Two build fixes, one for VC4, one for nouveau where the ARM only code
  is doing something a bit strange.  While people are discussing that,
  just workaround it and fix the build for now.  The code in question
  will never get used on anything non-ARM anyways.

  Also one fix for AST that SuSE had been hiding in their kernel, that
  allows all fbdev apps to work on that driver"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau: fix build failures on all non ARM.
  drm/ast: Initialized data needed to map fbdev memory
  drm/vc4: Add dependency on HAVE_DMA_ATTRS, and select DRM_GEM_CMA_HELPER
parents 2df4ee78 10855aeb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -315,6 +315,7 @@ int ast_framebuffer_init(struct drm_device *dev,
int ast_fbdev_init(struct drm_device *dev);
void ast_fbdev_fini(struct drm_device *dev);
void ast_fbdev_set_suspend(struct drm_device *dev, int state);
void ast_fbdev_set_base(struct ast_private *ast, unsigned long gpu_addr);

struct ast_bo {
	struct ttm_buffer_object bo;
+7 −0
Original line number Diff line number Diff line
@@ -365,3 +365,10 @@ void ast_fbdev_set_suspend(struct drm_device *dev, int state)

	drm_fb_helper_set_suspend(&ast->fbdev->helper, state);
}

void ast_fbdev_set_base(struct ast_private *ast, unsigned long gpu_addr)
{
	ast->fbdev->helper.fbdev->fix.smem_start =
		ast->fbdev->helper.fbdev->apertures->ranges[0].base + gpu_addr;
	ast->fbdev->helper.fbdev->fix.smem_len = ast->vram_size - gpu_addr;
}
+1 −0
Original line number Diff line number Diff line
@@ -448,6 +448,7 @@ int ast_driver_load(struct drm_device *dev, unsigned long flags)
	dev->mode_config.min_height = 0;
	dev->mode_config.preferred_depth = 24;
	dev->mode_config.prefer_shadow = 1;
	dev->mode_config.fb_base = pci_resource_start(ast->dev->pdev, 0);

	if (ast->chip == AST2100 ||
	    ast->chip == AST2200 ||
+2 −0
Original line number Diff line number Diff line
@@ -547,6 +547,8 @@ static int ast_crtc_do_set_base(struct drm_crtc *crtc,
		ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap);
		if (ret)
			DRM_ERROR("failed to kmap fbcon\n");
		else
			ast_fbdev_set_base(ast, gpu_addr);
	}
	ast_bo_unreserve(bo);

+6 −0
Original line number Diff line number Diff line
@@ -133,18 +133,24 @@ gk20a_instobj_size(struct nvkm_memory *memory)
static void __iomem *
gk20a_instobj_cpu_map_dma(struct nvkm_memory *memory)
{
#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
	struct gk20a_instobj_dma *node = gk20a_instobj_dma(memory);
	struct device *dev = node->base.imem->base.subdev.device->dev;
	int npages = nvkm_memory_size(memory) >> 12;
	struct page *pages[npages];
	int i;

	/* we shouldn't see a gk20a on anything but arm/arm64 anyways */
	/* phys_to_page does not exist on all platforms... */
	pages[0] = pfn_to_page(dma_to_phys(dev, node->handle) >> PAGE_SHIFT);
	for (i = 1; i < npages; i++)
		pages[i] = pages[0] + i;

	return vmap(pages, npages, VM_MAP, pgprot_writecombine(PAGE_KERNEL));
#else
	BUG();
	return NULL;
#endif
}

static void __iomem *
Loading