1. 02 Jan, 2019 1 commit
  2. 31 Dec, 2018 13 commits
  3. 28 Dec, 2018 7 commits
  4. 27 Dec, 2018 2 commits
  5. 25 Dec, 2018 3 commits
  6. 22 Dec, 2018 1 commit
  7. 21 Dec, 2018 4 commits
  8. 20 Dec, 2018 1 commit
  9. 18 Dec, 2018 7 commits
    • Imre Deak's avatar
      drm/i915/icl: Add fallback detection method for TypeC legacy ports · 2a041c97
      Imre Deak authored
      Add a fallback detection method for TypeC legacy ports in case the
      VBT port information used to detect normally such ports is
      incorrect.
      
      For the fallback method we use the TypeC legacy mode specific HPD
      interrupt flag which should only be raised for a legacy port.
      
      WARN if the VBT port info is incorrect.
      
      In a case where we'd detect the port in a contradicting way both as a
      legacy and also as a USB DP and/or TBT alternate port treat the port
      as legacy (by also emitting a WARN from icl_update_tc_port_type).
      
      v2:
      - Repurpose the detection as a fallback method instead of using
        it only for the DP legacy case. By now we should normally use VBT to
        detect DP legacy ports as well.
      Suggested-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (v1)
      Reviewed-by: default avatarMika Kahola <mika.kahola@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181214182703.18865-5-imre.deak@intel.com
      2a041c97
    • Imre Deak's avatar
      drm/i915/icl: Fix HPD handling for TypeC legacy ports · f6bff60e
      Imre Deak authored
      Atm HPD disconnect events on TypeC ports will break things, since we'll
      switch the TypeC mode (between legacy and disconnected modes as well as
      among USB DP alternate, Thunderbolt alternate and disconnected modes) on
      the fly from the HPD disconnect interrupt work while the port may be
      still active.
      
      Even if the port happens to be not active during the disconnect we'd
      still have a problem during a subsequent modeset or AUX transfer that
      could happen regardless of the port's connected state. For instance the
      system resume display mode restore code and userspace could perform a
      modeset on the port or userspace could start an AUX transfer even if the
      port is in disconnected state.
      
      To fix this keep TypeC legacy ports in legacy mode whenever we're not
      suspended. This mode is a static configuration as opposed to the
      Thunderbolt and USB DP alternate modes between which we can switch
      dynamically.
      
      We determine if a TypeC port is legacy (wired to a legacy HDMI or a
      legacy DP connector) via the VBT DDI port specific USB-TypeC and
      Thunderbolt flags. If both these flags are cleared then the port is
      configured for legacy mode.
      
      On such legacy ports we'll run the TypeC PHY connect sequence explicitly
      during driver loading and system resume (vs. running the sequence during
      HPD processing). The connect will succeed even if the display is not
      connected to begin with (or disappears during the suspended state) since
      for legacy ports the PORT_TX_DFLEXDPPMS / DP_PHY_MODE_STATUS_COMPLETED
      flag is always set (as opposed to the USB DP alternate mode where it
      gets set only when a display is connected).
      
      Correspondingly run the TypeC PHY disconnect sequence during system
      suspend and driver unloading. For the unloading case I had to split
      up intel_dp_encoder_destroy() to be able to have the 1. flush any
      pending encoder work, 2. disconnect TC PHY, 3. call DRM core cleanup and
      kfree on the encoder object.
      
      For now run the PHY disconnect during suspend only for TypeC legacy
      ports. We will need to disconnect even in USB DP alternate mode in the
      future, but atm we don't have a way to reconnect the port in this mode
      during resume if the display disappears while being suspended. So for
      now punt on this case.
      
      Note that we do not disconnect the port during runtime suspend; in
      legacy mode there are no shared HW resources (PHY lanes) with other HW
      blocks (USB), so no need to release / reacquire these resources as with
      USB DP alternate mode. The only reason to disconnect legacy ports during
      system suspend is that the PORT_TX_DFLEXDPPMS /
      DP_PHY_MODE_STATUS_COMPLETED flag must be rechecked and the port must be
      connected again during system resume. We'll also have to turn the check
      for this flag into a poll, after figuring out what's the proper timeout
      value for it.
      
      v2:
      - Remove the redundant special casing of legacy mode when doing a
        disconnect in icl_tc_port_connected(). It's guaranteed already that we
        won't disconnect legacy ports in that function.
      - Add a note about the new intel_ddi_encoder_destroy() hook.
      - Reword the commit message after switching to the VBT based detection.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108070
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108924
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181214182703.18865-4-imre.deak@intel.com
      f6bff60e
    • Imre Deak's avatar
      drm/i915/bios: Parse the VBT TypeC and Thunderbolt port flags · 38b3416f
      Imre Deak authored
      This is needed by the next patch to determine if a DDI TypeC port is
      physically wired to a legacy DP or legacy HDMI connector or if the port
      is wired to a USB-C/Thunderbolt connector.
      
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181214182703.18865-3-imre.deak@intel.com
      38b3416f
    • Imre Deak's avatar
      drm/i915/icl: Add a debug print for TypeC port disconnection · f0236a85
      Imre Deak authored
      It's useful to see at which point a TypeC port gets disconnected, so add
      a debug print for it.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181214182703.18865-2-imre.deak@intel.com
      f0236a85
    • Chris Wilson's avatar
      drm/i915: Apply missed interrupt after reset w/a to all ringbuffer gen · 060f2322
      Chris Wilson authored
      Having completed a test run of gem_eio across all machines in CI we also
      observe the phenomenon (of lost interrupts after resetting the GPU) on
      gen3 machines as well as the previously sighted gen6/gen7. Let's apply
      the same HWSTAM workaround that was effective for gen6+ for all, as
      although we haven't seen the same failure on gen4/5 it seems prudent to
      keep the code the same.
      
      As a consequence we can remove the extra setting of HWSTAM and apply the
      register from a single site.
      
      v2: Delazy and move the HWSTAM into its own function
      v3: Mask off all HWSP writes on driver unload and engine cleanup.
      v4: And what about the physical hwsp?
      v5: No, engine->init_hw() is not called from driver_init_hw(), don't be
      daft. Really scrub HWSTAM as early as we can in driver_init_mmio()
      v6: Rename set_hwsp as it was setting the mask not the hwsp register.
      v7: Ville pointed out that although vcs(bsd) was introduced for g4x/ilk,
      per-engine HWSTAM was not introduced until gen6!
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=108735Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181218102712.11058-1-chris@chris-wilson.co.uk
      060f2322
    • Clint Taylor's avatar
      drm/i915/icl: combo port vswing programming changes per BSPEC · b265a2a6
      Clint Taylor authored
      In August 2018 the BSPEC changed the ICL port programming sequence to
      closely resemble earlier gen programming sequence. Restrict combo phy to
      HBR max rate unless eDP panel is connected to port.
      
      v2: remove debug code that Imre found
      v3: simplify translation table if-else
      v4: edp translation table now based on link rate and low_swing
      v5: Misc review comments + r-b
      BSpec: 21257
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarClint Taylor <clinton.a.taylor@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1545084827-5776-1-git-send-email-clinton.a.taylor@intel.com
      b265a2a6
    • Hans de Goede's avatar
      drm/i915: Update crtc scaler settings when update_pipe is set · 2c5c415c
      Hans de Goede authored
      When the pipe_config's update_pipe flag is set we may need to update the
      panel fitting settings. On GEN9+ this means we need to update the crtc's
      scaler settings.
      
      This fixes the following WARN_ON, during i915 loading on an Asrock
      B150M Pro4S/D3 board with an i5-6500 CPU / graphics:
      
      [drm:pipe_config_err [i915]] *ERROR* mismatch in pch_pfit.enabled
       (expected no, found yes)
      pipe state doesn't match!
      WARNING: CPU: 3 PID: 305 at drivers/gpu/drm/i915/intel_display.c:12084
      
      With line 12084 being the I915_STATE_WARN call inside the
      "if (!intel_pipe_config_compare())" block in verify_crtc_state().
      
      On this board with 2 1920x1080 monitors connected over HDMI the GOP
      initializes both monitors at 1920x1080 and despite no scaling being
      necessary configures a scaler for one of them.
      
      When booting with fastboot=1 on the initial modeset needs_modeset will
      be false while update_pipe is true. Since we were not calling
      skl_update_scaler_crtc() in this case we would leave the scaler enabled
      causing this error.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181217141903.4182-1-hdegoede@redhat.com
      2c5c415c
  10. 17 Dec, 2018 1 commit