summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_gem.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>