summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-06-30drm/i915: Cache last IRQ seqno to reduce IRQ overheadfenceJohn Harrison2-4/+23
The notify function can be called many times without the seqno changing. Some are to prevent races due to the requirement of not enabling interrupts until requested. However, when interrupts are enabled the IRQ handler can be called multiple times without the ring's seqno value changing. E.g. two interrupts are generated by batch buffers completing in quick succession, the first call to the handler processes both completions but the handler still gets executed a second time. This patch reduces the overhead of these extra calls by caching the last processed seqno value and early exiting if it has not changed. v3: New patch for series. v5: Added comment about last_irq_seqno usage due to code review feedback (Tvrtko Ursulin). v6: Minor update to resolve a race condition with the wait_request optimisation. v7: Updated to newer nightly - lots of ring -> engine renaming plus an interface change to get_seqno(). v10: Renamed the cached variable as it is no longer used at IRQ time. [Review comment from Tvrtko Ursulin] For: VIZ-5190 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-06-30drm/i915: Updated request structure tracingJohn Harrison3-6/+10
Added the '_complete' trace event which occurs when a fence/request is signaled as complete. Also moved the notify event from the IRQ handler code to inside the notify function itself. v3: Added the current ring seqno to the notify trace point. v5: Line wrapping to keep the style checker happy. v7: Updated to newer nightly (lots of ring -> engine renaming). v10: Dropped the 'is_empty' flag from trace_i915_gem_request_notify() as it is now redundant - 'seqno == 0' is equivalent. [Review comments from Tvrtko Ursulin] v10b: Re-based due to change in previous patch. For: VIZ-5190 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-06-30drm/i915: Interrupt driven fencesJohn Harrison7-23/+273
The intended usage model for struct fence is that the signalled status should be set on demand rather than polled. That is, there should not be a need for a 'signaled' function to be called everytime the status is queried. Instead, 'something' should be done to enable a signal callback from the hardware which will update the state directly. In the case of requests, this is the seqno update interrupt. The idea is that this callback will only be enabled on demand when something actually tries to wait on the fence. This change removes the polling test and replaces it with the callback scheme. Each fence is added to a 'please poke me' list at the start of i915_add_request(). The interrupt handler (via a deferred work queue) then scans through the 'poke me' list when a new seqno pops out and signals any matching fence/request. The fence is then removed from the list so the entire request stack does not need to be scanned every time. The fence is added to the list before the commands to generate the seqno interrupt are added to the ring. Thus the sequence is guaranteed to be race free if the interrupt is already enabled. Note that the interrupt is only enabled on demand (i.e. when __wait_request() is called). Thus there is still a potential race when enabling the interrupt as the request may already have completed. However, this is simply solved by calling the interrupt processing code immediately after enabling the interrupt and thereby checking for already completed requests. Lastly, the ring clean up code has the possibility to cancel outstanding requests (e.g. because TDR has reset the ring). These requests will never get signalled and so must be removed from the signal list manually. This is done by setting a 'cancelled' flag and then calling the regular notify/retire code path rather than attempting to duplicate the list manipulatation and clean up code in multiple places. This also avoids any race condition where the cancellation request might occur after/during the completion interrupt actually arriving. v2: Updated to take advantage of the request unreference no longer requiring the mutex lock. v3: Move the signal list processing around to prevent unsubmitted requests being added to the list. This was occurring on Android because the native sync implementation calls the fence->enable_signalling API immediately on fence creation. Updated after review comments by Tvrtko Ursulin. Renamed list nodes to 'link' instead of 'list'. Added support for returning an error code on a cancelled fence. Update list processing to be more efficient/safer with respect to spinlocks. v5: Made i915_gem_request_submit a static as it is only ever called from one place. Fixed up the low latency wait optimisation. The time delay between the seqno value being to memory and the drive's ISR running can be significant, at least for the wait request micro-benchmark. This can be greatly improved by explicitly checking for seqno updates in the pre-wait busy poll loop. Also added some documentation comments to the busy poll code. Fixed up support for the faking of lost interrupts (test_irq_rings/missed_irq_rings). That is, there is an IGT test that tells the driver to loose interrupts deliberately and then check that everything still works as expected (albeit much slower). Updates from review comments: use non IRQ-save spinlocking, early exit on WARN and improved comments (Tvrtko Ursulin). v6: Updated to newer nigthly and resolved conflicts around the wait_request busy spin optimisation. Also fixed a race condition between this early exit path and the regular completion path. v7: Updated to newer nightly - lots of ring -> engine renaming plus an interface change on get_seqno(). Also added a list_empty() check before acquring spinlocks and doing list processing. v8: Updated to newer nightly - changes to request clean up code mean non of the deferred free mess is needed any more. v9: Moved the request completion processing out of the interrupt handler and into a worker thread (Chris Wilson). v10: Changed to an un-ordered work queue to allow parallel processing of different engines. Also set the high priority flag for reduced latency. Removed some unnecessary checks for invalid seqno values. Improved/added some comments and WARNs. Moved a spinlock release a few lines later to make the 'locked' parameter of i915_gem_request_enable_interrupt redundant and removed it. Also shuffled the function around in the file so as to make it static and remove it from the header file. Corrected the use of fence_signal_locked() to fence_signal() in the retire code. Dropped the irq save part of the spin lock calls in the notify code as this is no longer called from the ISR. Changed the call of i915_gem_retire_requests_ring() in the reset cleanup code to i915_gem_request_notify() instead as the former is just duplicating a lot of operations. [Review comments from Maarten Lankhorst & Tvrtko Ursulin] Made the call to _notify() from _retire_requests_ring() conditional on interrupts not being enabled as it is only a race condition work around for that case. Also re-instated the lazy_coherency flag (but now on the _notify() function) to reduce the overhead of _retire_requests_ring() calling _notify() lots and lots (even with the anti-interrupt check). Updated for yet more nightly changes (u64 for fence context). v10b: Re-ordered the fence signal and IRQ release in _notify() to fix a race condition when disabling interrupts. Also, moved the wake_up_all() call from the IRQ handler to the worker thread to prevent the wake up of waiting threads from overtaking the signalling of the request. v10c: Put the wake_up_all() back into the IRQ handler to fix regression in gem_latency times (IGT benchmark). For: VIZ-5190 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-06-30drm/i915: Removed now redundant parameter to i915_gem_request_completed()John Harrison5-13/+12
The change to the implementation of i915_gem_request_completed() means that the lazy coherency flag is no longer used. This can now be removed to simplify the interface. v6: Updated to newer nightly and resolved conflicts. v7: Updated to newer nightly (lots of ring -> engine renaming). For: VIZ-5190 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2016-06-30drm/i915: Convert requests to use struct fenceJohn Harrison6-38/+125
There is a construct in the linux kernel called 'struct fence' that is intended to keep track of work that is executed on hardware. I.e. it solves the basic problem that the drivers 'struct drm_i915_gem_request' is trying to address. The request structure does quite a lot more than simply track the execution progress so is very definitely still required. However, the basic completion status side could be updated to use the ready made fence implementation and gain all the advantages that provides. This patch makes the first step of integrating a struct fence into the request. It replaces the explicit reference count with that of the fence. It also replaces the 'is completed' test with the fence's equivalent. Currently, that simply chains on to the original request implementation. A future patch will improve this. v3: Updated after review comments by Tvrtko Ursulin. Added fence context/seqno pair to the debugfs request info. Renamed fence 'driver name' to just 'i915'. Removed BUG_ONs. v5: Changed seqno format in debugfs to %x rather than %u as that is apparently the preferred appearance. Line wrapped some long lines to keep the style checker happy. v6: Updated to newer nigthly and resolved conflicts. The biggest issue was with the re-worked busy spin precursor to waiting on a request. In particular, the addition of a 'request_started' helper function. This has no corresponding concept within the fence framework. However, it is only ever used in one place and the whole point of that place is to always directly read the seqno for absolutely lowest latency possible. So the simple solution is to just make the seqno test explicit at that point now rather than later in the series (it was previously being done anyway when fences become interrupt driven). v7: Rebased to newer nightly - lots of ring -> engine renaming and interface change to get_seqno(). v8: Rebased to newer nightly - no longer needs to worry about mutex locking in the request free code path. Moved to after fence timeline patch so no longer needs to add a horrid hack timeline. Removed commented out code block. Added support for possible RCU usage of fence object (Review comments by Maarten Lankhorst). v10: Removed duplicate rcu_head field from request - there is already one in the fence structure for this exact purpose. Improved/added some comments. [Review comments from Maarten Lankhorst & Tvrtko Ursulin] Updated for yet more nightly changes (u64 for fence context). For: VIZ-5190 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Ack-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-06-30drm/i915: Add per context timelines for fence objectsJohn Harrison4-0/+70
The purpose of this patch series is to convert the requst structure to use fence objects for the underlying completion tracking. The fence object requires a sequence number. The ultimate aim is to use the same sequence number as for the request itself (or rather, to remove the request's seqno field and just use the fence's value throughout the driver). However, this is not currently possible and so this patch introduces a separate numbering scheme as an intermediate step. A major advantage of using the fence object is that it can be passed outside of the i915 driver and used externally. The fence API allows for various operations such as combining multiple fences. This requires that fence seqnos within a single fence context be guaranteed in-order. The GPU scheduler that is coming can re-order request execution but not within a single GPU context. Thus the fence context must be tied to the i915 context (and the engine within the context as each engine runs asynchronously). On the other hand, the driver as a whole currently only works with request seqnos that are allocated from a global in-order timeline. It will require a fair chunk of re-work to allow multiple independent seqno timelines to be used. Hence the introduction of a temporary, fence specific timeline. Once the work to update the rest of the driver has been completed then the request can use the fence seqno instead. v2: New patch in series. v3: Renamed/retyped timeline structure fields after review comments by Tvrtko Ursulin. Added context information to the timeline's name string for better identification in debugfs output. v5: Line wrapping and other white space fixes to keep style checker happy. v7: Updated to newer nightly (lots of ring -> engine renaming). v8: Moved to earlier in patch series so no longer needs to remove the quick hack timeline that was being added before. v9: Updated to another newer nightly (changes to context structure naming). Also updated commit message to match previous changes. v10: Removed obsolete fields from timeline structure and a couple of functions. Corrected some comments and debug prints. [Review comments from Maarten Lankhorst & Tvrtko Ursulin] Updated to yet more nightly changes (u64 for fence context). For: VIZ-5190 Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2016-06-09drm-intel-nightly: 2016y-06m-09d-10h-05m-55s UTC integration manifestDaniel Vetter1-0/+24
2016-06-09Merge remote-tracking branch 'origin/topic/sphinx' into drm-intel-nightlyDaniel Vetter13-144/+3661
2016-06-09Merge remote-tracking branch 'origin/topic/core-for-CI' into drm-intel-nightlyDaniel Vetter3-4/+8
2016-06-09Merge remote-tracking branch 'origin/topic/drm-misc' into drm-intel-nightlyDaniel Vetter26-505/+403
2016-06-09Merge remote-tracking branch 'sound-upstream/for-linus' into drm-intel-nightlyDaniel Vetter2-1/+15
2016-06-09Merge remote-tracking branch 'sound-upstream/for-next' into drm-intel-nightlyDaniel Vetter15-154/+80
2016-06-09Merge remote-tracking branch 'drm-upstream/drm-next' into drm-intel-nightlyDaniel Vetter223-2011/+3165
2016-06-09Merge remote-tracking branch 'origin/drm-intel-next-queued' into ↵Daniel Vetter103-5064/+6438
drm-intel-nightly
2016-06-09drm: Move format-related helpers to drm_fourcc.cLaurent Pinchart7-299/+364
The drm_crtc.c file is a mess, making the ABI documentation confusing since all functions are in the same bag. Split the format-related helpers to a new drm_fourcc.c file. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465466048-2020-1-git-send-email-laurent.pinchart@ideasonboard.com
2016-06-09drm/atomic: kerneldoc for drm_atomic_crtc_needs_modesetDaniel Vetter1-0/+10
Just a bit of drive-by ocd. v2: Improve per Liviu's feedback. Cc: Liviu Dudau <Liviu.Dudau@arm.com> Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-7-git-send-email-daniel.vetter@ffwll.ch
2016-06-09drm/hisilicon: Implement some semblance of vblank event handlingDaniel Vetter1-8/+12
atomic_flush seems to be the right place, but I'm not entirely sure whether this will catch them all. It could be that when disabling the crtc we'll miss the vblank. While at it nuke the dummy functions. v2: Be more robust and either arm, when the CRTC is on, or just send the event out right away. Cc: Xinliang Liu <xinliang.liu@linaro.org> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com> Cc: Archit Taneja <architt@codeaurora.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-5-git-send-email-daniel.vetter@ffwll.ch
2016-06-09drm/fsl-du: Implement some semblance of vblank event handlingDaniel Vetter1-12/+11
No idea how exactly fsl-du commits hw state changes, but here in flush is probably the safest place. While at it nuke the dummy functions. v2: Be more robust and either arm, when the CRTC is on, or just send the event out right away. Cc: Stefan Agner <stefan@agner.ch> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-4-git-send-email-daniel.vetter@ffwll.ch
2016-06-09drm/arc: Nuke event_listDaniel Vetter3-24/+0
This is just used for cleanup in preclose, and with the reworked event handling code this is now done properly by the core. Nuke it! But it also shows that arc totally fails at sending out drm events for flips. Next patch will hack that up. v2: Rebase it! Cc: Carlos Palminha <palminha@synopsys.com> Cc: Alexey Brodkin <abrodkin@synopsys.com> Cc: linux-snps-arc@lists.infradead.org Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-2-git-send-email-daniel.vetter@ffwll.ch
2016-06-09drm: Replace fb_helper->atomic with mode_config->atomic_commitDaniel Vetter3-17/+2
Drivers transitioning to atomic might not yet want to enable full DRIVER_ATOMIC support when it's not entirely working. But using atomic internally makes a lot more sense earlier. Instead of spreading such flags to more places I figured it's simpler to just check for mode_config->funcs->atomic_commit, and use atomic paths if that is set. For the only driver currently transitioning (i915) this does the right thing. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-23-git-send-email-daniel.vetter@ffwll.ch
2016-06-09drm/atomic-helper: Annotate a bunch more RETURNS: sectionsDaniel Vetter1-4/+4
kernel-doc wants a : at the end. Acked-by: jani.nikula@linux.intel.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465388359-8070-27-git-send-email-daniel.vetter@ffwll.ch
2016-06-09drm: sti: Rely on the default ->best_encoder() behaviorBoris Brezillon3-30/+0
All outputs have a 1:1 relationship between connectors and encoders and the driver is relying on the atomic helpers: we can drop the custom ->best_encoder() implementations and let the core call drm_atomic_helper_best_encoder() for us. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Vincent Abriou <vincent.abriou@st.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-12-git-send-email-boris.brezillon@free-electrons.com
2016-06-09drm: msm: Rely on the default ->best_encoder() behavior where appropriateBoris Brezillon3-27/+0
For all outputs except DSI we have a 1:1 relationship between connectors and encoders and the driver is relying on the atomic helpers: we can drop the custom ->best_encoder() and let the core call drm_atomic_helper_best_encoder() for us. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-9-git-send-email-boris.brezillon@free-electrons.com
2016-06-09drm: mediatek: Rely on the default ->best_encoder() behaviorBoris Brezillon1-9/+0
We have a 1:1 relationship between connectors and encoders and the driver is relying on the atomic helpers: we can drop the custom ->best_encoder() implementation and let the core call drm_atomic_helper_best_encoder() for us. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-8-git-send-email-boris.brezillon@free-electrons.com
2016-06-09drm: Remove dev_pm_ops from drm_classLukas Wunner3-75/+0
The PM core introduced the ability to keep devices runtime suspended during the entire system suspend/resume process with commit aae4518b3124 ("PM / sleep: Mechanism to avoid resuming runtime-suspended devices unnecessarily"). Before this so-called "direct-complete" procedure was introduced, devices were always runtime resumed only to be immediately put to sleep again using their ->suspend hook. Direct-complete is enabled by returning a positive value from the ->prepare hook. The PCI core usually does this automatically. Direct-complete is only available for a device if all children use it as well. Currently we cannot support direct-complete for DRM drivers because the DRM core automatically registers multiple DRM minors which belong to device class drm_class, and drm_class uses a struct dev_pm_ops which lacks the ->prepare callback. While this could be solved by adding the missing ->prepare callback, closer inspection shows that there are no DRM drivers left which declare the legacy ->suspend and ->resume callbacks in their drm_driver struct. The last ones to remove them were i915 with commit 1751fcf9f92e ("drm/i915: Fix module initialisation, v2.") and exynos with commit e7fefb1d5af5 ("drm/exynos: remove legacy ->suspend()/resume()"). Consequently the struct dev_pm_ops of drm_class is now dead code. Remove it. If no dev_pm_ops is declared for a device, the PM core automatically enables direct-complete for it, thereby making that mechanism available to the parent DRM PCI devices. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/da848fcd5ca72a35d9a722e644719977a47bb7ba.1465382836.git.lukas@wunner.de
2016-06-09ALSA: hda - Add PCI ID for KabylakeVinod Koul1-1/+10
Kabylake shows up as PCI ID 0xa171. And Kabylake-LP as 0x9d71. Since these are similar to Skylake add these to SKL_PLUS macro Signed-off-by: Vinod Koul <vinod.koul@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-09Merge tag 'drm-vc4-fixes-2016-06-06' of github.com:anholt/linux into drm-fixesDave Airlie4-21/+45
This pull request brings in vblank/pageflip fixes I had hoped to see merged before 4.7rc1, plus two new fixes that have come in since then. * tag 'drm-vc4-fixes-2016-06-06' of github.com:anholt/linux: drm/vc4: Make pageflip completion handling more robust. drm/vc4: Fix ioctl permissions for render nodes. drm/vc4: Return -EBUSY if there's already a pending flip event. drm/vc4: Fix drm_vblank_put/get imbalance in page flip path. drm/vc4: Fix get_vblank_counter with proper no-op for Linux 4.4+
2016-06-09drm/omap: fix unused variable warning in dsi & hdmiTomi Valkeinen2-2/+0
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-06-09Merge branch 'linux-4.7' of git://github.com/skeggsb/linux into drm-fixesDave Airlie18-68/+122
Fixes for two issues reported by KASAN, a display engine hang due to incorrect BIOS table parsing, and incorrect LTC interrupt handling on Maxwell which could lead to a never-ending interrupt storm. * 'linux-4.7' of git://github.com/skeggsb/linux: drm/nouveau/disp/sor/gm107: training pattern registers are like gm200 drm/nouveau/disp/sor/gf119: both links use the same training register drm/nouveau/core: swap the order of imem/fb drm/nouveau/fbcon: fix out-of-bounds memory accesses drm/nouveau/gr/gf100-: update sm error decoding from gk20a nvgpu headers drm/nouveau/ltc/gm107-: fix typo in the address of NV_PLTCG_LTC0_LTS0_INTR drm/nouveau/bios/disp: fix handling of "match any protocol" entries
2016-06-09Merge tag 'omapdrm-4.8' of ↵Dave Airlie116-1266/+2138
git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-next omapdrm changes for 4.8 * Update MAINTAINERS file for omapdrm and tilcdc * PLL refactoring to allow versatile use of the PLL clocks * Public omapdss header refactoring to separate omapfb and omapdrm * Gamma table support * Support reset GPIO and vcc regulator in omapdrm's panel-dpi * Minor cleanups * tag 'omapdrm-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (69 commits) drm/omapdrm: Implement gamma_lut atomic crtc properties drm/omapdrm: Workaround for errata i734 (LCD1 Gamma) in DSS dispc drm/omapdrm: Add gamma table support to DSS dispc drm: drm_helper_crtc_enable_color_mgmt() => drm_crtc_enable_color_mgmt() drm/omap: rename panel/encoder Kconfig names drm: omapdrm: add DSI mapping drm: omapdrm: Remove unused omap_framebuffer_bo function drm: omapdrm: Remove unused omap_gem_tiled_size function drm: omapdrm: panel-lgphilips-lb035q02: Remove unused backlight GPIO drm/omap: panel-dpi: implement support for a vcc regulator drm/omap: panel-dpi: make (limited) use of a reset gpio devicetree/bindings: add reset-gpios and vcc-supply for panel-dpi MAINTAINERS: Add maintainer for TI LCDC DRM driver MAINTAINERS: Add maintainer for OMAP DRM driver drm/omap: fix pitch round-up drm/omap: remove align_pitch() drm/omap: remove unnecessary pitch round-up drm/omap: remove unneeded gpio includes drm/omap: Remove the video/omapdss.h and move it's content to local header file [media] omap_vout: Switch to use the video/omapfb_dss.h header file ...
2016-06-09Merge branch 'virtio-gpu-for-airlied' of git://git.kraxel.org/linux into ↵Dave Airlie5-113/+159
drm-next Virtio-gpu updates * 'virtio-gpu-for-airlied' of git://git.kraxel.org/linux: virtio-gpu: use src not crtc virtio-gpu: pick up hotspot from framebuffer add cursor hotspot to drm_framebuffer virtio-gpu: switch to atomic cursor interfaces virtio-gpu: add atomic_commit function virtio-gpu: fix output lookup
2016-06-09Merge tag 'drm-intel-next-2016-06-06' of ↵Dave Airlie41-957/+1467
git://anongit.freedesktop.org/drm-intel into drm-next - some polish for the guc code (Dave Gordon) - big refactoring of gen9 display clock handling code (Ville) - refactoring work in the context code (Chris Wilson) - give encoder/crtc/planes useful names for debug output (Ville) - improvements to skl/kbl wm computation code (Mahesh Kumar) - bunch of smaller improvements all over as usual * tag 'drm-intel-next-2016-06-06' of git://anongit.freedesktop.org/drm-intel: (64 commits) drm/i915: Update DRIVER_DATE to 20160606 drm/i915: Extract physical display dimensions from VBT drm/i915: Silence "unexpected child device config size" for VBT on 845g drm/i915/skl+: Use scaling amount for plane data rate calculation (v4) drm/i915/skl+: calculate plane pixel rate (v4) drm/i915/skl+: calculate ddb minimum allocation (v6) drm/i915: Don't try to calculate relative data rates during hw readout drm/i915: Only ignore eDP ports that are connected drm/i915: Update GEN6_PMINTRMSK setup with GuC enabled drm/i915: kill STANDARD/CURSOR plane screams drm/i915: Give encoders useful names drm/i915: Give meaningful names to all the planes drm/i915: Don't leak primary/cursor planes on crtc init failure drm/i915: Set crtc->name to "pipe A", "pipe B", etc. drm/i915: Use plane->name in debug prints drm/i915: Use crtc->name in debug messages drm/i915: Reject modeset if the dotclock is too high drm/i915: Fix NULL pointer deference when out of PLLs in IVB drm/i915/ilk: Don't disable SSC source if it's in use drm/i915/bxt: Sanitize CDCLK to fix breakage during S4 resume ...
2016-06-09Merge tag 'topic/drm-misc-2016-06-07' of ↵Dave Airlie82-517/+849
git://anongit.freedesktop.org/drm-intel into drm-next As promised, piles of prep work all around: - drm_atomic_state rework, prep for nonblocking commit helpers - fence patches from Gustavo and Christian to prep for atomic fences and some cool work in ttm/amdgpu from Christian - drm event prep for both nonblocking commit and atomic fences - Gustavo seems on a crusade against the non-kms-native version of the vblank functions. - prep work from Boris to nuke all the silly ->best_encoder implementations we have (we really only need that for truly dynamic cases like dvi-i vs dvi-d or dp mst selecting the right transcoder on intel) - prep work from Laurent to rework the format handling functions - and few small things all over * tag 'topic/drm-misc-2016-06-07' of git://anongit.freedesktop.org/drm-intel: (47 commits) drm/dsi: Implement set tear scanline drm/fb_cma_helper: Implement fb_mmap callback drm/qxl: Remove useless drm_fb_get_bpp_depth() call drm/ast: Remove useless drm_fb_get_bpp_depth() call drm/atomic: Fix remaining places where !funcs->best_encoder is valid drm/core: Change declaration for gamma_set. Documentation: add fence-array to kernel DocBook drm/shmobile: use drm_crtc_vblank_{get,put}() drm/radeon: use drm_crtc_vblank_{get,put}() drm/qxl: use drm_crtc_vblank_{get,put}() drm/atmel: use drm_crtc_vblank_{get,put}() drm/armada: use drm_crtc_vblank_{get,put}() drm/amdgpu: use drm_crtc_vblank_{get,put}() drm/virtio: use drm_crtc_send_vblank_event() drm/udl: use drm_crtc_send_vblank_event() drm/qxl: use drm_crtc_send_vblank_event() drm/atmel: use drm_crtc_send_vblank_event() drm/armada: use drm_crtc_send_vblank_event() drm/doc: Switch to sphinx/rst fixed-width quoting drm/doc: Drop kerneldoc for static functions in drm_irq.c ...
2016-06-09Merge tag 'topic/lockless-gem-bo-freeing-2016-06-01' of ↵Dave Airlie28-115/+19
git://anongit.freedesktop.org/drm-intel into drm-next lockless gem bo freeing patches (and the oddball related patch) for all the drivers who's maintainers are asleep at the helm - includes you ;-) I based this on top of drm-fixes to include Chris' fix for the cma issue. * tag 'topic/lockless-gem-bo-freeing-2016-06-01' of git://anongit.freedesktop.org/drm-intel: (21 commits) drm/arcpgu: Use lockless gem BO free callback drm/sun4i: Use lockless gem BO free callback drm/omapdrm: Nuke dummy fb->dirty callback drm/msm: Nuke dummy fb->dirty callback drm/rockchip: Use cma gem vm ops drm/sti: Use lockless gem BO free callback drm: sti: remove useless call to dev->struct_mutex drm/virtio: Use lockless gem BO free callback drm/tilcdc: Use lockless gem BO free callback drm/shmob: Use lockless gem BO free callback drm/rockchip: Use lockless gem BO free callback drm/rcar-du: Use lockless gem BO free callback drm/qxl: Use lockless gem BO free callback drm/nouveau: Use lockless gem BO free callback drm/mga200g: Use lockless gem BO free callback drm/fls-dcu: Use lockless gem BO free callback drm/cirrus: Use lockless gem BO free callback drm/bochs: Use lockless gem BO free callback drm/atmel: Use lockless gem BO free callback drm/ast: Use lockless gem BO free callback ...
2016-06-09Backmerge tag 'v4.7-rc2' into drm-nextDave Airlie256-1521/+2487
Daniel has a pull request that relies on stuff in fixes that are in rc2.
2016-06-08iommu/vt-d: fix overflow of iommu->domains arrayJan Niehusmann1-1/+1
The valid range of 'did' in get_iommu_domain(*iommu, did) is 0..cap_ndoms(iommu->cap), so don't exceed that range in free_all_cpu_cached_iovas(). The user-visible impact of the out-of-bounds access is the machine hanging on suspend-to-ram. It is, in fact, a kernel panic, but due to already suspended devices, that's often not visible to the user. Fixes: 22e2f9fa63b0 ("iommu/vt-d: Use per-cpu IOVA caching") Signed-off-by: Jan Niehusmann <jan@gondor.com> Tested-By: Marius Vlad <marius.c.vlad@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20160606122010.GA3048@x61s.reliablesolutions.de
2016-06-08drm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidanceMika Kuoppala2-0/+5
Add this fbc related workaround for all gen9 Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-28-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i195/fbc: Add WaFbcNukeOnHostModifyMika Kuoppala2-0/+9
Bspec states that we need to set nuke on modify all to prevent screen corruption with fbc on skl and kbl. v2: proper workaround name References: HSD#2227109, HSDES#1404569388 Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-27-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/gen9: Add WaFbcWakeMemOnMika Kuoppala2-2/+5
Set bit 8 in 0x43224 to prevent screen corruption and system hangs on high memory bandwidth conditions. The same wa also suggest setting bit 31 on ARB_CTL. According to another workaround we gain better idle power savings when FBC is enabled. v2: use correct workaround name v3: split out overlapping wa for corruption avoidance (Ville) References: HSD#2137218, HSD#2227171, HSD#2136579, BSID#883 Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-26-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/gen9: Add WaFbcTurnOffFbcWatermarkMika Kuoppala1-0/+4
According to bspec this prevents screen corruption when fbc is used. v2: This workaround has a name, use it (Ville) v3: remove bogus gen check on ilk/vlv wm path (Ville) References: HSD#2135555, HSD#2137270, BSID#562 Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-25-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/kbl: Add WaClearSlmSpaceAtContextSwitchMika Kuoppala1-0/+16
This workaround for bdw and chv, is also needed for kbl A0. References: HSD#1911519, BSID#569 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-24-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/skl: Extend WaDisableChickenBitTSGBarrierAckForFFSliceCSMika Kuoppala1-1/+1
There is ambiguity in the documentation between D0 and E0. Extend this workaround to E0. References: BSID#779 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-23-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/gen9: Add WaEnableChickenDCPRMika Kuoppala2-0/+7
Workaround for display underrun issues with Y & Yf Tiling. Set this on all gen9 as stated by bspec. v2: proper workaround name References: HSD#2136383, BSID#857 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-22-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/kbl: Add WaDisableSbeCacheDispatchPortSharingMika Kuoppala1-0/+5
This is needed for all kbl revision. v2: Don't add revid checks to generic gen9 init (Arun) References: HSD#2135593 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-21-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/kbl: Add WaDisableGafsUnitClkGatingMika Kuoppala1-0/+3
We need to disable clock gating in this unit to work around hardware issue causing possible corruption/hang. v2: name the bit (Ville) v3: leave the fix enabled for 2227050 and set correct bit (Matthew) v4: Split out the skl part in separate commit for easier backport References: HSD#2227156, HSD#2227050 Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Matthew Auld <matthew.william.auld@gmail.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-20-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/kbl: Add WaForGAMHangMika Kuoppala1-2/+34
Add this workaround for A0 and B0 revisions References: HSD#2226935 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-19-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/skl: Add WAC6entrylatencyMika Kuoppala2-0/+9
This workaround is for fbc working with rc6 on skylake. Bspec states that setting this bit needs to be coordinated with uncore but offers no further details. v2: rebase References: HSD#4712857 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-18-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/gen9: Add WaDisableSkipCachingMika Kuoppala1-0/+10
Make sure that we never enable skip caching on gen9 by accident. References: HSD#2134698 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-17-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915: Add WaInsertDummyPushConstP for bxt and kblMika Kuoppala2-0/+11
Add this workaround for both bxt and kbl up to until rev B0. References: HSD#2136703 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-16-git-send-email-mika.kuoppala@intel.com
2016-06-08drm/i915/kbl: Add WaDisableDynamicCreditSharingMika Kuoppala2-0/+8
Bspec states that we need to turn off dynamic credit sharing on kbl revid a0 and b0. This happens by writing bit 28 on 0x4ab8. References: HSD#2225601, HSD#2226938, HSD#2225763 Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-15-git-send-email-mika.kuoppala@intel.com