aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/udl/udl_drv.h
AgeCommit message (Collapse)AuthorFilesLines
2018-03-28drm/udl: Get rid of dev->struct_mutex usageDaniel Vetter1-0/+2
It's only used to protect our page list, and only when we know we have a full reference. This means none of these code paths can ever race with the final unref, and hence we do not need dev->struct_mutex serialization and can simply switch to our own locking. For more context the only magic the locked gem_free_object provides is that it prevents concurrent final unref (and destruction) of gem objects while anyone is holding dev->struct_mutex. This was used by i915 (and other drivers) to implement eviction handling with less headaches. Signed-off-by: Daniel Vetter <[email protected]> Cc: Dave Airlie <[email protected]> Reviewed-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2017-02-24mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmfDave Jiang1-1/+1
->fault(), ->page_mkwrite(), and ->pfn_mkwrite() calls do not need to take a vma and vmf parameter when the vma already resides in vmf. Remove the vma parameter to simplify things. [[email protected]: fix ARM build] Link: http://lkml.kernel.org/r/[email protected] Link: http://lkml.kernel.org/r/148521301778.19116.10840599906674778980.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Ross Zwisler <[email protected]> Cc: Theodore Ts'o <[email protected]> Cc: Darrick J. Wong <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Jan Kara <[email protected]> Cc: Dan Williams <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2017-01-09drm: Change the return type of the unload hook to voidGabriel Krisman Bertazi1-1/+1
The integer returned by the unload hook is ignored by the drm core, so let's make it void. This patch was created using the following Coccinelle semantic script (except for the declaration and comment in drm_drv.h): Compile-tested only. // <smpl> @ get_name @ struct drm_driver drv; identifier fn; @@ drv.unload = fn; @ replace_type @ identifier get_name.fn; @@ - int + void fn (...) { ... } @ remove_return_param @ identifier get_name.fn; @@ void fn (...) { <... if (...) return - ... ; ...> } @ drop_final_return @ identifier get_name.fn; @@ void fn (...) { ... - return 0; } // </smpl> Suggested-by: Daniel Vetter <[email protected]> Signed-off-by: Gabriel Krisman Bertazi <[email protected]> Acked-by: Christian König <[email protected]>. Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-06drm/udl: implement usb_driver suspend/resume.Haixia Shi1-0/+2
The usb_driver suspend and resume function pointers must be populated to prevent forced unbinding of USB interface driver. See usb/core/driver.c: unbind_no_pm_drivers_interfaces(). Restore mode and damage the entire frame buffer upon resume. TEST=suspend and resume with the same UDL device connected TEST=suspend with UDL, unplug UDL and resume TEST=suspend with UDL, unplug and connect another UDL device then resume Signed-off-by: Haixia Shi <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]> [seanpaul fixed checkpatch warnings and gave marcheu his é back] Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-05-02drm/udl: Use drm_fb_helper deferred_io supportNoralf Trønnes1-2/+0
Use the fbdev deferred io support in drm_fb_helper. The (struct fb_ops *)->fb_{fillrect,copyarea,imageblit} functions will now schedule a worker instead of being flushed directly like it was previously (recorded when in atomic). This patch has only been compile tested. Signed-off-by: Noralf Trønnes <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Tested-by: Gerd Hoffmann <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2015-11-24drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()Ville Syrjälä1-1/+1
Drivers shouldn't clobber the passed in addfb ioctl parameters. i915 was doing just that. To prevent it from happening again, pass the struct around as const, starting all the way from internal_framebuffer_create(). Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2014-11-26drm/udl: handle page mapping in dmabuf export.Haixia Shi1-0/+2
Fixes dmabuf export failure with -E_NOMEM when the page is not mapped. Signed-off-by: Haixia Shi <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-11-20drm/udl: add support to export a handle to a FD on UDL.Haixia Shi1-0/+2
Only importing an FD to a handle is currently supported on UDL, but the exporting functionality is equally useful. Signed-off-by: Haixia Shi <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-11-20drm/udl: add cache flags definitions for udl_gem_objectHaixia Shi1-0/+4
By default set udl_gem_object as cacheable, but set WC flag when attaching dmabuf. In udl_gem_mmap() update cache attributes based on the flags, similar to exynos_drm_gem_mmap(). Signed-off-by: Haixia Shi <[email protected]> Reviewed-by: Sonny Rao <[email protected]> Reviewed-by: Olof Johansson <[email protected]> Reviewed-by: Stéphane Marchesin <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-24drm: Extract <drm/drm_gem.h>Daniel Vetter1-0/+1
v2: Don't forget git add, noticed by David. Cc: David Herrmann <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Acked-by: David Herrmann <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-10drm: merge drm_usb into udlDavid Herrmann1-0/+1
This merges all the remains of drm_usb into its only user, udl. We can then drop all the drm_usb stuff, including dev->usbdev. Signed-off-by: David Herrmann <[email protected]> Reviewed-by: Thierry Reding <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-10-09drm: kill ->gem_init_object() and friendsDavid Herrmann1-1/+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-08-07drm/gem: create drm_gem_dumb_destroyDaniel Vetter1-2/+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-02-07drm/udl: make usage as a console saferDave Airlie1-0/+2
Okay you don't really want to use udl devices as your console, but if you are unlucky enough to do so, you run into a lot of schedule while atomic due to printk being called from all sorts of funky places. So check if we are in an atomic context, and queue the damage for later, the next printk should cause it to appear. This isn't ideal, but it is simple, and seems to work okay in my testing here. (dirty area idea came from xenfb) fixes a bunch of sleeping while atomic issues running fbcon on udl devices. Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2012-11-02drm/udl: fix stride issues scanning out stride != width*bppDave Airlie1-1/+1
When buffer sharing with the i915 and using a 1680x1050 monitor, the i915 gives is a 6912 buffer for the 6720 width, the code doesn't render this properly as it uses one value to set the base address for reading from the vmap and for where to start on the device. This fixes it by calculating the values correctly for the device and for the pixmap. No idea how I haven't seen this before now. Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2012-05-23udl: add prime fd->handle support.Dave Airlie1-0/+3
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/+1
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/+141
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]>