aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/udl/udl_gem.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-09drm: kill ->gem_init_object() and friendsDavid Herrmann1-7/+0
All drivers embed gem-objects into their own buffer objects. There is no reason to keep drm_gem_object_alloc(), gem->driver_private and ->gem_init_object() anymore. New drivers are highly encouraged to do the same. There is no benefit in allocating gem-objects separately. Cc: Dave Airlie <[email protected]> Cc: Alex Deucher <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Jerome Glisse <[email protected]> Cc: Rob Clark <[email protected]> Cc: Inki Dae <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Patrik Jakobsson <[email protected]> Signed-off-by: David Herrmann <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-09-16drm/udl: rip out set_need_reschedDaniel Vetter1-1/+0
This very much looks like copypasta from drm/i915's fault handler. It was used there to duct-tape over issues around gpu reset handling. Since that can't ever happen for udl and there's seemingly no other reason for this just drop it. Reported-by: Peter Zijlstra <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-08-19drm/udl: use gem get/put page helpersRob Clark1-38/+6
Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-08-07drm/gem: create drm_gem_dumb_destroyDaniel Vetter1-6/+0
All the gem based kms drivers really want the same function to destroy a dumb framebuffer backing storage object. So give it to them and roll it out in all drivers. This still leaves the option open for kms drivers which don't use GEM for backing storage, but it does decently simplify matters for gem drivers. Acked-by: Inki Dae <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Cc: Intel Graphics Development <[email protected]> Cc: Ben Skeggs <[email protected]> Reviwed-by: Rob Clark <[email protected]> Cc: Alex Deucher <[email protected]> Acked-by: Patrik Jakobsson <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-07-25drm/gem: convert to new unified vma managerDavid Herrmann1-8/+5
Use the new vma manager instead of the old hashtable. Also convert all drivers to use the new convenience helpers. This drops all the (map_list.hash.key << PAGE_SHIFT) non-sense. Locking and access-management is exactly the same as before with an additional lock inside of the vma-manager, which strictly wouldn't be needed for gem. v2: - rebase on drm-next - init nodes via drm_vma_node_reset() in drm_gem.c v3: - fix tegra v4: - remove duplicate if (drm_vma_node_has_offset()) checks - inline now trivial drm_vma_node_offset_addr() calls v5: - skip node-reset on gem-init due to kzalloc() - do not allow mapping gem-objects with offsets (backwards compat) - remove unneccessary casts Cc: Inki Dae <[email protected]> Cc: Rob Clark <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Thierry Reding <[email protected]> Signed-off-by: David Herrmann <[email protected]> Acked-by: Patrik Jakobsson <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-05-01drm: prime: fix refcounting on the dmabuf import error pathImre Deak1-0/+4
In commit be8a42ae60 we inroduced a refcount problem, where on the drm_gem_prime_fd_to_handle() error path we'll call dma_buf_put() for self imported dma buffers. Fix this by taking a reference on the dma buffer in the .gem_import hook instead of assuming the caller had taken one. Besides fixing the bug this is also more logical. Signed-off-by: Imre Deak <[email protected]> Cc: [email protected] Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-02-22new helper: file_inode(file)Al Viro1-1/+1
Signed-off-by: Al Viro <[email protected]>
2012-10-03Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds1-7/+0
Pull drm merge (part 1) from Dave Airlie: "So first of all my tree and uapi stuff has a conflict mess, its my fault as the nouveau stuff didn't hit -next as were trying to rebase regressions out of it before we merged. Highlights: - SH mobile modesetting driver and associated helpers - some DRM core documentation - i915 modesetting rework, haswell hdmi, haswell and vlv fixes, write combined pte writing, ilk rc6 support, - nouveau: major driver rework into a hw core driver, makes features like SLI a lot saner to implement, - psb: add eDP/DP support for Cedarview - radeon: 2 layer page tables, async VM pte updates, better PLL selection for > 2 screens, better ACPI interactions The rest is general grab bag of fixes. So why part 1? well I have the exynos pull req which came in a bit late but was waiting for me to do something they shouldn't have and it looks fairly safe, and David Howells has some more header cleanups he'd like me to pull, that seem like a good idea, but I'd like to get this merge out of the way so -next dosen't get blocked." Tons of conflicts mostly due to silly include line changes, but mostly mindless. A few other small semantic conflicts too, noted from Dave's pre-merged branch. * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (447 commits) drm/nv98/crypt: fix fuc build with latest envyas drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering drm/nv41/vm: fix and enable use of "real" pciegart drm/nv44/vm: fix and enable use of "real" pciegart drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie drm/nouveau: store supported dma mask in vmmgr drm/nvc0/ibus: initial implementation of subdev drm/nouveau/therm: add support for fan-control modes drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules drm/nouveau/therm: calculate the pwm divisor on nv50+ drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster drm/nouveau/therm: move thermal-related functions to the therm subdev drm/nouveau/bios: parse the pwm divisor from the perf table drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices drm/nouveau/therm: rework thermal table parsing drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table drm/nouveau: fix pm initialization order drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it drm/nouveau: log channel debug/error messages from client object rather than drm client drm/nouveau: have drm debugging macros build on top of core macros ...
2012-10-02UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/David Howells1-1/+1
Convert #include "..." to #include <path/...> in drivers/gpu/. Signed-off-by: David Howells <[email protected]> Acked-by: Dave Airlie <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Acked-by: Thomas Gleixner <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Acked-by: Dave Jones <[email protected]>
2012-08-17drm/udl: call begin/end cpu access at more appropriate timeDave Airlie1-7/+0
We need to call these before we transfer the damaged areas to the device not before/after we setup the long lived vmaps. Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2012-08-09drm/udl: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]Thomas Meyer1-1/+1
The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-05-31udl: support vmapping imported dma-bufsDave Airlie1-3/+22
This allows udl to get a vmapping of an imported buffer for scanout. Signed-off-by: Dave Airlie <[email protected]>
2012-05-29drm/udl: remove unused variables.Dave Airlie1-2/+0
These two variables were not required after new API was introduced. Signed-off-by: Dave Airlie <[email protected]>
2012-05-29drm/udl: unlock before returning in udl_gem_mmap()Dan Carpenter1-1/+1
If we hit an error here, then we should unlock and unreference obj before returning. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-05-23udl: add prime fd->handle support.Dave Airlie1-0/+75
udl can only be used as an output offload so doesn't need to support handle->fd direction. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-04-02mm, drm/udl: fixup vma flags on mmapKonstantin Khlebnikov1-0/+14
There should be VM_MIXEDMAP, not VM_PFNMAP, because udl_gem_fault() inserts pages via vm_insert_page(). Other drm/gem drivers already do this. Signed-off-by: Konstantin Khlebnikov <[email protected]> Cc: Dave Airlie <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2012-03-15drm/udl: initial UDL driver (v4)Dave Airlie1-0/+227
This is an initial drm/kms driver for the displaylink devices. Supports fb_defio, supports KMS dumb interface supports 24bpp via conversion to 16bpp, hw can do this better. supports hot unplug using new drm core features. On an unplug, it disables connector polling, unplugs connectors from sysfs, unplugs fbdev layer (using Kay's API), drops all the USB device URBs, and call the drm core to unplug the device. This driver is based in large parts on udlfb.c so I've licensed it under GPLv2. Signed-off-by: Dave Airlie <[email protected]>