aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/v3d/v3d_bo.c
AgeCommit message (Collapse)AuthorFilesLines
2019-04-01drm/v3d: fix a NULL vs error pointer mixupDan Carpenter1-2/+2
The drm_gem_shmem_create() returns error pointers and v3d_bo_create() is also supposed to return error pointers. Fixes: 40609d4820b2 ("drm/v3d: Use the new shmem helpers to reduce driver boilerplate.") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20190321062731.GC21489@kadam
2019-03-14drm/v3d: Use the new shmem helpers to reduce driver boilerplate.Eric Anholt1-221/+90
The new shmem helpers from Noralf and Rob abstract out a bunch of our BO creation and mapping code. v2: Use the new sgt getter, and flag pages as dirty before freeing. v3: Remove the mismatched put_pages. Signed-off-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Rob Herring <[email protected]> (v2)
2019-03-14drm/v3d: Remove some dead members of struct v3d_bo.Eric Anholt1-1/+0
vmas was from the previous model of page table management (one per fd), and vaddr was left over from vc4. Signed-off-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Rob Herring <[email protected]>
2019-02-19drm: v3d: Switch to use drm_gem_object reservation_objectRob Herring1-13/+1
Now that the base struct drm_gem_object has a reservation_object, use it and remove the private BO one. Cc: Eric Anholt <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: David Airlie <[email protected]> Cc: [email protected] Signed-off-by: Rob Herring <[email protected]> Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Maxime Ripard <[email protected]>
2019-02-19drm/v3d: Fix BO stats accounting for dma-buf-imported buffers.Eric Anholt1-0/+6
We always decrement at GEM free, so make sure we increment at GEM creation for dma-bufs. Signed-off-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Maxime Ripard <[email protected]>
2018-11-30drm/v3d: Fix prime imports of buffers from other drivers.Eric Anholt1-0/+1
v3d_bo_get_pages() checks this to decide to map the imported buffer instead of the backing shmem file. The caller was about to set this value anyway, and there's no error path in between. Ideally we wouldn't even allocate the shmem file for our imports, but that's a more invasive fix. Signed-off-by: Eric Anholt <[email protected]> Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Daniel Vetter <[email protected]> Reviewed-by: Dave Emett <[email protected]>
2018-07-05drm/v3d: use new return type vm_fault_t in v3d_gem_faultSouptick Joarder1-23/+5
Instead of converting an errno into a vm_fault_t ourselves, use vmf_insert_mixed() which returns a vm_fault_t directly. Signed-off-by: Souptick Joarder <[email protected]> Signed-off-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20180704145556.GA11036@jordon-HP-15-Notebook-PC Reviewed-by: Matthew Wilcox <[email protected]>
2018-05-03drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+Eric Anholt1-0/+389
This driver will be used to support Mesa on the Broadcom 7268 and 7278 platforms. V3D 3.3 introduces an MMU, which means we no longer need CMA or vc4's complicated CL/shader validation scheme. This massively changes the GEM behavior, so I've forked off to a new driver. v2: Mark SUBMIT_CL as needing DRM_AUTH. coccinelle fixes from kbuild test robot. Drop personal git link from MAINTAINERS. Don't double-map dma-buf imported BOs. Add kerneldoc about needing MMU eviction. Drop prime vmap/unmap stubs. Delay mmap offset setup to mmap time. Use drm_dev_init instead of _alloc. Use ktime_get() for wait_bo timeouts. Drop drm_can_sleep() usage, since we don't modeset. Switch page tables back to WC (debug change to coherent had slipped in). Switch drm_gem_object_unreference_unlocked() to drm_gem_object_put_unlocked(). Simplify overflow mem handling by not sharing overflow mem between jobs. v3: no changes v4: align submit_cl to 64 bits (review by airlied), check zero flags in other ioctls. Signed-off-by: Eric Anholt <[email protected]> Acked-by: Daniel Vetter <[email protected]> (v4) Acked-by: Dave Airlie <[email protected]> (v3, requested submit_cl change) Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]