1. 18 12月, 2018 1 次提交
    • I
      drm/i915/icl: Fix HPD handling for TypeC legacy ports · f6bff60e
      Imre Deak 提交于
      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: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181214182703.18865-4-imre.deak@intel.com
      f6bff60e
  2. 17 12月, 2018 1 次提交
    • M
      drm/i915/dsc: Add Per connector debugfs node for DSC support/enable · e845f099
      Manasi Navare 提交于
      DSC can be supported per DP connector. This patch adds a per connector
      debugfs node to expose DSC support capability by the kernel.
      The same node can be used from userspace to force DSC enable.
      
      force_dsc_en written through this debugfs node is used to force
      DSC even for lower resolutions.
      
      Credits to Ville Syrjala for suggesting the proper locks to be used
      and to Lyude Paul for explaining how to use them in this context
      
      v8:
      * Add else if (ret) for drm_modeset_lock (Lyude)
      v7:
      * Get crtc, crtc_state from connector atomic state
      and add proper locks and backoff (Ville, Chris Wilson, Lyude)
      (Suggested-by: Ville Syrjala <ville.syrjala@linux.intel.com>)
      * Use %zu for printing size_t variable (Lyude)
      v6:
      * Read fec_capable only for non edp (Manasi)
      v5:
      * Name it dsc sink support and also add
      fec support in the same node (Ville)
      v4:
      * Add missed connector_status check (Manasi)
      * Create i915_dsc_support node only for Gen >=10 (manasi)
      * Access intel_dp->dsc_dpcd only if its not NULL (Manasi)
      v3:
      * Combine Force_dsc_en with this patch (Ville)
      v2:
      * Use kstrtobool_from_user to avoid explicit error checking (Lyude)
      * Rebase on drm-tip (Manasi)
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Lyude Paul <lyude@redhat.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181206005407.4698-1-manasi.d.navare@intel.com
      e845f099
  3. 11 12月, 2018 2 次提交
  4. 03 12月, 2018 2 次提交
  5. 30 11月, 2018 5 次提交
    • A
      i915/dp/fec: Add fec_enable to the crtc state. · 240999cf
      Anusha Srivatsa 提交于
      For DP 1.4 and above, Display Stream compression can be
      enabled only if Forward Error Correctin can be performed.
      
      Add a crtc state for FEC. Currently, the state
      is determined by platform, DP and DSC being
      enabled. Moving forward we can use the state
      to have error correction on other scenarios too
      if needed.
      
      v2:
      - Control compression_enable with the fec_enable
      parameter in crtc state and with intel_dp_supports_fec()
      (Ville)
      
      - intel_dp_can_fec()/intel_dp_supports_fec()(manasi)
      
      v3: Check for FEC support along with setting crtc state.
      
      v4: add checks to intel_dp_source_supports_dsc.(manasi)
      - Move intel_dp_supports_fec() closer to
      intel_dp_supports_dsc() (Anusha)
      
      v5: Move fec check to intel_dp_supports_dsc(Ville)
      
      v6: Remove warning. rebase.
      
      v7: change crtc state to include DP sink and fec capability
      of source.(Manasi)
      
      v8: Set fec_enable in crtc in intel_dp_compute_config().
      
      v9 (From Manasi):
      * Combine the !edp and !fec_support check
      * Derive dev_priv from intel_dp directly
      
      v10 (From Manasi):
      * Rebase
      Suggested-by: NVille Syrjala <ville.syrjala@linux.intel.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Signed-off-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.comk>
      Reviewed-by: NManasi Navare <manasi.d.navare@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-14-manasi.d.navare@intel.com
      240999cf
    • M
      drm/i915/dsc: Enable and disable appropriate power wells for VDSC · a24c62f9
      Manasi Navare 提交于
      A separate power well 2 (PG2) is required for VDSC on eDP transcoder
      whereas all other transcoders use the power wells associated with the
      transcoders for VDSC.
      This patch adds a helper to obtain correct power domain depending on
      transcoder being used and enables/disables the power wells during
      VDSC enabling/disabling.
      
      v4:
      * Get VDSC power domain only if compression en is set
      in crtc_state (Ville, Imre)
      v3:
      * Call it intel_dsc_power_domain, add to
      intel_ddi_get_power_domains (Ville)
      v2:
      * Fix tabs, const crtc_state, fix comments (Ville)
      Suggested-by: NVille Syrjala <ville.syrjala@linux.intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-13-manasi.d.navare@intel.com
      a24c62f9
    • G
      drm/i915/dp: Enable/Disable DSC in DP Sink · 2279298d
      Gaurav K Singh 提交于
      This patch enables decompression support in sink device
      before link training and disables the same during the
      DDI disabling.
      
      v3 (From manasi):
      * Pass bool state to enable/disable (Ville)
      v2:(From Manasi)
      * Change the enable/disable function to take crtc_state
      instead of intel_dp as an argument (Manasi)
      * Use the compression_enable flag as part of crtc_state (Manasi)
      
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Gaurav K Singh <gaurav.k.singh@intel.com>
      Signed-off-by: NGaurav K Singh <gaurav.k.singh@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-6-manasi.d.navare@intel.com
      2279298d
    • G
      drm/i915/dsc: Define & Compute VESA DSC params · 168243c1
      Gaurav K Singh 提交于
      This patches does the following:
      
      1. This patch defines all the DSC parameters as per the VESA
      DSC specification. These are stored in the encoder and used
      to compute the PPS parameters to be sent to the Sink.
      2. Compute all the DSC parameters which are derived from DSC
      state of intel_crtc_state.
      3. Compute all parameters that are VESA DSC specific
      
      This computation happens in the atomic check phase during
      compute_config() to validate if display stream compression
      can be enabled for the requested mode.
      
      v8 (From Manasi):
      * DEBUG_KMS instead of DRM_ERROR for user triggerable
      errors (Ville)
      v7: (From Manasi)
      * Dont use signed int for rc_range_params (Manasi)
      * Mask the range_bpg_offset to use only 6 bits
      * Add SPDX identifier (Chris Wilson)
      v6 (From Manasi):
      * Add a check for line_buf_depth return value (Anusha)
      * Remove DRM DSC constants to different patch (Manasi)
      v5 (From Manasi):
      * Add logic to limit the max line buf depth for DSC 1.1 to 13
      as per DSC 1.1 spec
      * Fix dim checkpatch warnings/checks
      
      v4 (From Gaurav):
      * Rebase on latest drm tip
      * rename variable name(Manasi)
      * Populate linebuf_depth variable(Manasi)
      
      v3 (From Gaurav):
      * Rebase my previous patches on top of Manasi's latest patch
      series
      * Using >>n rather than /2^n (Manasi)
      * Change the commit message to explain what the patch is doing(Gaurav)
      
      Fixed review comments from Ville:
      * Don't use macro TWOS_COMPLEMENT
      * Mention in comment about the source of RC params
      * Return directly from case statements
      * Using single asssignment for assigning rc_range_params
      * Using <<n rather than *2^n and removing the comments
      about the fixed point numbers
      
      v2 (From Manasi):
      * Update logic for minor version to consider the dpcd value
      and what supported by the HW platform
      * Use DRM DSC config struct instead of intel_dp struct
      * Move the DSC constants to DRM DSC header file
      * Use u16, u8 where bigger data types not needed
      * * Compute the DSC parameters as part of DSC compute config
      since the computation can fail (Manasi)
      
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Gaurav K Singh <gaurav.k.singh@intel.com>
      Signed-off-by: NGaurav K Singh <gaurav.k.singh@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Co-developed-by: NManasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181129193827.7914-1-manasi.d.navare@intel.com
      168243c1
    • M
      drm/i915/dp: Add DSC params and DSC config to intel_crtc_state · 7b610f1f
      Manasi Navare 提交于
      Basic DSC parameters and DSC configuration data needs to be computed
      for each of the requested mode during atomic check. This is
      required since for certain modes, valid DSC parameters and config
      data might not be computed in which case compression cannot be
      enabled for that mode.
      For that reason we need to add these params and config structure
      to the intel_crtc_state so that if valid this state information
      can directly be used while enabling DSC in atomic commit.
      
      v2:
      * Rebase on drm-tip (Manasi)
      
      Cc: Gaurav K Singh <gaurav.k.singh@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Reviewed-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181128202628.20238-1-manasi.d.navare@intel.com
      7b610f1f
  6. 29 11月, 2018 4 次提交
  7. 23 11月, 2018 1 次提交
  8. 21 11月, 2018 1 次提交
  9. 15 11月, 2018 2 次提交
  10. 13 11月, 2018 1 次提交
  11. 10 11月, 2018 1 次提交
  12. 09 11月, 2018 1 次提交
  13. 05 11月, 2018 2 次提交
  14. 03 11月, 2018 1 次提交
  15. 02 11月, 2018 3 次提交
  16. 01 11月, 2018 3 次提交
  17. 31 10月, 2018 1 次提交
  18. 29 10月, 2018 1 次提交
  19. 24 10月, 2018 3 次提交
  20. 18 10月, 2018 3 次提交
  21. 17 10月, 2018 1 次提交