aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4
AgeCommit message (Collapse)AuthorFilesLines
2015-12-07drm/vc4: Add a BO cache.Eric Anholt4-8/+384
We need to allocate new BOs in the kernel as part of each frame, but the CMA allocator is way too slow for that. As an optimization, keep track of recently-freed BOs and reuse them, with a 1 second timeout to fully free them back to the system. This improves 3D performance by about 15%. Signed-off-by: Eric Anholt <[email protected]>
2015-11-17drm/vc4: Make sure that planes aren't scaled.Eric Anholt1-0/+10
We would scan out the memory around them if an upscale was attempted, and would just scan out incorrectly for downscaling. Signed-off-by: Eric Anholt <[email protected]>
2015-11-17drm/vc4: Fix some failure to track __iomem decorations on pointers.Eric Anholt2-5/+6
Caught by the kbuild test robot. v2: Fix the +i I dropped in the first version. Signed-off-by: Eric Anholt <[email protected]>
2015-11-17drm/vc4: checking for NULL instead of IS_ERRDan Carpenter1-2/+2
vc4_plane_init() returns an ERR_PTR on error, it doesn't return NULL. This was obviously intended because the next lines call PTR_ERR(primary_plane) already. Fixes: c8b75bca92cb ('Eric Anholt <[email protected]>') Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2015-11-17drm/vc4: fix itnull.cocci warningsJulia Lawall1-1/+1
Connector cannot be null because it is a list entry, ie accessed at an offset from the positions of the list structure pointers themselves. Generated by: scripts/coccinelle/iterators/itnull.cocci Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2015-11-17drm/vc4: fix platform_no_drv_owner.cocci warningsJulia Lawall1-1/+0
drivers/gpu/drm/vc4/vc4_drv.c:248:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2015-11-17drm/vc4: vc4_plane_duplicate_state() can be statickbuild test robot1-4/+4
Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2015-11-10drm/vc4: Add dependency on HAVE_DMA_ATTRS, and select DRM_GEM_CMA_HELPERGuenter Roeck1-1/+2
Avoid the following build errors, seen with m68k:allmodconfig and other architectures which do not support HAVE_DMA_ATTRS. ERROR: "drm_gem_cma_create" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_prime_mmap" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_prime_get_sg_table" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_vm_ops" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_mmap" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_prime_vunmap" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_prime_import_sg_table" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_free_object" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_prime_vmap" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_dumb_map_offset" [drivers/gpu/drm/vc4/vc4.ko] undefined! ERROR: "drm_gem_cma_create" [drivers/gpu/drm/drm_kms_helper.ko] undefined! ERROR: "drm_gem_cma_describe" [drivers/gpu/drm/drm_kms_helper.ko] undefined! ERROR: "drm_gem_cma_free_object" [drivers/gpu/drm/drm_kms_helper.ko] undefined! Acked-by: Eric Anholt <[email protected]> Fixes: c8b75bca92cb ("drm/vc4: Add KMS support for Raspberry Pi.") Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2015-10-22Merge tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux into ↵Dave Airlie12-0/+2946
drm-next This pull request introduces the vc4 driver, for kernel modesetting on the Raspberry Pi (bcm2835/bcm2836 architectures). It currently supports a display plane and cursor on the HDMI output. The driver doesn't do 3D, power management, or overlay planes yet. [airlied: fixup the enable/disable vblank APIs] Acked-by: Daniel Vetter <[email protected]> * tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux: drm/vc4: Allow vblank to be disabled drm/vc4: Use the fbdev_cma helpers drm/vc4: Add KMS support for Raspberry Pi. drm/vc4: Add devicetree bindings for VC4.
2015-10-21drm/vc4: Allow vblank to be disabledDerek Foreman1-0/+1
Signed-off-by: Derek Foreman <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2015-10-21drm/vc4: Use the fbdev_cma helpersDerek Foreman3-3/+31
Keep the fbdev_cma pointer around so we can use it on hotplog and close to ensure the frame buffer console is in a useful state. Signed-off-by: Derek Foreman <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2015-10-21drm/vc4: Add KMS support for Raspberry Pi.Eric Anholt12-0/+2917
This is enough for fbcon and bringing up X using xf86-video-modesetting. It doesn't support the 3D accelerator or power management yet. v2: Drop FB_HELPER select thanks to Archit's patches. Do manual init ordering instead of using the .load hook. Structure registration more like tegra's, but still using the typical "component" code. Drop no-op hooks for atomic_begin and mode_fixup() now that they're optional. Drop sentinel in Makefile. Fix minor style nits I noticed on another reread. v3: Use the new bcm2835 clk driver to manage pixel/HSM clocks instead of having a fixed video mode. Use exynos-style component driver matching instead of devicetree nodes to list the component driver instances. Rename compatibility strings to say bcm2835, and distinguish pv0/1/2. Clean up some h/vsync code, and add in interlaced mode setup. Fix up probe/bind error paths. Use bitops.h macros for vc4_regs.h v4: Include i2c.h, allow building under COMPILE_TEST, drop msleep now that other bugs have been fixed, add timeouts to cpu_relax() loops, rename hpd-gpio to hpd-gpios. Signed-off-by: Eric Anholt <[email protected]> Acked-by: Daniel Vetter <[email protected]>