summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_drv.h
Commit message (Collapse)AuthorAgeFilesLines
* drm/vc4: Add DPI driverEric Anholt2016-04-141-0/+5
| | | | | | | | | | | | | The DPI interface involves taking a ton of our GPIOs to be used as outputs, and routing display signals over them in parallel. v2: Use display_info.bus_formats[] to replace our custom DT properties. v3: Rebase on V3D documentation changes. v4: Fix rebase detritus from V3D documentation changes. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Rob Herring <robh@kernel.org>
* drm/vc4: improve throughput by pipelining binning and rendering jobsVarad Gautam2016-03-131-9/+28
| | | | | | | | | | | | | | | | | | | The hardware provides us with separate threads for binning and rendering, and the existing model waits for them both to complete before submitting the next job. Splitting the binning and rendering submissions reduces idle time and gives us approx 20-30% speedup with some x11perf tests such as -line10 and -tilerect1. Improves openarena performance by 1.01897% +/- 0.247857% (n=16). Thanks to anholt for suggesting this. v2: Rebase on the spurious resets fix (change by anholt). Signed-off-by: Varad Gautam <varadgautam@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Eric Anholt <eric@anholt.net>
* Merge drm-fixes into drm-next.Dave Airlie2016-03-141-2/+11
|\ | | | | | | Nouveau wanted this to avoid some worse conflicts when I merge that.
| * drm/vc4: Use runtime PM to power cycle the device when the GPU hangs.Eric Anholt2016-02-161-1/+5
| | | | | | | | | | | | | | | | This gets us functional GPU reset again, like we had until a refactor at merge time. Tested with a little patch to stuff in a broken binner job every 100 frames. Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/vc4: Enable runtime PM.Eric Anholt2016-02-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This may actually get us a feature that the closed driver didn't have: turning off the GPU in between rendering jobs, while the V3D device is still opened by the client. There may be some tuning to be applied here to use autosuspend so that we don't bounce the device's power so much, but in steady-state GPU-bound rendering we keep the power on (since we keep multiple jobs outstanding) and even if we power cycle on every job we can still manage at least 680 fps. More importantly, though, runtime PM will allow us to power off the device to do a GPU reset. v2: Switch #ifdef to CONFIG_PM not CONFIG_PM_SLEEP (caught by kbuild test robot) Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/vc4: Fix spurious GPU resets due to BO reuse.Eric Anholt2016-02-161-1/+5
| | | | | | | | | | | | | | | | | | We were tracking the "where are the head pointers pointing" globally, so if another job reused the same BOs and execution was at the same point as last time we checked, we'd stop and trigger a reset even though the GPU had made progress. Signed-off-by: Eric Anholt <eric@anholt.net>
* | drm/vc4: Add support for scaling of display planes.Eric Anholt2016-02-161-0/+4
| | | | | | | | | | | | | | | | This implements a simple policy for choosing scaling modes (trapezoidal for decimation, PPF for magnification), and a single PPF filter (Mitchell/Netravali's recommendation). Signed-off-by: Eric Anholt <eric@anholt.net>
* | drm/vc4: Make the CRTCs cooperate on allocating display lists.Eric Anholt2016-02-161-1/+7
| | | | | | | | | | | | | | | | So far, we've only ever lit up one CRTC, so this has been fine. To extend to more displays or more planes, we need to make sure we don't run our display lists into each other. Signed-off-by: Eric Anholt <eric@anholt.net>
* | drm/vc4: Nuke preclose hookDaniel Vetter2016-02-081-1/+0
|/ | | | | | | | | | | | | | Again since the drm core takes care of event unlinking/disarming this is now just needless code. v2: Fixup misplaced hunk. Cc: Eric Anholt <eric@anholt.net> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1) Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1453756616-28942-14-git-send-email-daniel.vetter@ffwll.ch
* drm/vc4: Add an interface for capturing the GPU state after a hang.Eric Anholt2015-12-071-0/+4
| | | | | | | | | This can be parsed with vc4-gpu-tools tools for trying to figure out what was going on. v2: Use __u32-style types. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Add support for async pageflips.Eric Anholt2015-12-071-0/+16
| | | | | | | | An async pageflip stores the modeset to be done and executes it once the BOs are ready to be displayed. This gets us about 3x performance in full screen rendering with pageflipping. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Add support for drawing 3D frames.Eric Anholt2015-12-071-0/+182
| | | | | | | | | | | | | The user submission is basically a pointer to a command list and a pointer to uniforms. We copy those in to the kernel, validate and relocate them, and store the result in a GPU BO which we queue for execution. v2: Drop support for NV shader recs (not necessary for GL), simplify vc4_use_bo(), improve bin flush/semaphore checks, use __u32 style types. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Bind and initialize the V3D engine.Eric Anholt2015-12-071-0/+13
| | | | | | This is the component of the GPU that does 3D rendering. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Add an API for creating GPU shaders in GEM BOs.Eric Anholt2015-12-071-0/+50
| | | | | | | | | | | | | | Since we have no MMU, the kernel needs to validate that the submitted shader code won't make any accesses to memory that the user doesn't control, which involves banning some operations (general purpose DMA writes), and tracking where we need to write out pointers for other operations (texture sampling). Once it's validated, we return a GEM BO containing the shader, which doesn't allow mapping for write or exporting to other subsystems. v2: Use __u32-style types. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Add create and map BO ioctls.Eric Anholt2015-12-071-0/+4
| | | | | | | | | | | While there exist dumb APIs for creating and mapping BOs, one of the rules is that drivers doing 3D acceleration have to provide their own APIs for buffer allocation (besides, the pitch/height parameters of the dumb alloc don't really make sense for a lot of 3D allocations). v2: Use __u32-style types, use "drm.h" instead of <drm/drm.h>. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Add a BO cache.Eric Anholt2015-12-071-1/+48
| | | | | | | | | | | 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 <eric@anholt.net>
* Merge tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux into ↵Dave Airlie2015-10-221-2/+2
| | | | | | | | | | | | | | | | | | | 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 <daniel.vetter@ffwll.ch> * 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.
* drm/vc4: Use the fbdev_cma helpersDerek Foreman2015-10-211-0/+2
| | | | | | | | 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 <derekf@osg.samsung.com> Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Add KMS support for Raspberry Pi.Eric Anholt2015-10-211-0/+143
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 <eric@anholt.net> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
OpenPOWER on IntegriCloud