summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-28drm: sun4i: Add RGB outputMaxime Ripard
One of the A10 display pipeline possible output is an RGB interface to drive LCD panels directly. This is done through the first channel of the TCON that will output our video signals directly. Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-04-28drm: Add Allwinner A10 Display Engine supportMaxime Ripard
The Allwinner A10 and subsequent SoCs share the same display pipeline, with variations in the number of controllers (1 or 2), or the presence or not of some output (HDMI, TV, VGA) or not. Add a driver with a limited set of features for now, and we will hopefully support all of them eventually Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-04-28drm: sun4i: Add DT bindings documentationMaxime Ripard
The display pipeline of the Allwinner A10 is involving several loosely coupled components. Add a documentation for the bindings. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-04-28drm: fb: Add seq_file definitionMaxime Ripard
Otherwise, building with DEBUG_FS enabled will trigger a build warning because we're using a structure that has not been declared. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-04-26drm: Switch blobs to the new generic modeset obj refcountingDaniel Vetter
Need to move the free function around a bit, but otherwise mostly just removing code. Specifically we can nuke all the _locked variants since the weak idr reference is now protected by the idr_mutex, which we never hold anywhere expect in the lookup/reg/unreg functions. And those never call anything else. Another benefit of this is that this patch switches the weak reference logic from kref_put_mutex to kref_get_unless_zero. And the later is in general more flexible wrt accomodating multiple weak references protected by different locks, which might or might not come handy eventually. But one consequence of that switch is that we need to acquire the blob_lock from the free function for the list_del calls. That's a bit tricky to pull off, but works well if we pick the exact same scheme as is already used for framebuffers. Most important changes: - filp list is maintainer by create/destroy_blob ioctls directly (already the case, so we can just remove the redundant list_del from the free function). - filp close handler walks the filp-private list lockless - works because we know no one else can access it. I copied the same comment from the fb code over to explain this. - Otherwise we need to sufficiently restrict blob_lock critical sections to avoid all the unreference calls. Easy to do once the blob_lock only protects the list, and no longer the weak reference. Cc: Dave Airlie <airlied@gmail.com> Cc: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-26drm/atomic-helpers: Don't duplicate code in destroy helpersDaniel Vetter
Random drive-by refactoring I spotted. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-26drm: Fix fb leaks and WARN spew in get/set_prop ioctlsDaniel Vetter
Dave Airlie had at least the refcount leak fixed in a later patch (but that patch does other things which need a bit more work). But we still have the trouble that silly userspace could hit the WARN_ON in drm_mode_object_find. Fix this all up to make sure we don't leak objects, and don't spew into demsg. Fixes: d0f37cf62979 ("drm/mode: move framebuffer reference into object.") Testcase: igt/kms_addfb_basic/invalid-*-prop* Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-26drm: Improve kerneldoc for new mode object refcountingDaniel Vetter
Slipped through the cracks in my review. The one issue I spotted is that drm_mode_object_find now acquires references and can be used on FB objects, which caused follow-on bugs in get/set_prop ioctls. Follow-up patches will fix that. [airlied: fixup some incr fb/decr object mixups] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-26Merge branch 'topic-arcpgu-v6' of ↵Dave Airlie
https://github.com/foss-for-synopsys-dwc-arc-processors/linux into drm-next This is DRM driver for ARC PGU - simple bitstreamer used on Synopsys ARC SDP boards (both AXS101 and AXS103). * 'topic-arcpgu-v6' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux: arc: axs10x - add support of ARC PGU MAINTAINERS: Add maintainer for ARC PGU display controller drm: Add DT bindings documentation for ARC PGU display controller drm: Add support of ARC PGU display controller
2016-04-26drm/sis: add missing include drm.h for the UAPI headerEmil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-26drm/qxl: remove XXX comment from the UAPI headerEmil Velikov
One cannot rename the struct at this point, so might as well remove the comment. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-26Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev into drm-nextDave Airlie
misc rcar changes. * 'drm/next/du' of git://linuxtv.org/pinchartl/fbdev: drm: rcar-du: Fix compilation warning drm: rcar-du: Use ARCH_RENESAS drm: rcar-du: Clarify vsp dependency
2016-04-26arc: axs10x - add support of ARC PGUAlexey Brodkin
Synopsys DesignWare ARC SDP boards sport ARC SDP display controller attached to ADV7511 HDMI encoder. That change adds desctiption of both ARC PGU and ADV7511 in ARC SDP'd base-board Device Tree. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: devicetree@vger.kernel.org Cc: linux-snps-arc@lists.infradead.org
2016-04-26MAINTAINERS: Add maintainer for ARC PGU display controllerAlexey Brodkin
This updates MAINTEINERS file with information about maintainer of ARC PGU display controller driver. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: linux-snps-arc@lists.infradead.org
2016-04-26drm: Add DT bindings documentation for ARC PGU display controllerAlexey Brodkin
This add DT bindings documentation for ARC PGU display controller. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: devicetree@vger.kernel.org Cc: linux-snps-arc@lists.infradead.org Acked-by: Rob Herring <robh@kernel.org>
2016-04-26drm: Add support of ARC PGU display controllerCarlos Palminha
ARC PGU could be found on some development boards from Synopsys. This is a simple byte streamer that reads data from a framebuffer and sends data to the single encoder. Signed-off-by: Carlos Palminha <palminha@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Cc: linux-snps-arc@lists.infradead.org
2016-04-23drm: rcar-du: Fix compilation warningLaurent Pinchart
Commit d63c25e4245a ("drm: rcar-du: Use generic drm_connector_register_all() helper") left an unused local variable behind. Remove it. Fixes: d63c25e4245a ("drm: rcar-du: Use generic drm_connector_register_all() helper") Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-04-23drm: rcar-du: Use ARCH_RENESASSimon Horman
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE. This is part of an ongoing process to migrate from ARCH_SHMOBILE to ARCH_RENESAS the motivation for which being that RENESAS seems to be a more appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-04-23drm: rcar-du: Clarify vsp dependencyArnd Bergmann
The VSP1 compositor code in DRM links against the respective V4L driver, but the dependency is not expressed correctly in Kconfig, which leads to a build error when the DRM driver is built-in and the V4L driver is a module: drivers/gpu/built-in.o: In function `rcar_du_vsp_plane_atomic_update': rcar-du/rcar_du_vsp.c:183: undefined reference to `vsp1_du_atomic_update' This patch avoids the problem by ensuring that the DRM VSP code can only be enabled if the V4L driver is linked into the kernel, or both are loadable modules. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 6d62ef3ac30b ("drm: rcar-du: Expose the VSP1 compositor through KMS planes") Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
2016-04-22drm/modes: stop handling framebuffer specialDave Airlie
Since ref counting is in the object now we can just call the normal interfaces. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22drm/modes: reduce fb_lock to just protecting listsDave Airlie
This reduces the fb_lock to just protecting the num_fb/fb_list. "Previously fb refcounting, and especially the weak reference (kref_get_unless_zero) used in fb lookups have been protected by fb_lock. But with the refactoring to share refcounting in the drm_mode_object base class that switched to being protected by idr_mutex, which means fb_lock critical sections can be reduced." Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22drm/modes: move reference taking into object lookup.Dave Airlie
When we lookup an ref counted object we now take a proper reference using kref_get_unless_zero. Framebuffer lookup no longer needs do this itself. Convert rmfb to using framebuffer lookup and deal with the fact it now gets an extra reference that we have to cleanup. This should mean we can avoid holding fb_lock across rmfb. (if I'm wrong let me know). We also now only hold the fbs_lock around the list manipulation. "Previously fb refcounting, and especially the weak reference (kref_get_unless_zero) used in fb lookups have been protected by fb_lock. But with the refactoring to share refcounting in the drm_mode_object base class that switched to being protected by idr_mutex, which means fb_lock critical sections can be reduced." Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22drm/mode: reduce lock hold in addfb2Dave Airlie
No need to hold the lock while assigning the variable. Daniel wrote: "Not sure why exactly I put that under the lock, but the only thing that can race here is rmfb while addfb2 is still doing it's thing, with a correctly guess (easy to do since they're fully deterministic) fb_id." Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22drm/mode: reduce scope of fb_lock in framebuffer initDave Airlie
We don't need to hold the fb lock around the initialisation, only around the list manipulaton. So do the lock hold only around the register for now. From Daniel: Previously fb refcounting, and especially the weak reference (kref_get_unless_zero) used in fb lookups have been protected by fb_lock. But with the refactoring to share refcounting in the drm_mode_object base class that switched to being protected by idr_mutex, which means fb_lock critical sections can be reduced. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22drm/mode: use _object_find to find framebuffers.Dave Airlie
No point have this code dupliated at this point, use the _object_find code instead now. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-04-22drm/mode: move framebuffer reference into object.Dave Airlie
This is the initial code to add references to some mode objects. In the future we need to start reference counting connectors so firstly I want to reorganise the code so the framebuffer ref counting uses the same paths. This patch shouldn't change any functionality, just moves the kref. [airlied: move kerneldoc as well] Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22drm/mode: introduce wrapper to read framebuffer refcount.Dave Airlie
Avoids drivers knowing where the kref is stored. [airlied: add kerneldoc] Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22drm/modes: drop __drm_framebuffer_unregister.Dave Airlie
Just use the generic function. The main side effect of this is that the fb->base.id is now protected by the idr mutex as well. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22drm/mode: move framebuffer_free up above framebuffer_initDave Airlie
A later patch will use it in framebuffer_init, and I want to keep the diff cleaner. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-22drm/mode: rework drm_mode_object_put to drm_mode_object_unregister.Dave Airlie
This changes the code to handle being called multiple times without side effects. The new names seems more suitable for what it does. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-04-21Merge branch 'drm-atmel-hlcdc-devel' of ↵Dave Airlie
https://github.com/bbrezillon/linux-at91 into drm-next This PR contains several improvement and cleanup patches for the atmel-hlcdc driver to be applied on drm-next (targeting 4.7). * 'drm-atmel-hlcdc-devel' of https://github.com/bbrezillon/linux-at91: drm: atmel-hlcdc: route DMA accesses through AHB interfaces drm: atmel-hlcdc: check display mode validity in crtc->mode_fixup() drm: atmel-hlcdc: rework the output code to support drm bridges drm: atmel-hlcdc: move output mode selection in CRTC implementation drm: atmel-hlcdc: support extended timing ranges on sama5d4 and sama5d2 drm: atmel-hlcdc: remove leftovers from atomic mode setting migration drm: atmel-hlcdc: fix connector and encoder types drm: atmel-hlcdc: support asynchronous atomic commit operations drm: atmel-hlcdc: add a ->cleanup_fb() operation
2016-04-21Merge tag 'drm-intel-next-2016-04-11' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next - make modeset hw state checker atomic aware (Maarten) - close races in gpu stuck detection/seqno reading (Chris) - tons&tons of small improvements from Chris Wilson all over the gem code - more dsi/bxt work from Ramalingam&Jani - macro polish from Joonas - guc fw loading fixes (Arun&Dave) - vmap notifier (acked by Andrew) + i915 support by Chris Wilson - create bottom half for execlist irq processing (Chris Wilson) - vlv/chv pll cleanup (Ville) - rework DP detection, especially sink detection (Shubhangi Shrivastava) - make color manager support fully atomic (Maarten) - avoid livelock on chv in execlist irq handler (Chris) * tag 'drm-intel-next-2016-04-11' of git://anongit.freedesktop.org/drm-intel: (82 commits) drm/i915: Update DRIVER_DATE to 20160411 drm/i915: Avoid allocating a vmap arena for a single page drm,i915: Introduce drm_malloc_gfp() drm/i915/shrinker: Restrict vmap purge to objects with vmaps drm/i915: Refactor duplicate object vmap functions drm/i915: Consolidate common error handling in intel_pin_and_map_ringbuffer_obj drm/i915/dmabuf: Tighten struct_mutex for unmap_dma_buf drm/i915: implement WaClearTdlStateAckDirtyBits drm/i915/bxt: Reversed polarity of PORT_PLL_REF_SEL bit drm/i915: Rename hw state checker to hw state verifier. drm/i915: Move modeset state verifier calls. drm/i915: Make modeset state verifier take crtc as argument. drm/i915: Replace manual barrier() with READ_ONCE() in HWS accessor drm/i915: Use simplest form for flushing the single cacheline in the HWS drm/i915: Harden detection of missed interrupts drm/i915: Separate out the seqno-barrier from engine->get_seqno drm/i915: Remove forcewake dance from seqno/irq barrier on legacy gen6+ drm/i915: Fixup the free space logic in ring_prepare drm/i915: Simplify check for idleness in hangcheck drm/i915: Apply a mb between emitting the request and hangcheck ...
2016-04-21Merge tag 'v4.6-rc3' into drm-nextDave Airlie
Backmerge 4.6-rc3 for i915. Linux 4.6-rc3
2016-04-21Merge tag 'topic/drm-misc-2016-04-21' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next misc pull req all over. Biggest thing is the drm_connector_(un)register_all cleanup from Alexey for drivers without the load/unload midlayer hooks. I.e. all the new ones, and a bunch of the pending new atomic drivers depend upon this. Or at least I asked them to rebase ;-) * tag 'topic/drm-misc-2016-04-21' of git://anongit.freedesktop.org/drm-intel: drm: Make drm.debug parameter description more helpful drm: Remove warning from drm_connector_unregister_all() drm: probe_helper: Hide ugly ifdef drm: rcar-du: Use generic drm_connector_register_all() helper drm: atmel_hldc: Use generic drm_connector_register_all() helper drm: Introduce drm_connector_register_all() helper drm: fix lut value extraction function drm/atomic-helper: Print an error if vblank wait times out drm/dp/mst: Restore primary hub guid on resume drm: Release driver references to handle before making it available again drm/i915/dp/mst: Add source port info to debugfs output drm/dp/mst: Enhance DP MST debugfs output drm/edid: Add drm_edid_get_monitor_name() include/drm: Reword debug categories comment. drm/crtc_helper: Reset empty plane state in drm_helper_crtc_mode_set_base() drm/virtio: Drop dummy gamma table support drm/bochs: Drop fake gamma support drm/core: Fix ordering in drm_mode_config_cleanup.
2016-04-21Merge tag 'topic/struct_mutex-2016-04-21' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next struct_mutex cleanups and error paths fixes. Unfortunately I didn't manage to get acks from everyone, but this stuff has been hanging out for months now and imo simple enough to just land the remaining few patches. But separate pull request so that you can take a look yourself. * tag 'topic/struct_mutex-2016-04-21' of git://anongit.freedesktop.org/drm-intel: drm/vma_manage: Drop has_offset drm/vgem: Drop dev->struct_mutex drm/vgem: Move get_pages to gem_create drm/vgem: Simplify dumb_map drm/exynos: drop struct_mutex from fbdev setup drm/exynos: drop struct_mutex from exynos_drm_gem_get_ioctl drm/exynos: drop struct_mutex from exynos_gem_map_sgt_with_dma drm/exynos: Drop dev->struct_mutex from mmap offset function drm/nouveau: Drop dev->struct_mutex from fbdev init drm/qxl: Use unlocked gem unreferencing drm/omapdrm: Use unlocked gem unreferencing drm/nouveau: Use unlocked gem unreferencing
2016-04-21drm: Make drm.debug parameter description more helpfulEzequiel Garcia
Let's be user-friendly and print an actually helpful parameter description. This makes modinfo output the debug parameter like this: parm: debug:Enable debug output, where each bit enables a debug category. Bit 0 (0x01) will enable CORE messages (drm core code) Bit 1 (0x02) will enable DRIVER messages (drm controller code) Bit 2 (0x04) will enable KMS messages (modesetting code) Bit 3 (0x08) will enable PRIME messages (prime code) Bit 4 (0x10) will enable ATOMIC messages (atomic code) Bit 5 (0x20) will enable VBL messages (vblank code) (int) Changes from v1: * Fixed s/PRMIE/PRIME typo. * Add ATOMIC and VBL debug parameter documentation. * Prefix the continuation lines with two tabs and removed the last new line. * Remove spurious whitespace. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1461170703-11216-1-git-send-email-ezequiel@vanguardiasur.com.ar
2016-04-21drm: Remove warning from drm_connector_unregister_all()Laurent Pinchart
Commit 6c87e5c3ec6d ("drm: Rename drm_connector_unplug_all() to drm_connector_unregister_all()") replaced a manual connectors list walk in drm_connector_unregister_all() with drm_for_each_connector(). The list was walked without the mode config mutex locked as that ends up in a clash with sysfs, but drm_connector_unregister_all() warns when the mutex isn't locked. The problem is known and doesn't require a large warning every time drm_connector_unregister_all() is called. Fix it by reverting to manual list walk. Fixes: 6c87e5c3ec6d ("drm: Rename drm_connector_unplug_all() to drm_connector_unregister_all()") Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1461190874-32674-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com
2016-04-20drm: probe_helper: Hide ugly ifdefEzequiel Garcia
Push the ifdef to the drm_edid.h and create a stub, for the DRM_LOAD_EDID_FIRMWARE=n case. This removes some clutter in the code, making it more readable. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1461087638-16959-1-git-send-email-ezequiel@vanguardiasur.com.ar
2016-04-20drm: rcar-du: Use generic drm_connector_register_all() helperAlexey Brodkin
Now that a generic drm_connector_register_all() helper exists we may safely substitute it for the driver-specific implementation of connectors plugging in sysfs. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Cc: linux-renesas-soc@vger.kernel.org Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1461068693-11260-4-git-send-email-abrodkin@synopsys.com
2016-04-20drm: atmel_hldc: Use generic drm_connector_register_all() helperAlexey Brodkin
This driver used to have its own implementation of connector_register_all() which actually was taken as a prototype of drm_connector_register_all(). Now when drm_connector_register_all() exists reusing it here. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1461068693-11260-3-git-send-email-abrodkin@synopsys.com
2016-04-20drm: Introduce drm_connector_register_all() helperAlexey Brodkin
As a pair to already existing drm_connector_unregister_all() we're adding generic implementation of what is already done in some drivers. Once this helper is implemented we'll be ready to switch existing driver-specific implementations with the generic one. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1461068693-11260-2-git-send-email-abrodkin@synopsys.com
2016-04-20drm/vma_manage: Drop has_offsetDaniel Vetter
It's racy, creating mmap offsets is a slowpath, so better to remove it to avoid drivers doing broken things. The only user is i915, and it's ok there because everything (well almost) is protected by dev->struct_mutex in i915-gem. While at it add a note in the create_mmap_offset kerneldoc that drivers must release it again. And then I also noticed that drm_gem_object_release entirely lacks kerneldoc. Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-14-git-send-email-daniel.vetter@ffwll.ch
2016-04-20drm/vgem: Drop dev->struct_mutexDaniel Vetter
With the previous two changes it doesn't protect anything any more. v2: Use _unlocked unreference variant. v3: Appease gcc noise. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-13-git-send-email-daniel.vetter@ffwll.ch
2016-04-20drm/vgem: Move get_pages to gem_createDaniel Vetter
vgem doesn't have a shrinker or anything like that and drops backing storage only at object_free time. There's no use in trying to be clever and allocating backing storage delayed, it only causes trouble by requiring locking. Instead grab pages when we allocate the object right away. v2: Fix compiling. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-12-git-send-email-daniel.vetter@ffwll.ch
2016-04-20drm/vgem: Simplify dumb_mapDaniel Vetter
The offset manager already checks for existing offsets internally, while holding suitable locks. We can drop this check. v2: Fix title (Emil). Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-11-git-send-email-daniel.vetter@ffwll.ch
2016-04-20drm/exynos: drop struct_mutex from fbdev setupDaniel Vetter
Doesn't protect anything at all, and probably just here because a long time ago dev->struct_mutex was required to allocate gem objects. With this patch exynos is completely struct_mutex free! Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-10-git-send-email-daniel.vetter@ffwll.ch
2016-04-20drm/exynos: drop struct_mutex from exynos_drm_gem_get_ioctlDaniel Vetter
The only things this protects is reading ->flags and ->size, both of which are invariant over the lifetime of an exynos gem bo. So no locking needed at all (besides that, nothing protects the writers anyway). Aside: exynos_gem_obj->size is redundant with exynos_gem_obj->base.size and probably should be removed. v2: Use _unlocked unreference (Daniel Stone). Cc: Daniel Stone <daniel@fooishbar.org> Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-9-git-send-email-daniel.vetter@ffwll.ch
2016-04-20drm/exynos: drop struct_mutex from exynos_gem_map_sgt_with_dmaDaniel Vetter
The sg table isn't refcounted, there's no corresponding locking for unmapping and drm_map_sg is ok with being called concurrently. So drop the locking since it doesn't protect anything. Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-8-git-send-email-daniel.vetter@ffwll.ch
2016-04-20drm/exynos: Drop dev->struct_mutex from mmap offset functionDaniel Vetter
Simply forgotten about this when I was doing my general cleansing of simple gem mmap offset functions. There's nothing but core functions called here, and they all have their own protection already. Aside: DRM_ERROR for userspace controlled input isn't great, but that's for another patch. v2: Use _unlocked unreference (Daniel Stone). Cc: Daniel Stone <daniel@fooishbar.org> Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-7-git-send-email-daniel.vetter@ffwll.ch
2016-04-20drm/nouveau: Drop dev->struct_mutex from fbdev initDaniel Vetter
Doesn't protect anything at all. With this patch nouveau is completely dev->struct_mutex free! Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459330852-27668-6-git-send-email-daniel.vetter@ffwll.ch