1. 11 Jul, 2019 3 commits
    • Matt Roper's avatar
      drm/i915/gen11: Convert combo PHY logic to use new 'enum phy' namespace · dc867bc7
      Matt Roper authored
      Convert the code that operates directly on gen11 combo PHY's to use the
      new namespace.  Combo PHY registers are those named "ICL_PORT_*" plus
      ICL_DPHY_CHKN.
      
      Note that a lot of the PHY programming happens in the MIPI DSI code.
      For clarity I've added a for_each_dsi_phy() to loop over the phys used
      by DSI.  Since DSI always uses A & B on gen11, port=phy in all cases so
      it doesn't actually matter which form we use in the DSI code.  I've used
      the phy iterator in code that's explicitly working with the combo PHY,
      but left the rest of the DSI code using the port iterator and namespace
      to minimize patch deltas.  We can switch the rest of the DSI code over
      to use phy terminology later if this winds up being too confusing.
      
      v6: Drop an include of drm/i915_drm.h; that was previously included just
          for the definition of 'enum port' which this patch removes the need
          for.  (Jose)
      
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190709183934.445-4-matthew.d.roper@intel.com
      dc867bc7
    • Matt Roper's avatar
      drm/i915/gen11: Program ICL_DPCLKA_CFGCR0 according to PHY · befa372b
      Matt Roper authored
      Although the register name implies that it operates on DDI's,
      DPCLKA_CFGCR0_ICL actually needs to be programmed according to the PHY
      that's in use.  I.e., when using EHL's DDI-D on combo PHY A, the bits
      described as "port A" in the bspec are what we need to set.  The bspec
      clarifies:
      
              "[For EHL] DDID clock tied to DDIA clock, so DPCLKA_CFGCR0 DDIA
              Clock Select chooses the PLL for both DDIA and DDID and drives
              port A in all cases."
      
      Also, since the CNL DPCLKA_CFGCR0 bit defines are still port-based, we
      create separate ICL-specific defines that accept the PHY rather than
      trying to share the same bit definitions between CNL and ICL.
      
      v5: Make icl_dpclka_cfgcr0_clk_off() take phy rather than port.  When
          splitting the original patch the hunk to handle this wound up too
          late in the series.  (Sparse)
      
      v6: Since we're already changing this code,
          s/DPCLKA_CFGCR0_ICL/ICL_DPCLKA_CFGCR0/ for consistency.  (Jose)
      
      Bspec: 33148
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190709183934.445-3-matthew.d.roper@intel.com
      befa372b
    • Matt Roper's avatar
      drm/i915/gen11: Start distinguishing 'phy' from 'port' · 358633e7
      Matt Roper authored
      Our past DDI-based Intel platforms have had a fixed DDI<->PHY mapping.
      Because of this, both the bspec documentation and our i915 code has used
      the term "port" when talking about either DDI's or PHY's; it was always
      easy to tell what terms like "Port A" were referring to from the
      context.
      
      Unfortunately this is starting to break down now that EHL allows PHY-A
      to be driven by either DDI-A or DDI-D.  Is a setup with DDI-D driving
      PHY-A considered "Port A" or "Port D?"  The answer depends on which
      register we're working with, and even the bspec doesn't do a great job
      of clarifying this.
      
      Let's try to be more explicit about whether we're talking about the DDI
      or the PHY on gen11+ by using 'port' to refer to the DDI and creating a
      new 'enum phy' namespace to refer to the PHY in use.
      
      This patch just adds the new PHY namespace, new phy-based versions of
      intel_port_is_*(), and a helper to convert a port to a PHY.
      Transitioning various areas of the code over to using the PHY namespace
      will be done in subsequent patches to make review easier.  We'll remove
      the intel_port_is_*() functions at the end of the series when we
      transition all callers over to using the PHY-based versions.
      
      v2:
       - Convert a few more 'port' uses to 'phy.' (Sparse)
      
      v3:
       - Switch DDI_CLK_SEL() back to 'port.' (Jose)
       - Add a code comment clarifying why DPCLKA_CFGCR0_ICL needs to use PHY
         for its bit definitions, even though the register description is
         given in terms of DDI.
       - To avoid confusion, switch CNL's DPCLKA_CFGCR0 defines back to using
         port and create separate ICL+ definitions that work in terms of PHY.
      
      v4:
       - Rebase and resolve conflicts with Imre's TC series.
       - This patch now just adds the namespace and a few convenience
         functions; the important changes are now split out into separate
         patches to make review easier.
      Suggested-by: default avatarVille Syrjala <ville.syrjala@linux.intel.com>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190709183934.445-2-matthew.d.roper@intel.com
      358633e7
  2. 10 Jul, 2019 9 commits
  3. 09 Jul, 2019 18 commits
  4. 08 Jul, 2019 3 commits
  5. 07 Jul, 2019 1 commit
  6. 06 Jul, 2019 4 commits
  7. 05 Jul, 2019 2 commits