1. 14 Aug, 2017 2 commits
    • Daniel Vetter's avatar
      drm/i915: Avoid the gpu reset vs. modeset deadlock · 97154ec2
      Daniel Vetter authored
      ... using the biggest hammer we have. This is essentially a weaponized
      version of the timeout-based wedging Chris added in
      
      commit 36703e79
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Thu Jun 22 11:56:25 2017 +0100
      
          drm/i915: Break modeset deadlocks on reset
      
      Because defense-in-depth is good it's good to still have both. Also
      note that with the locking change we can now restrict this a lot (old
      gpus and special testing only), so this doesn't kill the TDR benefits
      on at least anything remotely modern.
      
      And futuremore with a few tricks it should be possible to make a much
      more educated guess about whether an atomic commit is stuck waiting on
      the gpu (atomic_t counting the pending i915_sw_fence used by the
      atomic modeset code should do it), so we can improve this.
      
      But for now just start with something that is guaranteed to recover
      faster, for much better CI througput.
      
      This defacto reverts TDR on these platforms, but there's not really a
      single commit to specify as the sole offender.
      
      v2: Add a debug message to explain what's going on. We can't DRM_ERROR
      because that spams CI. And the timeout based fallback still prints a
      DRM_ERROR, in case something goes wrong.
      
      v3: Fix comment layout (Michel)
      
      Fixes: 4680816b ("drm/i915: Wait first for submission, before waiting for request completion")
      Fixes: 221fe799 ("drm/i915: Perform a direct reset of the GPU from the waiter")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v2)
      Cc: Michel Thierry <michel.thierry@intel.com>
      Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v2)
      Reviewed-by: default avatarMichel Thierry <michel.thierry@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170808080828.23650-1-daniel.vetter@ffwll.ch
      97154ec2
    • Mika Kuoppala's avatar
      drm/i915/gen9: Send all components in VF state · 27437890
      Mika Kuoppala authored
      Update gen9 renderstate to account the, long overdue, changes for
      igt commit 5c07135b7bd2 ("tools/null_state/gen9: Send all
      components in VF state").
      Signed-off-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170810110451.31635-1-mika.kuoppala@intel.com
      27437890
  2. 12 Aug, 2017 3 commits
  3. 11 Aug, 2017 7 commits
  4. 10 Aug, 2017 18 commits
  5. 09 Aug, 2017 1 commit
  6. 08 Aug, 2017 9 commits
    • Rodrigo Vivi's avatar
      drm/i915/cnl: Removing missing DDI_E bits from CNL. · ea46708f
      Rodrigo Vivi authored
      DDI_E is not supported on CNL-U and CNL-Y
      
      When adding the initial support we noticed DDI_E wasn't supported
      and removed it on v4 and v5 of that patch.
      However for some reason I missed or put back these 2 chunks.
      
      Time to clean it up to avoid later confusion.
      
      Fixes: 8bcd3dd4 ("drm/i915/cnl: Add power wells for CNL")
      Cc: Clint Taylor <clinton.a.taylor@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170808193237.17410-1-rodrigo.vivi@intel.com
      ea46708f
    • Chris Wilson's avatar
      drm/i915: Perform an invalidate prior to executing golden renderstate · 802673d6
      Chris Wilson authored
      As we may have just bound the renderstate into the GGTT for execution, we
      need to ensure that the GTT TLB are also flushed.
      
      On snb-gt2, this would cause a random GPU hang at the start of a new
      context (e.g. boot) and on snb-gt1, it was causing the renderstate batch
      to take ~10s. It was the GPU hang that revealed the truth, as the CS
      gleefully executed beyond the end of the golden renderstate batch, a good
      indicator for a GTT TLB miss.
      
      Fixes: 20fe17aa ("drm/i915: Remove redundant TLB invalidate on switching contexts")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: stable@vger.kernel.org
      Link: https://patchwork.freedesktop.org/patch/msgid/20170808131904.1385-1-chris@chris-wilson.co.ukReviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: <drm-intel-fixes@lists.freedesktop.org> # v4.12-rc1+
      802673d6
    • Daniel Vetter's avatar
    • Daniel Vetter's avatar
      drm: Nuke drm_atomic_helper_connector_dpms · 7d902c05
      Daniel Vetter authored
      It's dead code, the core handles all this directly now.
      
      The only special case is nouveau and tda988x which used one function
      for both legacy modeset code and -nv50 atomic world instead of 2
      vtables. But amounts to exactly the same.
      
      v2: Rebase over the panel/brideg refactorings in stm/ltdc.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: Andrzej Hajda <a.hajda@samsung.com>
      Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
      Cc: Peter Senna Tschudin <peter.senna@collabora.com>
      Cc: Martin Donnelly <martin.donnelly@ge.com>
      Cc: Martyn Welch <martyn.welch@collabora.co.uk>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Stefan Agner <stefan@agner.ch>
      Cc: Alison Wang <alison.wang@freescale.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: CK Hu <ck.hu@mediatek.com>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Carlo Caione <carlo@caione.org>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Mark Yao <mark.yao@rock-chips.com>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Vincent Abriou <vincent.abriou@st.com>
      Cc: Yannick Fertre <yannick.fertre@st.com>
      Cc: Philippe Cornu <philippe.cornu@st.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Chen-Yu Tsai <wens@csie.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: Jonathan Hunter <jonathanh@nvidia.com>
      Cc: Jyri Sarha <jsarha@ti.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: John Stultz <john.stultz@linaro.org>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
      Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
      Cc: Yakir Yang <kuankuan.y@gmail.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Jose Abreu <Jose.Abreu@synopsys.com>
      Cc: Romain Perier <romain.perier@collabora.com>
      Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
      Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: Rongrong Zou <zourongrong@gmail.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Hai Li <hali@codeaurora.org>
      Cc: "Noralf Trønnes" <noralf@tronnes.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: intel-gfx@lists.freedesktop.org
      Cc: linux-mediatek@lists.infradead.org
      Cc: linux-amlogic@lists.infradead.org
      Cc: nouveau@lists.freedesktop.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: linux-rockchip@lists.infradead.org
      Cc: linux-tegra@vger.kernel.org
      Cc: virtualization@lists.linux-foundation.org
      Cc: zain wang <wzz@rock-chips.com>
      Cc: Baoyou Xie <baoyou.xie@linaro.org>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725080122.20548-8-daniel.vetter@ffwll.chAcked-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
      Acked-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
      Acked-by: default avatarArchit Taneja <architt@codeaurora.org>
      Tested-by: Philippe Cornu <philippe.cornu@st.com> (on stm)
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Acked-by: default avatarShawn Guo <shawnguo@kernel.org>
      Acked-by: default avatarShawn Guo <shawnguo@kernel.org>
      Acked-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      Acked-by: default avatarVincent Abriou <vincent.abriou@st.com>
      7d902c05
    • Daniel Vetter's avatar
      drm: Nuke drm_atomic_helper_connector_set_property · 482b0e3c
      Daniel Vetter authored
      It's dead code, the core handles all this directly now. This also
      allows us to unexport drm_atomic_helper_connector_set_property.
      
      The only special case is nouveau which used one function for both
      pre-nv50 legacy modeset code and post-nv50 atomic world instead of 2
      vtables. But amounts to exactly the same.
      
      What is rather strange here is how few drivers set this up, I suspect
      the earlier patch to handle properties in the core did end up fixing a
      pile of possible issues.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Vincent Abriou <vincent.abriou@st.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725080122.20548-7-daniel.vetter@ffwll.chAcked-by: default avatarVincent Abriou <vincent.abriou@st.com>
      482b0e3c
    • Daniel Vetter's avatar
      drm: Nuke drm_atomic_helper_plane_set_property · e90271bc
      Daniel Vetter authored
      It's dead code, the core handles all this directly now. This also
      allows us to unexport drm_atomic_plane_set_property.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Liviu Dudau <liviu.dudau@arm.com>
      Cc: Brian Starkey <brian.starkey@arm.com>
      Cc: Mali DP Maintainers <malidp@foss.arm.com>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Inki Dae <inki.dae@samsung.com>
      Cc: Joonyoung Shim <jy0922.shim@samsung.com>
      Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Krzysztof Kozlowski <krzk@kernel.org>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org>
      Cc: Vincent Abriou <vincent.abriou@st.com>
      Cc: Yannick Fertre <yannick.fertre@st.com>
      Cc: Philippe Cornu <philippe.cornu@st.com>
      Cc: Jyri Sarha <jsarha@ti.com>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: Rongrong Zou <zourongrong@gmail.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: Eric Engestrom <eric@engestrom.ch>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: intel-gfx@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: linux-renesas-soc@vger.kernel.org
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725080122.20548-6-daniel.vetter@ffwll.chReviewed-by: default avatarArchit Taneja <architt@codeaurora.org>
      Acked-by: default avatarPhilippe Cornu <philippe.cornu@st.com>
      Tested-by: default avatarPhilippe Cornu <philippe.cornu@st.com>
      Acked-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
      Acked-by: default avatarVincent Abriou <vincent.abriou@st.com>
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      e90271bc
    • Daniel Vetter's avatar
      drm: Nuke drm_atomic_helper_crtc_set_property · b6715570
      Daniel Vetter authored
      It's dead code because this is now handled in the core.
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Sean Paul <seanpaul@chromium.org>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Cc: Alexey Brodkin <abrodkin@synopsys.com>
      Cc: Shawn Guo <shawn.guo@linaro.org>
      Cc: Eric Engestrom <eric@engestrom.ch>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Cc: Philippe Cornu <philippe.cornu@st.com>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Sushmita Susheelendra <ssusheel@codeaurora.org>
      Cc: Archit Taneja <architt@codeaurora.org>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: nouveau@lists.freedesktop.org
      Cc: Philipp Zabel <p.zabel@pengutronix.de>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725080122.20548-5-daniel.vetter@ffwll.chReviewed-by: default avatarArchit Taneja <architt@codeaurora.org>
      Acked-by: default avatarPhilippe Cornu <philippe.cornu@st.com>
      Tested-by: default avatarPhilippe Cornu <philippe.cornu@st.com>
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Acked-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      b6715570
    • Daniel Vetter's avatar
      drm: Handle properties in the core for atomic drivers · 144a7999
      Daniel Vetter authored
      The reason behind the original indirection through the helper
      functions was to allow existing drivers to overwrite how they handle
      properties. For example when a vendor-specific userspace had
      expectations that didn't match atomic. That seemed likely, since
      atomic is standardizing a _lot_ more of the behaviour of a kms driver.
      
      But 20 drivers later there's no such need at all. Worse, this forces
      all drivers to hook up the default behaviour, breaking userspace if
      they forget to do that. And it forces us to export a bunch of core
      function just for those helpers.
      
      And finally, these helpers are the last places using
      drm_atomic_legacy_backoff() and the implicit acquire_ctx.
      
      This patch here just implements the new behaviour and updates the
      docs. Follow-up patches will garbage-collect all the dead code.
      
      v2: Fixup docs even better!
      
      v3: Make it actually work ...
      
      v4: Drop the uses_atomic_modeset() checks from the previous patch
      again, since they're now moved up in the callchain.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: Archit Taneja <architt@codeaurora.org> (v3)
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725120204.2107-1-daniel.vetter@ffwll.ch
      144a7999
    • Daniel Vetter's avatar
      drm: Don't update property values for atomic drivers · 4a97a3da
      Daniel Vetter authored
      Atomic drivers only use the property value store for immutable (i.e.
      can't be set by userspace, but the kernel can still adjust it)
      properties. The only tricky part is the removal of the update in
      drm_atomic_helper_update_legacy_modeset_state().
      
      This was added in
      
      commit 8c10342c (tag: topic/drm-misc-2015-07-28)
      Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Date:   Mon Jul 27 13:24:29 2015 +0200
      
          drm/atomic: Update legacy DPMS state during modesets, v3.
      
      by copying it from the i915 code, where it was originally added in
      
      commit 68d34720
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Sep 6 22:08:35 2012 +0200
      
          drm/i915: update dpms property in set_mode
      
      for the legacy modeset code. The reason we needed this hack was that
      i915 didn't yet set DRIVER_ATOMIC, and we checked for that instead of
      the newer-ish drm_drv_uses_atomic_modeset(), which avoids such
      troubles. With the correct feature checks this isn't needed anymore at
      all.
      
      Also make sure that drivers don't accidentally get this wrong by
      making the exported version of drm_object_property_get_value() only
      work for legacy drivers. Only gma500 uses it anyway.
      
      v2: Fixup the uses_atomic_modeset() checks (Maarten)
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20170725120137.1903-1-daniel.vetter@ffwll.ch
      4a97a3da