aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4
AgeCommit message (Collapse)AuthorFilesLines
2016-03-14Merge drm-fixes into drm-next.Dave Airlie7-52/+118
Nouveau wanted this to avoid some worse conflicts when I merge that.
2016-03-09dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc()Luis R. Rodriguez1-3/+2
Rename dma_*_writecombine() to dma_*_wc(), so that the naming is coherent across the various write-combining APIs. Keep the old names for compatibility for a while, these can be removed at a later time. A guard is left to enable backporting of the rename, and later remove of the old mapping defines seemlessly. Build tested successfully with allmodconfig. The following Coccinelle SmPL patch was used for this simple transformation: @ rename_dma_alloc_writecombine @ expression dev, size, dma_addr, gfp; @@ -dma_alloc_writecombine(dev, size, dma_addr, gfp) +dma_alloc_wc(dev, size, dma_addr, gfp) @ rename_dma_free_writecombine @ expression dev, size, cpu_addr, dma_addr; @@ -dma_free_writecombine(dev, size, cpu_addr, dma_addr) +dma_free_wc(dev, size, cpu_addr, dma_addr) @ rename_dma_mmap_writecombine @ expression dev, vma, cpu_addr, dma_addr, size; @@ -dma_mmap_writecombine(dev, vma, cpu_addr, dma_addr, size) +dma_mmap_wc(dev, vma, cpu_addr, dma_addr, size) We also keep the old names as compatibility helpers, and guard against their definition to make backporting easier. Generated-by: Coccinelle SmPL Suggested-by: Ingo Molnar <[email protected]> Signed-off-by: Luis R. Rodriguez <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-02-26drm/vc4: Initialize scaler DISPBKGND on modeset.Eric Anholt2-0/+20
We weren't updating the interlaced bit, so we'd scan out incorrectly if the firmware had brought up the TV encoder and we were switching to HDMI. Signed-off-by: Eric Anholt <[email protected]>
2016-02-26drm/vc4: Fix setting of vertical timings in the CRTC.Eric Anholt1-0/+10
It looks like when I went to add the interlaced bits, I just took the existing PV_VERT* block and indented it, instead of copy and pasting it first. Without this, changing resolution never worked. Signed-off-by: Eric Anholt <[email protected]>
2016-02-26drm/vc4: Fix the name of the VSYNCD_EVEN register.Eric Anholt2-2/+2
It's used for delaying vsync in interlaced mode. Signed-off-by: Eric Anholt <[email protected]>
2016-02-26drm/vc4: Add another reg to HDMI debug dumping.Eric Anholt1-0/+1
This is also involved in the HDMI setup sequence so it's nice to see it. Signed-off-by: Eric Anholt <[email protected]>
2016-02-26drm/vc4: Bring HDMI up from power off if necessary.Eric Anholt2-1/+30
If the firmware hadn't brought up HDMI for us, we need to do its power-on reset sequence (reset HD and and clear its STANDBY bits, reset HDMI, and leave the PHY disabled). Signed-off-by: Eric Anholt <[email protected]>
2016-02-26drm/vc4: Fix a framebuffer reference leak on async flip interrupt.Eric Anholt1-0/+1
We'd need X to queue up an async pageflip while another is outstanding, and then take a SIGIO. I think X actually avoids sending out the next pageflip while one's already queued, but I'm not sure. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Use runtime PM to power cycle the device when the GPU hangs.Eric Anholt3-18/+26
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 <[email protected]>
2016-02-16drm/vc4: Enable runtime PM.Eric Anholt3-0/+47
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 <[email protected]>
2016-02-16drm/vc4: Fix spurious GPU resets due to BO reuse.Eric Anholt2-6/+19
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 <[email protected]>
2016-02-16drm/vc4: Drop error message on seqno wait timeouts.Eric Anholt1-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 <[email protected]>
2016-02-16drm/vc4: Fix -ERESTARTSYS error return from BO waits.Eric Anholt1-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 <[email protected]>
2016-02-16drm/vc4: Return an ERR_PTR from BO creation instead of NULL.Eric Anholt5-15/+15
Fixes igt vc4_create_bo/create-bo-0 by returning -EINVAL from the ioctl instead of -ENOMEM. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Fix the clear color for the first tile rendered.Eric Anholt1-9/+9
Apparently in hardware (as opposed to simulation), the clear colors need to be uploaded before the render config, otherwise they won't take effect. Fixes igt's vc4_wait_bo/used-bo-* subtests. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Validate that WAIT_BO padding is cleared.Eric Anholt1-0/+3
This is ABI future-proofing if we ever want to extend the pad to mean something. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Add support for YUV planes.Eric Anholt2-59/+253
This supports 420 and 422 subsampling with 2 or 3 planes, tested with modetest. It doesn't set up chroma subsampling position (which it appears KMS doesn't deal with yet). The LBM memory is overallocated in many cases, but apparently the docs aren't quite correct and I'll probably need to look at the hardware source to really figure it out. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Add support a few more RGB display plane formats.Eric Anholt1-0/+16
These were all touch-tested with modetest. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Add support for scaling of display planes.Eric Anholt4-13/+374
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 <[email protected]>
2016-02-16drm/vc4: Fix which value is being used for source image size.Eric Anholt1-9/+14
This doesn't matter yet since we only allow 1:1 scaling, but the comment clearly says we should be using the source size. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Add more display planes to each CRTC.Eric Anholt1-16/+40
Previously we only did the primary and cursor plane, but overlay planes are useful and just require this setup to add, since all planes go into the HVS display list in the same way. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Make the CRTCs cooperate on allocating display lists.Eric Anholt3-52/+84
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 <[email protected]>
2016-02-16drm/vc4: Add a proper short-circut path for legacy cursor updates.Eric Anholt2-7/+96
Previously, on every modeset we would allocate new display list memory, recompute changed planes, write all of them to the new memory, and pointed scanout at the new list (which will latch approximately at the next line of scanout). We let drm_atomic_helper_wait_for_vblanks() decide whether we needed to wait for a vblank after a modeset before cleaning up the old state and letting the next modeset proceed, and on legacy cursor updates we wouldn't wait. If you moved the cursor fast enough, we could potentially wrap around the display list memory area and overwrite the existing display list while it was still being scanned out, resulting in the HVS scanning out garbage or just halting. Instead of making cursor updates wait for scanout to move to the new display list area (which introduces significant cursor lag in X), we just rewrite our current display list. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Move the plane clipping/scaling setup to a separate function.Eric Anholt1-26/+52
As we add actual scaling, this is going to get way more complicated. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Add missing __iomem annotation to hw_dlist.Eric Anholt1-1/+1
This is the pointer to the HVS device's memory where we stored the contents of *dlist. Signed-off-by: Eric Anholt <[email protected]>
2016-02-16drm/vc4: Improve comments on vc4_plane_state members.Eric Anholt1-3/+6
Signed-off-by: Eric Anholt <[email protected]>
2016-02-09Merge tag 'topic/drm-misc-2016-02-08' of ↵Dave Airlie3-31/+0
git://anongit.freedesktop.org/drm-intel into drm-next First drm-misc pull req for 4.6. Big one is the drm_event cleanup, which is also prep work for adding android fence support to kms (Gustavo is planning to do that). Otherwise random small bits all over. * tag 'topic/drm-misc-2016-02-08' of git://anongit.freedesktop.org/drm-intel: (33 commits) gma500: clean up an excessive and confusing helper drm/gma500: remove helper function drm/vmwgfx: Nuke preclose hook drm/vc4: Nuke preclose hook drm/tilcdc: Nuke preclose hook drm/tegra: Stop cancelling page flip events drm/shmob: Nuke preclose hook drm/rcar: Nuke preclose hook drm/omap: Nuke close hooks drm/msm: Nuke preclose hooks drm/imx: Unconfuse preclose logic drm/exynos: Remove event cancelling from postclose drm/atmel: Nuke preclose drm/i915: Nuke intel_modeset_preclose drm: Nuke vblank event file cleanup code drm: Clean up pending events in the core drm/vblank: Use drm_event_reserve_init drm/vmwgfx: fix a NULL dereference drm/crtc-helper: Add caveat to disable_unused_functions doc drm/gma500: Remove empty preclose hook ...
2016-02-08drm/vc4: Nuke preclose hookDaniel Vetter3-31/+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 <[email protected]> Acked-by: Daniel Stone <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1) Acked-by: Eric Anholt <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-01-29Merge tag 'drm-vc4-fixes-2015-01-19' of http://github.com/anholt/linux into ↵Dave Airlie1-10/+7
drm-fixes This pull request just includes the !CONFIG_PM_SLEEP build fix for vc4. * tag 'drm-vc4-fixes-2015-01-19' of http://github.com/anholt/linux: drm/vc4: Remove broken attempt at GPU reset using genpd.
2016-01-20dma-mapping: always provide the dma_map_ops based implementationChristoph Hellwig1-1/+1
Move the generic implementation to <linux/dma-mapping.h> now that all architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now that everyone supports them. [[email protected]: remove leftovers in Kconfig] Signed-off-by: Christoph Hellwig <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Aurelien Jacquiot <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: David Howells <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> Cc: Helge Deller <[email protected]> Cc: James Hogan <[email protected]> Cc: Jesper Nilsson <[email protected]> Cc: Koichi Yasutake <[email protected]> Cc: Ley Foon Tan <[email protected]> Cc: Mark Salter <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Steven Miao <[email protected]> Cc: Vineet Gupta <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Sebastian Ott <[email protected]> Signed-off-by: Valentin Rothberg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-01-19drm/vc4: Remove broken attempt at GPU reset using genpd.Eric Anholt1-10/+7
I've tested and confirmed that it doesn't actually work. We'll need to sort out how to do this properly later, but for now just remove it since it also caused build breakage due to using CONFIG_PM_SLEEP functions without our Kconfig depending on PM_SLEEP. Signed-off-by: Eric Anholt <[email protected]> Acked-by: Sudip Mukherjee <[email protected]>
2016-01-17drm/vc4: fix warning in validate printf.Dave Airlie1-1/+1
This just fixes a warning on 64-bit builds: drivers/gpu/drm/vc4/vc4_validate.c: In function ‘validate_gl_shader_rec’: drivers/gpu/drm/vc4/vc4_validate.c:864:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Wformat=] Reported-by: Linus Torvalds <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2016-01-18Merge tag 'topic/drm-misc-2016-01-17' of ↵Dave Airlie1-1/+1
git://anongit.freedesktop.org/drm-intel into drm-next Since your main drm-next pull isn't out of the door yet I figured I might as well flush out drm-misc instead of delaying for 4.6. It's really just random stuff all over, biggest thing probably connector_mask tracking from Maarten. * tag 'topic/drm-misc-2016-01-17' of git://anongit.freedesktop.org/drm-intel: (24 commits) drm/fb_cma_helper: Remove implicit call to disable_unused_functions drm/sysfs: use kobj_to_dev() drm/i915: Init power domains early in driver load drm: Do not set connector->encoder in drivers apple-gmux: Add initial documentation drm: move MODULE_PARM_DESC to other file drm/edid: index CEA/HDMI mode tables using the VIC drm/atomic: Remove drm_atomic_connectors_for_crtc. drm/i915: Update connector_mask during readout, v2. drm: Remove opencoded drm_gem_object_release_handle() drm: Do not set outparam on error during GEM handle allocation drm/docs: more leftovers from the big vtable documentation pile drm/atomic-helper: Reject legacy flips on a disabled pipe drm/atomic: add connector mask to drm_crtc_state. drm/tegra: Use __drm_atomic_helper_reset_connector for subclassing connector state, v2. drm/atomic: Add __drm_atomic_helper_connector_reset, v2. drm/i915: Set connector_state->connector using the helper. drm: Use a normal idr allocation for the obj->name drm: Only bump object-reference count when adding first handle drm: Balance error path for GEM handle allocation ...
2016-01-06drm/atomic: Remove drm_atomic_connectors_for_crtc.Maarten Lankhorst1-1/+1
Now that connector_mask is reliable there's no need for this function any more. Signed-off-by: Maarten Lankhorst <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-6-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Daniel Vetter <[email protected]>
2015-12-22Merge tag 'drm-vc4-next-2015-12-21' of http://github.com/anholt/linux into ↵Dave Airlie1-21/+20
drm-next I've decided to just send this fixes-for-next pull request now, even if we don't have a patch for the CONFIG_PM_SLEEP build failure reviewed. If you like my patch for that, I'd be happy to see it applied directly. This pull request brings in little fixes from Dan Carpenter for the 3D support added in this -next cycle. * tag 'drm-vc4-next-2015-12-21' of http://github.com/anholt/linux: drm/vc4: fix an error code drm/vc4: allocate enough memory in vc4_save_hang_state() drm/vc4: copy_to_user() returns the number of bytes remaining
2015-12-17drm/vc4: fix an error codeDan Carpenter1-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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
2015-12-17drm/vc4: allocate enough memory in vc4_save_hang_state()Dan Carpenter1-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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
2015-12-17drm/vc4: copy_to_user() returns the number of bytes remainingDan Carpenter1-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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
2015-12-15drm: use dev_name as default unique name in drm_dev_alloc()Nicolas Iooss1-2/+0
The following code pattern exists in some DRM drivers: ddev = drm_dev_alloc(&driver, parent_dev); drm_dev_set_unique(ddev, dev_name(parent_dev)); (Sometimes dev_name(ddev->dev) is used, which is the same.) As suggested in http://lists.freedesktop.org/archives/dri-devel/2015-December/096441.html, the unique name of a new DRM device can be set as dev_name(parent_dev) when parent_dev is not NULL (vgem is a special case). Signed-off-by: Nicolas Iooss <[email protected]> Acked-by: Boris Brezillon <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2015-12-15Merge tag 'drm-vc4-next-2015-12-11' of http://github.com/anholt/linux into ↵Dave Airlie19-17/+5284
drm-next This pull request brings in 3D acceleration support for the VC4 GPU. While there is still performance work to be done (particularly surrounding RCL generation), the CL submit ABI should be settled and done now. * tag 'drm-vc4-next-2015-12-11' of http://github.com/anholt/linux: drm/vc4: Add an interface for capturing the GPU state after a hang. drm/vc4: Add support for async pageflips. drm/vc4: Add support for drawing 3D frames. drm/vc4: Bind and initialize the V3D engine. drm/vc4: Fix a typo in a V3D debug register. drm/vc4: Add an API for creating GPU shaders in GEM BOs. drm/vc4: Add create and map BO ioctls. drm/vc4: Add a BO cache. drm: Create a driver hook for allocating GEM object structs.
2015-12-11drm: Pass 'name' to drm_encoder_init()Ville Syrjälä1-1/+1
Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ) { ... } @@ identifier dev, encoder, funcs; @@ int drm_encoder_init(struct drm_device *dev, struct drm_encoder *encoder, const struct drm_encoder_funcs *funcs, int encoder_type + ,const char *name, int DOTDOTDOT ); @@ expression E1, E2, E3, E4; @@ drm_encoder_init(E1, E2, E3, E4 + ,NULL ) v2: Add ', or NULL...' to @name kernel doc (Jani) Annotate the function with __printf() attribute (Jani) Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2015-12-11drm: Pass 'name' to drm_universal_plane_init()Ville Syrjälä1-1/+1
Done with coccinelle for the most part. It choked on msm/mdp/mdp5/mdp5_plane.c like so: "BAD:!!!!! enum drm_plane_type type;" No idea how to deal with that, so I just fixed that up by hand. Also it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. I didn't convert drm_plane_init() since passing the varargs through would mean either cpp macros or va_list, and I figured we don't care about these legacy functions enough to warrant the extra pain. @@ typedef uint32_t; identifier dev, plane, possible_crtcs, funcs, formats, format_count, type; @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane, unsigned long possible_crtcs, const struct drm_plane_funcs *funcs, const uint32_t *formats, unsigned int format_count, enum drm_plane_type type + ,const char *name, int DOTDOTDOT ) { ... } @@ identifier dev, plane, possible_crtcs, funcs, formats, format_count, type; @@ int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane, unsigned long possible_crtcs, const struct drm_plane_funcs *funcs, const uint32_t *formats, unsigned int format_count, enum drm_plane_type type + ,const char *name, int DOTDOTDOT ); @@ expression E1, E2, E3, E4, E5, E6, E7; @@ drm_universal_plane_init(E1, E2, E3, E4, E5, E6, E7 + ,NULL ) v2: Split crtc and plane changes apart Pass NUL for no-name instead of "" Leave drm_plane_init() alone v3: Add ', or NULL...' to @name kernel doc (Jani) Annotate the function with __printf() attribute (Jani) Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2015-12-11drm: Pass 'name' to drm_crtc_init_with_planes()Ville Syrjälä1-1/+1
Done with coccinelle for the most part. However, it thinks '...' is part of the semantic patch, so I put an 'int DOTDOTDOT' placeholder in its place and got rid of it with sed afterwards. I didn't convert drm_crtc_init() since passing the varargs through would mean either cpp macros or va_list, and I figured we don't care about these legacy functions enough to warrant the extra pain. @@ identifier dev, crtc, primary, cursor, funcs; @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc, struct drm_plane *primary, struct drm_plane *cursor, const struct drm_crtc_funcs *funcs + ,const char *name, int DOTDOTDOT ) { ... } @@ identifier dev, crtc, primary, cursor, funcs; @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc, struct drm_plane *primary, struct drm_plane *cursor, const struct drm_crtc_funcs *funcs + ,const char *name, int DOTDOTDOT ); @@ expression E1, E2, E3, E4, E5; @@ drm_crtc_init_with_planes(E1, E2, E3, E4, E5 + ,NULL ) v2: Split crtc and plane changes apart Pass NULL for no-name instead of "" Leave drm_crtc_init() alone v3: Add ', or NULL...' to @name kernel doc (Jani) Annotate the function with __printf() attribute (Jani) Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2015-12-07drm/vc4: Add an interface for capturing the GPU state after a hang.Eric Anholt3-0/+191
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 <[email protected]>
2015-12-07drm/vc4: Add support for async pageflips.Eric Anholt5-2/+342
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 <[email protected]>
2015-12-07drm/vc4: Add support for drawing 3D frames.Eric Anholt11-1/+3102
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 <[email protected]>
2015-12-07drm/vc4: Bind and initialize the V3D engine.Eric Anholt5-0/+242
This is the component of the GPU that does 3D rendering. Signed-off-by: Eric Anholt <[email protected]>
2015-12-07drm/vc4: Fix a typo in a V3D debug register.Eric Anholt1-1/+1
Signed-off-by: Eric Anholt <[email protected]>
2015-12-07drm/vc4: Add an API for creating GPU shaders in GEM BOs.Eric Anholt6-5/+974
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 <[email protected]>
2015-12-07drm/vc4: Add create and map BO ioctls.Eric Anholt3-0/+48
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 <[email protected]>