1. 16 4月, 2015 3 次提交
    • V
      drm/i915/bxt: add display initialize/uninitialize sequence (PHY) · 5c6706e5
      Vandana Kannan 提交于
      Add PHY specific display initialization sequence as per BSpec.
      
      Note that the PHY initialization/uninitialization are done
      at their current place only for simplicity, in a future patch - when more
      of the runtime PM features will be enabled - these will be moved to
      power well#1 and modeset encoder enabling/disabling hooks respectively.
      
      The call to uninitialize the PHY during system/runtime suspend will be
      added later in this patchset.
      
      v1: Added function definitions in header files
      v2: Imre's review comments addressed
      - Moved CDCLK related definitions to i915_reg.h
      - Removed defintions for CDCLK frequency
      - Split uninit_cdclk() by adding a phy_uninit function
      - Calculate freq and decimal based on input frequency
      - Program SSA precharge based on input frequency
      - Use wait_for 1ms instead 200us udelay for DE PLL locking
      - Removed initial value for divider, freq, decimal, ratio.
      - Replaced polling loops with wait_for
      - Parameterized latency optim setting
      - Fix the parts where DE PLL has to be disabled.
      - Call CDCLK selection from mode set
      
      v3: (imre)
      - add note about the plan to move the cdclk/phy init to a better place
      - take rps.hw_lock around pcode access
      - fix DDI PHY timeout value
      - squash in Vandana's "PORT_CL2CM_DW6_A BUN fix",
        "DDI PHY programming register defn", "Do ddi_phy_init always",
      - move PHY register macros next to the corresponding CHV/VLV macros
      - move DE PLL register macros here from another patch since they are
        used here first
      - add BXT_ prefix to CDCLK flags
      - s/COMMON_RESET/COMMON_RESET_DIS/ and clarify related code comments
      - fix incorrect read value for the RMW of BXT_PHY_CTL_FAMILY_DDI
      - fix using GT_DISPLAY_EDP_POWER_ON vs. GT_DISPLAY_DDI_POWER_ON
        when powering on DDI ports
      - fix incorrect port when setting BXT_PORT_TX_DW14_LN for DDI ports
      - add missing masking when programming CDCLK_FREQ_DECIMAL
      - add missing powering on for DDI-C port, rename OCL2_LDOFUSE_PWR_EN
        to OCL2_LDOFUSE_PWR_DIS to reduce confusion
      - add note about mismatch with bspec in the PORT_REF_DW6 fields
      - factor out PHY init code to a new function, so we can call it for
        PHY1 and PHY0, instead of open-coding the same
      
      v4: (ville)
      - split the CDCLK/PHY parts into two patches, update commit message
        accordingly
      - use the existing dpio_phy enum instead of adding a new one for the
        same purpose
      - flip the meaning of PHYs so that PHY_A is PHY1 and PHY_BC is PHY0 to
        better match CHV
      - s/BXT_PHY/_BXT_PHY/
      - use _PIPE for _BXT_PHY instead of open-coding it
      - drop _0_2_0_GTTMMADR suffix from BXT_P_CR_GT_DISP_PWRON
      - define GT_DISPLAY_POWER_ON in a more standard way
      - make a note that the CHV ConfigDB also disagrees about GRC_CODE field
        definitions
      - fix lane optimization refactoring fumble from v3
      - add per PHY uninit functions to match the init counterparts
      
      Signed-off-by: Vandana Kannan <vandana.kannan@intel.com> (v2)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5c6706e5
    • V
      drm/i915/bxt: add display initialize/uninitialize sequence (CDCLK) · f8437dd1
      Vandana Kannan 提交于
      Add CDCLK specific display clock initialization sequence as per BSpec.
      
      Note that the CDCLK initialization/uninitialization are done at their
      current place only for simplicity, in a future patch - when more of the
      runtime PM features will be enabled - these will be moved to power
      well#1 and modeset encoder enabling/disabling hooks respectively. This
      also means that atm dynamic power gating power well #1 is effectively
      disabled.
      
      The call to uninitialize CDCLK during system/runtime suspend will be
      added later in this patchset.
      
      v1: Added function definitions in header files
      v2: Imre's review comments addressed
      - Moved CDCLK related definitions to i915_reg.h
      - Removed defintions for CDCLK frequency
      - Split uninit_cdclk() by adding a phy_uninit function
      - Calculate freq and decimal based on input frequency
      - Program SSA precharge based on input frequency
      - Use wait_for 1ms instead 200us udelay for DE PLL locking
      - Removed initial value for divider, freq, decimal, ratio.
      - Replaced polling loops with wait_for
      - Parameterized latency optim setting
      - Fix the parts where DE PLL has to be disabled.
      - Call CDCLK selection from mode set
      
      v3: (imre)
      - add note about the plan to move the cdclk/phy init to a better place
      - take rps.hw_lock around pcode access
      - move DE PLL register macros here from another patch since they are
        used here first
      - add BXT_ prefix to CDCLK flags
      - add missing masking when programming CDCLK_FREQ_DECIMAL
      
      v4: (ville)
      - split the CDCLK/PHY parts into two patches, update commit message
        accordingly
      - s/DISPLAY_PCU_CONTROL/HSW_PCODE_DE_WRITE_FREQ_REQ/
      - simplify BXT_DE_PLL_RATIO macros
      - fix BXT_DE_PLL_RATIO_MASK
      - s/bxt_select_cdclk_freq/broxton_set_cdclk_freq/
      - move cdclk init/uninit/set code from intel_ddi.c to intel_display.c
      - remove redundant code comments for broxton_set_cdclk_freq()
      - sanitize fixed point<->integer frequency value conversion
      - use DRM_ERROR instead of WARN
      - do RMW when programming BXT_DE_PLL_CTL for safety
      - add note about PLL lock timeout being exactly 200us
      - make PCU error messages more descriptive
      - instead of using 0 freq to mean PLL off/bypass freq use 19200
        for clarity, as the latter one is the actual rate
      - simplify pcode programming, removing duplicated
        sandybridge_pcode_write() call
      - sanitize code flow, remove unnecessary scratch vars in
        broxton_set_cdclk() (imre)
      - Remove bound check for maxmimum freq to match current code.
        This check will be added later at a more proper platform
        independent place once atomic support lands.
      - add note to remove freq guard band which isn't needed on BXT
      - add note to reduce freq to minimum if no pipe is enabled
      - combine broxton_modeset_global_pipes() with
        valleyview_modeset_global_pipes()
      
      Signed-off-by: Vandana Kannan <vandana.kannan@intel.com> (v2)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f8437dd1
    • V
      drm/i915: Rename vlv_cdclk_freq to cdclk_freq · 164dfd28
      Vandana Kannan 提交于
      Rename vlv_cdclk_freq to cdclk_freq so that it can be used for all
      platforms as required. Needed by the next patch.
      Signed-off-by: NVandana Kannan <vandana.kannan@intel.com>
      Signed-off-by: NA.Sunil Kamath <sunil.kamath@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      164dfd28
  2. 15 4月, 2015 4 次提交
    • R
      drm/i915: PSR VLV: Add single frame update. · c7240c3b
      Rodrigo Vivi 提交于
      According to spec: "In PSR HW or SW mode, SW set this bit before writing
      registers for a flip. It will be self-clear when it gets to the PSR
      active state."
      
      Some versions of spec mention that this is needed when in
      "Persistent mode" but define it as same as "SW mode". Since this
      fix the page flip case let's assume this is exactly what we need.
      
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c7240c3b
    • R
      drm/i915: PSR: deprecate link_standby support for core platforms. · 89251b17
      Rodrigo Vivi 提交于
      On Haswell and Broadwell with link in standby when exit event happens
      between vblank and VSC packet, PSR exit on panel but DPA transmitter
      still sends black pixel. When this condition hits, panel will intermittently
      display black frame.
      
      The known W/A for this case involve the of single_frame update
      that isn't supported on Haswell and to be supported on Broadwell
      3 other workarounds would be required. So it is better and safe to
      just deprecate link_standby for now.
      
      Also, link fully off saves more power than link_standby and afwk
      no OEM is requesting link standby on VBT. There is no reason for that.
      
      For Skylake let's just consider it behaves like Broadwell until
      we prove otherwise.
      
      v2: Fix commit message (Durga).
      
      v3: Fix conflict with PSR2.
      
      Reference: HSD: bdwgfx/1912559
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      89251b17
    • R
      drm/i915: PSR: Fix DP_PSR_NO_TRAIN_ON_EXIT logic · 3301d409
      Rodrigo Vivi 提交于
      Since the beginning there is a missunderstanding on the meaning of this
      dpcd bit.
      This bit shouldn't indicate whether to use link standby or not, but just
      be used to configure TP1, TP2 and TP3 times and tell hw aux should be skiped
      since HW is the responsible one.
      
      Even with help of frontbuffer tracking, HW is still fully responsible for
      PSR exit logic with/without DP training.
      
      DP_PSR_NO_TRAIN_ON_EXIT means the source doesn't need to do the training, but
      it doesn't tell to avoid TP patterns, so we will send minimal TP1 and avoid
      TP2. It also means that sink itself can take up to 5 idle frames for training.
      6 in our case since we might be off by 1. So we also increment idle_frames by 4
      here.
      
      v2: Fix and improve commit message (Durga).
      v3: Use minimal TP1 time avoiding TP2 and increase idle frame.
      
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Cc: Arthur Runyan <arthur.j.runyan@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3301d409
    • R
      drm/i915: PSR: Remove wrong LINK_DISABLE. · cff5190c
      Rodrigo Vivi 提交于
      This wrong logic and useless define came from first versions and
      came along with all rework. Just now I notice how ugly, wrong and
      useless this is.
      
      val is already defined as 0 anyway and logic is completelly wrong
      and useless. So let's starting the link_standby fix with this
      cleaning.
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cff5190c
  3. 14 4月, 2015 16 次提交
  4. 13 4月, 2015 15 次提交
  5. 10 4月, 2015 2 次提交