Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+19 -1
+1
drivers/gpu/drm/ast/ast_drv.h
··· 315 315 int ast_fbdev_init(struct drm_device *dev); 316 316 void ast_fbdev_fini(struct drm_device *dev); 317 317 void ast_fbdev_set_suspend(struct drm_device *dev, int state); 318 + void ast_fbdev_set_base(struct ast_private *ast, unsigned long gpu_addr); 318 319 319 320 struct ast_bo { 320 321 struct ttm_buffer_object bo;
+7
drivers/gpu/drm/ast/ast_fb.c
··· 365 365 366 366 drm_fb_helper_set_suspend(&ast->fbdev->helper, state); 367 367 } 368 + 369 + void ast_fbdev_set_base(struct ast_private *ast, unsigned long gpu_addr) 370 + { 371 + ast->fbdev->helper.fbdev->fix.smem_start = 372 + ast->fbdev->helper.fbdev->apertures->ranges[0].base + gpu_addr; 373 + ast->fbdev->helper.fbdev->fix.smem_len = ast->vram_size - gpu_addr; 374 + }
+1
drivers/gpu/drm/ast/ast_main.c
··· 448 448 dev->mode_config.min_height = 0; 449 449 dev->mode_config.preferred_depth = 24; 450 450 dev->mode_config.prefer_shadow = 1; 451 + dev->mode_config.fb_base = pci_resource_start(ast->dev->pdev, 0); 451 452 452 453 if (ast->chip == AST2100 || 453 454 ast->chip == AST2200 ||
+2
drivers/gpu/drm/ast/ast_mode.c
··· 547 547 ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap); 548 548 if (ret) 549 549 DRM_ERROR("failed to kmap fbcon\n"); 550 + else 551 + ast_fbdev_set_base(ast, gpu_addr); 550 552 } 551 553 ast_bo_unreserve(bo); 552 554
+6
drivers/gpu/drm/nouveau/nvkm/subdev/instmem/gk20a.c
··· 133 133 static void __iomem * 134 134 gk20a_instobj_cpu_map_dma(struct nvkm_memory *memory) 135 135 { 136 + #if defined(CONFIG_ARM) || defined(CONFIG_ARM64) 136 137 struct gk20a_instobj_dma *node = gk20a_instobj_dma(memory); 137 138 struct device *dev = node->base.imem->base.subdev.device->dev; 138 139 int npages = nvkm_memory_size(memory) >> 12; 139 140 struct page *pages[npages]; 140 141 int i; 141 142 143 + /* we shouldn't see a gk20a on anything but arm/arm64 anyways */ 142 144 /* phys_to_page does not exist on all platforms... */ 143 145 pages[0] = pfn_to_page(dma_to_phys(dev, node->handle) >> PAGE_SHIFT); 144 146 for (i = 1; i < npages; i++) 145 147 pages[i] = pages[0] + i; 146 148 147 149 return vmap(pages, npages, VM_MAP, pgprot_writecombine(PAGE_KERNEL)); 150 + #else 151 + BUG(); 152 + return NULL; 153 + #endif 148 154 } 149 155 150 156 static void __iomem *
+2 -1
drivers/gpu/drm/vc4/Kconfig
··· 1 1 config DRM_VC4 2 2 tristate "Broadcom VC4 Graphics" 3 3 depends on ARCH_BCM2835 || COMPILE_TEST 4 - depends on DRM 4 + depends on DRM && HAVE_DMA_ATTRS 5 5 select DRM_KMS_HELPER 6 6 select DRM_KMS_CMA_HELPER 7 + select DRM_GEM_CMA_HELPER 7 8 help 8 9 Choose this option if you have a system that has a Broadcom 9 10 VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835.