aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-14drm/amdgpu: update gart_pin_size if bo is in GTTFlora Cui1-1/+1
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: bind GTT on demandChristian König8-7/+84
We don't really need the GTT table any more most of the time. So bind it only on demand. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Acked-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: fix GTT offset handlingChristian König1-5/+5
Otherwise we run into problems on 32bit systems with more than 4GB GART. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm: modify drm_global_item_ref to avoid two times of writing ref->objectHuang Rui1-10/+14
In previous drm_global_item_ref, there are two times of writing ref->object if item->refcount is 0. So this patch does a minor update to put alloc and init ref firstly, and then to modify the item of glob array. Use "else" to avoid two times of writing ref->object. It can make the code logic more clearly. Reviewed-by: Christian König <[email protected]> Signed-off-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu:implement CONTEXT_CONTROL (v5)Monk Liu6-2/+79
v1: for gfx8, use CONTEXT_CONTROL package to dynamically skip preamble CEIB and other load_xxx command in sequence. v2: support GFX7 as well. remove cntxcntl in compute ring funcs because CPC doesn't support this packet. v3: fix reduntant judgement in cntxcntl. v4: some cleanups, don't change cs_submit() v5: keep old MESA supported & bump up KMS version. Signed-off-by: Monk Liu <[email protected]> Ack-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/powerplay: declare functions instand of include header file.Rex Zhu2-5/+6
Signed-off-by: Rex Zhu <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/powerplay: calculate flexible array member's address.Rex Zhu3-83/+140
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Huang Rui <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stopMichel Dänzer1-0/+5
Without this, we were only ever using the first 256MB of VRAM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97593 Tested-by: Konstantin A. Lepikhov <[email protected]> Tested-by: Arek Ruśniak <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: free the BO in kernel by helper amdgpu_bo_free_kernel()Junwei Zhang5-46/+16
Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: add a new helper to free a BO in kernel allocationsJunwei Zhang2-0/+31
Free the BO allocated by amdgpu_bo_create_kernel() Signed-off-by: Junwei Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Fix return values in SI DPM codeTom St Denis1-2/+8
Fix a couple of spots where errors were not returned as well as add some error messages to si_patch_dependency_based_on_leakage() which were not being read. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amdgpu: move some release handles into fail labels (v2)Huang Rui1-13/+12
Clean up the codes to move the release handles into fail labels. v2: squash in Christian's regression fix Signed-off-by: Huang Rui <[email protected]> Reviewed-by: Chunming Zhou <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Remove double lock from gfx v6Tom St Denis1-4/+0
The function gfx_v6_0_get_cu_info() was taking the grbm_idx_mutex which was then taken by a dependent function gfx_v6_0_get_cu_active_bitmap(). This patch removes the select from the parent function to avoid the double lock. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Convert messages in gmc v6 to dev_*()Tom St Denis1-8/+8
Make the kernel log messaging more consistent and use the dev_*() functions instead of a mix of DRM_*() and printk(). Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Comment out currently unused SI DPM structTom St Denis1-0/+2
The tahiti_le structure is not currently used. Comment it out to avoid warnings. Signed-off-by: Tom St Denis <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/amd/amdgpu: Tidy up SI SMC code (v2)Tom St Denis3-22/+12
As well as merge SMC clock functions into one to reduce LOC. v2: Fix swapped ck enable bit bug: https://bugs.freedesktop.org/show_bug.cgi?id=97801 Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-14drm/i915: Ignore OpRegion panel type except on select machinesVille Syrjälä1-0/+27
Turns out commit a05628195a0d ("drm/i915: Get panel_type from OpRegion panel details") has regressed quite a few machines. So it looks like we can't use the panel type from OpRegion on all systems, and yet we absolutely must use it on some specific systems. Despite trying, I was unable to find any automagic way to determine if the OpRegion panel type is respectable or not. The only glimmer of hope I had was bit 8 in the SCIC response, but that turned out to not work either (it was always 0 on both types of systems). So, to fix the regressions without breaking the machine we know to need the OpRegion panel type, let's just add a quirk for this. Only specific machines known to require the OpRegion panel type will therefore use it. Everyone else will fall bck to the VBT panel type. The only known machine so far is a "Conrac GmbH IX45GM2". The PCI subsystem ID on this machine is just a generic 8086:2a42, so of no use. Instead we'll go with a DMI match. I suspect we can now also revert commit aeddda06c1a7 ("drm/i915: Ignore panel type from OpRegion on SKL") but let's leave that to a separate patch. v2: Do the DMI match in the opregion code directly, as dev_priv->quirks gets populated too late Cc: Rob Kramer <[email protected]> Cc: Martin van Es <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Dave Airlie <[email protected]> Cc: Marco Krüger <[email protected]> Cc: Sean Greenslade <[email protected]> Cc: Trudy Tective <[email protected]> Cc: Robin Müller <[email protected]> Cc: Alexander Kobel <[email protected]> Cc: Alexey Shumitsky <[email protected]> Cc: Emil Andersen Lauridsen <[email protected]> Cc: [email protected] Cc: James Hogan <[email protected]> Cc: James Bottomley <[email protected]> Cc: [email protected] References: https://lists.freedesktop.org/archives/intel-gfx/2016-August/105545.html References: https://lists.freedesktop.org/archives/dri-devel/2016-August/116888.html References: https://lists.freedesktop.org/archives/intel-gfx/2016-June/098826.html Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94825 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97060 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97443 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97363 Fixes: a05628195a0d ("drm/i915: Get panel_type from OpRegion panel details") Tested-by: Marco Krüger <[email protected]> Tested-by: Alexey Shumitsky <[email protected]> Tested-by: Sean Greenslade <[email protected]> Tested-by: Emil Andersen Lauridsen <[email protected]> Tested-by: Robin Müller <[email protected]> Tested-by: [email protected] Tested-by: Rob Kramer <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] References: http://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Jani Nikula <[email protected]>
2016-09-13dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)Chris Wilson1-1/+2
If we being polled with a timeout of zero, a nonblocking busy query, we don't need to install any fence callbacks as we will not be waiting. As we only install the callback once, the overhead comes from the atomic bit test that also causes serialisation between threads. Signed-off-by: Chris Wilson <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Gustavo Padovan <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Reviewed-by: Gustavo Padovan <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-13Revert "drm/i915/psr: Make idle_frames sensible again"Rodrigo Vivi1-7/+7
This reverts commit 1c80c25fb622973dd135878e98d172be20859049 Author: Daniel Vetter <[email protected]> Date: Wed May 18 18:47:12 2016 +0200 drm/i915/psr: Make idle_frames sensible again There are panels that needs 4 idle frames before entering PSR, but VBT is unproperly set. Also lately it was identified that idle frame count calculated at HW can be off by 1, what makes the minimum of 2, at least. Without the current vbt+1 we are with the risk of having HW calculating 0 idle frames and entering PSR when it shouldn't. Regardless the lack of link training. [Jani: there is some disagreement on the explanation, but the commit regresses so revert it is.] References: http://marc.info/[email protected] Cc: Dominik Brodowski <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Daniel Vetter <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]> Fixes: 1c80c25fb622 ("drm/i915/psr: Make idle_frames sensible again") Cc: [email protected] # v4.8-rc1+ Signed-off-by: Jani Nikula <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-12drm/i915: Add support for Kabylake to function obtaining shared PLLNavare, Manasi D1-1/+1
This adds support for KBL in the new function added in commit ID: commit <f169660ed4e57a03e6f6ed07fe192dbcb7687a0d> that returns a shared pll in case of DDI platforms. Signed-off-by: Manasi Navare <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-13Merge branch 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm ↵Dave Airlie6-55/+368
into drm-next This adds the ASoC codec interfaces for TDA998x HDMI audio from Jyri Sarha. * 'drm-tda998x-devel' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: dts: am335x-boneblack: Add HDMI audio support drm/i2c: tda998x: Register ASoC hdmi-codec and add audio DT binding drm/i2c: tda998x: Improve tda998x_configure_audio() audio related pdata
2016-09-13Merge tag 'sunxi-drm-for-4.9' of ↵Dave Airlie11-51/+365
https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-next Allwinner DRM changes for 4.9 This tag adds the support of a new SoC to sun4i-drm (the Allwinner A33), and the usual few fixes and enhancements * tag 'sunxi-drm-for-4.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: drm/sun4i: add missing header dependencies drm/sun4i: Add a DRC driver drm/sun4i: backend: Handle the SAT drm/sun4i: support A33 tcon drm/sun4i: support TCONs without channel 1 drm/sun4i: Clear encoder->bridge if a bridge is not found drm/sun4i: rgb: add missing calls to drm_panel_{prepare,unprepare} drm/sun4i: Remove redundant dev_err call in sun4i_tcon_init_regmap() drm/sun4i: Add bridge support drm/sun4i: Move panel retrieval in RGB connector drm/sun4i: Store TCON's device structure pointer
2016-09-13Merge tag 'topic/drm-misc-2016-09-08' of ↵Dave Airlie8-8/+99
git://anongit.freedesktop.org/drm-intel into drm-next * tag 'topic/drm-misc-2016-09-08' of git://anongit.freedesktop.org/drm-intel: drm: Fix error path in drm_mode_page_flip_ioctl() Revert "drm: Unify handling of blob and object properties" drm/udl: implement usb_driver suspend/resume. drm: fix signed integer overflow drm/atomic: Reject properties not part of the object. drm/doc: Add a few words on validation with IGT
2016-09-12drm/amd/amdgpu: Tidy up SI IH codeTom St Denis1-22/+8
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: Correct whitespace in SI DPM codeTom St Denis1-232/+209
Replace 8 spaces with tabs, correct {} braces, etc. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: Clean up SI DPM table assignmentsTom St Denis1-32/+10
Hoist common assignments out of cases. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: Allow calling si_dpm_fini at any pointTom St Denis1-3/+3
Allow calling fini even if ps array is not allocated. Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: Tidy up SI DMA codeTom St Denis1-30/+5
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Huang Rui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/powerplay: fix issue power containment not enabled on Tonga.Rex Zhu1-3/+0
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Flora Cui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/powerplay: enable/disable auto thermal throttle for tonga.Rex Zhu1-0/+82
Signed-off-by: Rex Zhu <[email protected]> Acked-by: Flora Cui <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amd/amdgpu: S4 issue for amdgpu (v2)jimqu2-8/+35
reset the asic if adapter is not powerdown when doing freeze() thaw() and restore(), in order to get a valid state of adapter. v2: squash in warning fix from Rex Signed-off-by: JimQu <[email protected]> Acked-by: Christian König <[email protected]> Tested By: Shawn Starr <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amdgpu: change job->ctx field nameMonk Liu4-9/+9
job->ctx actually is a fence_context of the entity it belongs to, naming it as ctx is too vague, and we'll need add amdgpu_ctx into the job structure later. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amdgpu: new method to sync ce&deMonk Liu1-18/+6
sync switch buffer scheme with windows kmd for gfx v8, step2: Insert 128NOP after&before VM flush to prevent CE vm fault. Signed-off-by: Monk Liu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/amdgpu: add VCE VM mode supportMaruthi Srinivas Bayyavarapu2-3/+64
This adds VCE VM mode support from Stoney onwards. Session tracking is an open issue, yet to be supported. v2: Fixed warnings from checkpatch.pl Signed-off-by: Maruthi Bayyavarapu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-12drm/fence: allow fence waiting to be interrupted by userspaceGustavo Padovan3-12/+36
If userspace is running an synchronously atomic commit and interrupts the atomic operation during fence_wait() it will hang until the timer expires, so here we change the wait to be interruptible so it stop immediately when userspace wants to quit. Also adds the necessary error checking for fence_wait(). v2: Comment by Daniel Vetter - Add error checking for fence_wait() v3: Rebase on top of new atomic noblocking support v4: Comment by Maarten Lankhorst - remove 'swapped' bitfield as it was duplicating information v5: Comments by Maarten Lankhorst - assign plane->state to plane_state if !intr - squash previous patch into this one v6: Comment by Sean Paul - rename intr to pre_swap Signed-off-by: Gustavo Padovan <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> [seanpaul fixed a couple checkpatch warnings and moved the preswap comment] Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-12drm: Move property validation to a helper, v2.Maarten Lankhorst3-26/+20
Property lifetimes are equal to the device lifetime, so the separate drm_property_find is not needed. The pointer can be retrieved from the properties member, which saves us some locking and a extra lookup. The lifetime for properties is until the device is destroyed, which happens late in the device unload path. kms_atomic is also testing for invalid properties which returns -ENOENT, to be consistent return -ENOENT for valid properties that don't appear on the object property list. Changes since v1: - Return -ENOENT for invalid properties to make kms_atomic pass. - Change commit message slightly to take this into account. Testcase: kms_atomic Testcase: kms_properties Fixes: 4e9951d96093 ("drm/atomic: Reject properties not part of the object.") Suggested-by: Ville Syrjälä <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-12drm/i915: remove writeq ifdefferyMatthew Auld1-5/+0
drm already provides fallback versions of readq and writeq. Signed-off-by: Matthew Auld <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Signed-off-by: Joonas Lahtinen <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-12drm/bridge: adv7511: add support for the 2nd chipSergei Shtylyov2-9/+8
The Renesas Wheat board has 2 ADV7513 chips on the same I2C bus, however the ADV751x driver only supports 1 chip as it tries to assign the packet/ EDID/CEC memory I2C devices to the fixed I2C addresses. Assign these I2C addresses at the fixed offsets (derived from the programming guide) from the main register map address instead. Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: Archit Taneja <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-09drm/i915: Make DP link training channel equalization DP 1.2 Spec compliantNavare, Manasi D2-36/+22
Fix the number of tries in channel euqalization link training sequence according to DP 1.2 Spec. It returns a boolean depending on channel equalization pass or failure. Signed-off-by: Dhinakaran Pandiyan <[email protected]> Signed-off-by: Manasi Navare <[email protected]> Reviewed-by: Mika Kahola <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
2016-09-09drm/dp/i915: Make clock recovery in the link training compliant with DP Spec 1.2Dhinakaran Pandiyan1-32/+28
This function cleans up clock recovery loop in link training compliant tp Dp Spec 1.2. It tries the clock recovery 5 times for the same voltage or until max voltage swing is reached and removes the additional non compliant retries. This function now returns a boolean values based on if clock recovery passed or failed. v3: * Better Debug prints in case of failures (Mika Kahola) v2: * Rebased on top of new revision of vswing patch (Manasi Navare) Signed-off-by: Dhinakaran Pandiyan <[email protected]> Signed-off-by: Manasi Navare <[email protected]> Reviewed-by: Mika Kahola <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
2016-09-09drm/i915/dp: Move max. vswing check to it's own functionDhinakaran Pandiyan1-4/+13
Wrap the max. vswing check in a separate function. This makes the clock recovery phase of DP link training cleaner v3: Fixed the paranthesis warning (Mika Kahola) v2: Fixed the Compiler warning (Mika Kahola) Signed-off-by: Dhinakaran Pandiyan <[email protected]> Signed-off-by: Manasi Navare <[email protected]> Reviewed-by: Mika Kahola <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
2016-09-09drm/i915/dp: Add a standalone function to obtain shared dpll for HSW/BDW/SKL/BXTJim Bride4-1/+81
Add the PLL selection code for HSW/BDW/BXT/SKL into a stand-alone function in order to allow for the implementation of a platform neutral upfront link training function. v4: * Removed dereferencing NULL pointer in case of failure (Dhinakaran Pandiyan) v3: * Add Hooks for all DDI platforms into this standalone function v2: * Change the macro to use dev_priv instead of dev (David Weinehall) Reviewed-by: Durgadoss R <[email protected]> Signed-off-by: Manasi Navare <[email protected]> Signed-off-by: Jim Bride <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
2016-09-09drm/i915: Flush to GTT domain all GGTT bound objects after hibernationChris Wilson1-5/+16
Recently I have been applying an optimisation to avoid stalling and clflushing GGTT objects based on their current binding. That is we only set-to-gtt-domain upon first bind. However, on hibernation the objects remain bound, but they are in the CPU domain. Currently (since commit 975f7ff42edf ("drm/i915: Lazily migrate the objects after hibernation")) we only flush scanout objects as all other objects are expected to be flushed prior to use. That breaks down in the face of the runtime optimisation above - and we need to flush all GGTT pinned objects (essentially ringbuffers). To reduce the burden of extra clflushes, we only flush those objects we cannot discard from the GGTT. Everything pinned to the scanout, or current contexts or ringbuffers will be flushed and rebound. Other objects, such as inactive contexts, will be left unbound and in the CPU domain until first use after resuming. Fixes: 7abc98fadfdd ("drm/i915: Only change the context object's domain...") Fixes: 57e885318119 ("drm/i915: Use VMA for ringbuffer tracking") References: https://bugs.freedesktop.org/show_bug.cgi?id=94722 Signed-off-by: Chris Wilson <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: David Weinehall <[email protected]> Reviewed-by: Matthew Auld <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-09drm/i915: Shrink objects prior to hibernationChris Wilson1-7/+14
In an attempt to keep the hibernation image as same as possible, let's try and discard any unwanted pages and our own page arrays. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-09drm/i915: Serialise execbuf operation after a dma-buf reservation objectChris Wilson1-0/+11
Now that we can wait upon fences before emitting the request, it becomes trivial to wait upon any implicit fence provided by the dma-buf reservation object. To protect against failure, we force any asynchronous waits on a foreign fence to timeout after 10s - so that a stall in another driver does not permanently cripple ourselves. Still unpleasant though! Testcase: igt/prime_vgem/fence-wait Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: John Harrison <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-09drm/i915: Nonblocking request submissionChris Wilson2-6/+16
Now that we have fences in place to drive request submission, we can employ those to queue requests after their dependencies as opposed to stalling in the middle of an execbuf ioctl. (However, we still choose to spin before enabling the IRQ as that is faster - though contentious.) v2: Do the fence ordering first, where we can still fail. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-09drm/i915: Avoid incrementing hangcheck whilst waiting for external fenceChris Wilson1-4/+0
If we are waiting upon an external fence, from the pov of hangcheck the engine is stuck on the last submitted seqno. Currently we give a small increment to the hangcheck score in order to catch a stuck waiter / driver. Now that we both have an independent wait hangcheck and may be stuck waiting on an external fence, resetting the GPU has little effect on that external fence. As we cannot advance by resetting, skip incrementing the hangcheck score. Signed-off-by: Chris Wilson <[email protected]> Cc: Mika Kuoppala <[email protected]> Reviewed-by: Mika Kuoppala <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-09drm/i915: Ignore valid but unknown semaphoresChris Wilson1-3/+6
If we find a ring waiting on a semaphore for another assigned but not yet emitted request, treat it as valid and waiting. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-09drm/i915/guc: Prepare for nonblocking execbuf submissionChris Wilson2-12/+25
Currently the presumption is that the request construction and its submission to the GuC are all under the same holding of struct_mutex. We wish to relax this to separate the request construction and the later submission to the GuC. This requires us to reserve some space in the GuC command queue for the future submission. For flexibility to handle out-of-order request submission we do not preallocate the next slot in the GuC command queue during request construction, just ensuring that there is enough space later. Signed-off-by: Chris Wilson <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-09-09drm/i915: Prepare object synchronisation for asynchronicityChris Wilson6-95/+95
We are about to specialize object synchronisation to enable nonblocking execbuf submission. First we make a copy of the current object synchronisation for execbuffer. The general i915_gem_object_sync() will be removed following the removal of CS flips in the near future. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: John Harrison <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]