summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_gem.c
Commit message (Collapse)AuthorAgeFilesLines
...
* drm/vc4: Use runtime PM to power cycle the device when the GPU hangs.Eric Anholt2016-02-161-5/+21
| | | | | | | | 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/+10
| | | | | | | | | | | | | | | | | | | | 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-5/+14
| | | | | | | | | 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: Drop error message on seqno wait timeouts.Eric Anholt2016-02-161-3/+0
| | | | | | | | | These ioctls end up getting exposed to fairly directly to GL users, and having normal user operations print DRM errors is obviously wrong. The message was originally to give us some idea of what happened when a hang occurred, but we have a DRM_INFO from reset for that. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Fix -ERESTARTSYS error return from BO waits.Eric Anholt2016-02-161-4/+2
| | | | | | | | | This caused the wait ioctls to claim that waiting had completed when we actually got interrupted by a signal before it was done. Fixes broken rendering throttling that produced serious lag in X window dragging. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Return an ERR_PTR from BO creation instead of NULL.Eric Anholt2016-02-161-2/+2
| | | | | | | Fixes igt vc4_create_bo/create-bo-0 by returning -EINVAL from the ioctl instead of -ENOMEM. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Validate that WAIT_BO padding is cleared.Eric Anholt2016-02-161-0/+3
| | | | | | | This is ABI future-proofing if we ever want to extend the pad to mean something. Signed-off-by: Eric Anholt <eric@anholt.net>
* drm/vc4: fix an error codeDan Carpenter2015-12-171-1/+1
| | | | | | | | | "exec->exec_bo" is NULL at this point so this code returns success. We want to return -ENOMEM. Fixes: d5b1a78a772f ('drm/vc4: Add support for drawing 3D frames.') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* drm/vc4: allocate enough memory in vc4_save_hang_state()Dan Carpenter2015-12-171-1/+1
| | | | | | | | "state" is smaller than "kernel_state" so we end up corrupting memory. Fixes: 214613656b51 ('drm/vc4: Add an interface for capturing the GPU state after a hang.') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* drm/vc4: copy_to_user() returns the number of bytes remainingDan Carpenter2015-12-171-19/+18
| | | | | | | | | | | | | The copy_to/from_user() functions return the number of bytes remaining to be copied. We want to return error codes here. Also it's a bad idea to print an error message if a copy from user fails because users can use that to spam /var/log/messages which is annoying so I removed those. Fixes: 214613656b51 ('drm/vc4: Add an interface for capturing the GPU state after a hang.') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* drm/vc4: Add an interface for capturing the GPU state after a hang.Eric Anholt2015-12-071-0/+185
| | | | | | | | | 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/+40
| | | | | | | | 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/+642
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>
OpenPOWER on IntegriCloud