1. 06 2月, 2020 2 次提交
  2. 04 2月, 2020 1 次提交
    • C
      drm/i915/display: Defer application of initial chv_phy_control · 1a2466fe
      Chris Wilson 提交于
      To write to the DISPLAY_PHY_CONTROL requires holding the powerwells,
      which during early resume we have not yet acquired until later in
      intel_display_power_init_hw(). So compute the initial chv_phy_control,
      but leave the HW unset until we first acquire the powerwell.
      
      <7> [120.055984] i915 0000:00:02.0: [drm:intel_power_domains_init_hw [i915]] rawclk rate: 200000 kHz
      <4> [120.056381] ------------[ cut here ]------------
      <4> [120.056621] i915 0000:00:02.0: Unclaimed write to register 0x1e0100
      <4> [120.056924] WARNING: CPU: 1 PID: 164 at drivers/gpu/drm/i915/intel_uncore.c:1166 __unclaimed_reg_debug+0x69/0x80 [i915]
      <4> [120.056935] Modules linked in: vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel i915 bluetooth coretemp crct10dif_pclmul crc32_pclmul snd_hda_intel snd_intel_dspcfg snd_hda_codec ghash_clmulni_intel snd_hwdep ecdh_generic ecc snd_hda_core r8169 snd_pcm lpc_ich realtek pinctrl_cherryview i2c_designware_pci prime_numbers
      <4> [120.057027] CPU: 1 PID: 164 Comm: kworker/u4:3 Tainted: G     U            5.5.0-CI-CI_DRM_7854+ #1
      <4> [120.057038] Hardware name:  /NUC5CPYB, BIOS PYBSWCEL.86A.0055.2016.0812.1130 08/12/2016
      <4> [120.057058] Workqueue: events_unbound async_run_entry_fn
      <4> [120.057275] RIP: 0010:__unclaimed_reg_debug+0x69/0x80 [i915]
      <4> [120.057289] Code: 48 8b 78 18 48 8b 5f 50 48 85 db 74 2d e8 1f a0 3f e1 45 89 e8 48 89 e9 48 89 da 48 89 c6 48 c7 c7 00 8c 48 a0 e8 67 82 df e0 <0f> 0b 83 2d ce e2 2b 00 01 5b 5d 41 5c 41 5d c3 48 8b 1f eb ce 66
      <4> [120.057301] RSP: 0018:ffffc90000bcfd08 EFLAGS: 00010082
      <4> [120.057315] RAX: 0000000000000000 RBX: ffff888079919b60 RCX: 0000000000000003
      <4> [120.057326] RDX: 0000000080000003 RSI: 0000000000000000 RDI: 00000000ffffffff
      <4> [120.057336] RBP: ffffffffa04c9f4e R08: 0000000000000000 R09: 0000000000000001
      <4> [120.057348] R10: 0000000025c3d560 R11: 000000006815f798 R12: 0000000000000000
      <4> [120.057359] R13: 00000000001e0100 R14: 0000000000000286 R15: ffffffff8234a76b
      <4> [120.057371] FS:  0000000000000000(0000) GS:ffff888074b00000(0000) knlGS:0000000000000000
      <4> [120.057382] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4> [120.057393] CR2: 000055f4197df0d8 CR3: 000000006f326000 CR4: 00000000001006e0
      <4> [120.057404] Call Trace:
      <4> [120.057635]  fwtable_write32+0x114/0x1d0 [i915]
      <4> [120.057892]  intel_power_domains_init_hw+0x4ff/0x650 [i915]
      <4> [120.058150]  intel_power_domains_resume+0x3d/0x70 [i915]
      <4> [120.058363]  i915_drm_resume_early+0x97/0xd0 [i915]
      <4> [120.058575]  ? i915_resume_switcheroo+0x30/0x30 [i915]
      <4> [120.058594]  dpm_run_callback+0x64/0x280
      <4> [120.058626]  device_resume_early+0xa7/0xe0
      <4> [120.058652]  async_resume_early+0x14/0x40
      
      v2: Write our expected value of DISPLAY_PHY_CONTROL during sync_hw, so
      that it should always match the driver state after resume.
      
      Closes: https://gitlab.freedesktop.org/drm/intel/issues/1089Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200203145016.216692-1-chris@chris-wilson.co.uk
      1a2466fe
  3. 31 1月, 2020 2 次提交
  4. 29 1月, 2020 1 次提交
  5. 25 1月, 2020 1 次提交
    • W
      drm/i915/power: convert to struct drm_device macros in display/intel_display_power.c · 569caa65
      Wambui Karuga 提交于
      Converts various instances of the printk based logging macros in
      i915/display/intel_display_power.c to the struct drm_device based
      logging macros using the following coccinelle script:
      @rule1@
      identifier fn, T;
      @@
      
      fn(...,struct drm_i915_private *T,...) {
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      |
      -DRM_DEBUG_ATOMIC(
      +drm_dbg_atomic(&T->drm,
      ...)
      )
      ...+>
      }
      
      @rule2@
      identifier fn, T;
      @@
      
      fn(...) {
      ...
      struct drm_i915_private *T = ...;
      <+...
      (
      -DRM_INFO(
      +drm_info(&T->drm,
      ...)
      |
      -DRM_ERROR(
      +drm_err(&T->drm,
      ...)
      |
      -DRM_WARN(
      +drm_warn(&T->drm,
      ...)
      |
      -DRM_DEBUG(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_KMS(
      +drm_dbg_kms(&T->drm,
      ...)
      |
      -DRM_DEBUG_DRIVER(
      +drm_dbg(&T->drm,
      ...)
      |
      -DRM_DEBUG_ATOMIC(
      +drm_dbg_atomic(&T->drm,
      ...)
      )
      ...+>
      }
      
      Checkpatch warnings were fixed manually.
      Signed-off-by: NWambui Karuga <wambui.karugax@gmail.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200122110844.2022-4-wambui.karugax@gmail.com
      569caa65
  6. 14 1月, 2020 1 次提交
  7. 14 12月, 2019 3 次提交
  8. 11 12月, 2019 1 次提交
    • M
      drm/i915/tgl: Program BW_BUDDY registers during display init · 3fa01d64
      Matt Roper 提交于
      Gen12 can improve bandwidth efficiency by pairing up memory requests
      with similar addresses.  We need to program the BW_BUDDY1 and BW_BUDDY2
      registers according to the memory configuration during display
      initialization to take advantage of this capability.
      
      The magic numbers we program here feel like something that could
      definitely change on future platforms, so let's use a table-based
      programming scheme to make this easy to extend in the future.
      
      v2:
       - Add separate table for Wa_1409767108.  (Stan)
       - Reorder structure reduce size by a word.  Page mask can still be up
         to 28 bits (even though current values are small) so we should keep
         it as a u32, but just using a u8 for DRAM type instead of the actual
         enum type saves space.  (Lucas, Ville)
       - Rename function to tgl_bw_buddy_init() to be more precise about what
         it does.  (Lucas)
      
      Bspec: 49189
      Bspec: 49218
      Bspec: 52890
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191205224848.76712-1-matthew.d.roper@intel.comReviewed-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      3fa01d64
  9. 13 11月, 2019 1 次提交
  10. 05 11月, 2019 1 次提交
  11. 30 10月, 2019 1 次提交
    • M
      drm/i915/tgl: Add AUX B & C to DC_OFF_POWER_DOMAINS · 6a355252
      Matt Roper 提交于
      Our TGL CI platforms are running into cases where aux transactions have
      failed to complete or declare a timeout well after the timeout limit
      that the hardware is supposed to enforce.  From the logs it appears that
      these failures arise when aux transactions happen after we've entered
      DC6:
      
        <7> [622.523650] [drm:skl_enable_dc6 [i915]] Enabling DC6
        <7> [622.523685] [drm:gen9_set_dc_state [i915]] Setting DC state from 00 to 02
        ...
        <3> [622.535753] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout!
        <3> [622.547745] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout!
        <3> [622.559746] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout!
        <3> [622.571744] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout!
        <3> [622.583743] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp aux hw did not signal timeout!
        <3> [622.583780] [drm:intel_dp_aux_xfer [i915]] *ERROR* dp_aux_ch not done status 0xad400bff
        <7> [622.863725] [drm:drm_dp_dpcd_access] Too many retries, giving up. First error: -110
      
      On TGL AUX B & C are in PG1 (managed by the DMC firmware) rather
      than PG3 as they were on ICL, so allowing DC6 means the DMC firmware
      might shut off the power wells behind our backs when we're trying to use
      them.
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191025230623.27829-6-matthew.d.roper@intel.comReviewed-by: NImre Deak <imre.deak@intel.com>
      6a355252
  12. 08 10月, 2019 3 次提交
    • A
      drm/i915/tgl: Switch between dc3co and dc5 based on display idleness · 1c4d821d
      Anshuman Gupta 提交于
      DC3CO is useful power state, when DMC detects PSR2 idle frame
      while an active video playback, playing 30fps video on 60hz panel
      is the classic example of this use case.
      
      B.Specs:49196 has a restriction to enable DC3CO only for Video Playback.
      It will be worthy to enable DC3CO after completion of each pageflip
      and switch back to DC5 when display is idle because driver doesn't
      differentiate between video playback and a normal pageflip.
      We will use Frontbuffer flush call tgl_dc3co_flush() to enable DC3CO
      state only for ORIGIN_FLIP flush call, because DC3CO state has primarily
      targeted for VPB use case. We are not interested here for frontbuffer
      invalidates calls because that triggers PSR2 exit, which will
      explicitly disable DC3CO.
      
      DC5 and DC6 saves more power, but can't be entered during video
      playback because there are not enough idle frames in a row to meet
      most PSR2 panel deep sleep entry requirement typically 4 frames.
      As PSR2 existing implementation is using minimum 6 idle frames for
      deep sleep, it is safer to enable DC5/6 after 6 idle frames
      (By scheduling a delayed work of 6 idle frames, once DC3CO has been
      enabled after a pageflip).
      
      After manually waiting for 6 idle frames DC5/6 will be enabled and
      PSR2 deep sleep idle frames will be restored to 6 idle frames, at this
      point DMC will triggers DC5/6 once PSR2 enters to deep sleep after
      6 idle frames.
      In future when we will enable S/W PSR2 tracking, we can change the
      PSR2 required deep sleep idle frames to 1 so DMC can trigger the
      DC5/6 immediately after S/W manual waiting of 6 idle frames get
      complete.
      
      v2: calculated s/w state to switch over dc3co when there is an
          update. [Imre]
          Used cancel_delayed_work_sync() in order to avoid any race
          with already scheduled delayed work. [Imre]
      v3: Cancel_delayed_work_sync() may blocked the commit work.
          hence dropping it, dc5_idle_thread() checks the valid wakeref before
          putting the reference count, which avoids any chances of dropping
          a zero wakeref. [Imre (IRC)]
      v4: Used frontbuffer flush mechanism. [Imre]
      v5: Used psr.pipe to extract frontbuffer busy bits. [Imre]
          Used cancel_delayed_work_sync() in encoder disable path. [Imre]
          Used mod_delayed_work() instead of cancelling and scheduling a
          delayed work. [Imre]
          Used psr.lock in tgl_dc5_idle_thread() to enable psr2 deep
          sleep. [Imre]
          Removed DC5_REQ_IDLE_FRAMES macro. [Imre]
      v6: Used dc3co_exitline check instead of TGL and dc3co allowed_dc_mask
          checks, used delayed_work_pending with the psr lock and removed the
          psr2_deep_slp_disabled flag. [Imre]
      v7: Code refactoring, moved most of functional code to inte_psr.c [Imre]
          Using frontbuffer_bits on psr.pipe check instead of
          busy_frontbuffer_bits. [Imre]
          Calculating dc3co_exit_delay in intel_psr_enable_locked. [Imre]
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Animesh Manna <animesh.manna@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NAnshuman Gupta <anshuman.gupta@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191003081738.22101-6-anshuman.gupta@intel.com
      1c4d821d
    • A
      drm/i915/tgl: Enable DC3CO state in "DC Off" power well · 4645e906
      Anshuman Gupta 提交于
      Add target_dc_state and used by set_target_dc_state API
      in order to enable DC3CO state with existing DC states.
      target_dc_state will enable/disable the desired DC state in
      DC_STATE_EN reg when "DC Off" power well gets disable/enable.
      
      v2: commit log improvement.
      v3: Used intel_wait_for_register to wait for DC3CO exit. [Imre]
          Used gen9_set_dc_state() to allow/disallow DC3CO. [Imre]
          Moved transcoder psr2 exit line enablement from tgl_allow_dc3co()
          to a appropriate place haswell_crtc_enable(). [Imre]
          Changed the DC3CO power well enabled call back logic as
          recommended in review comments. [Imre]
      v4: Used wait_for_us() instead of intel_wait_for_reg(). [Imre (IRC)]
      v5: using udelay() instead of waiting for DC3CO exit status.
      v6: Fixed minor unwanted change.
      v7: Removed DC3CO powerwell and POWER_DOMAIN_VIDEO.
      v8: Uniform checks by using only target_dc_state instead of allowed_dc_mask
          in "DC off" power well callback. [Imre]
          Adding "DC off" power well id to older platforms. [Imre]
          Removed psr2_deep_sleep flag from tgl_set_target_dc_state. [Imre]
      v9: Used switch case for target DC state in
          gen9_dc_off_power_well_disable(), checking DC3CO state against
          allowed DC mask, using WARN_ON() in
          tgl_set_target_dc_state(). [Imre]
      v10: Code refactoring and using sanitize_target_dc_state(). [Imre]
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Animesh Manna <animesh.manna@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NAnshuman Gupta <anshuman.gupta@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191003081738.22101-4-anshuman.gupta@intel.com
      4645e906
    • A
      drm/i915/tgl: Add DC3CO mask to allowed_dc_mask and gen9_dc_mask · 19c79ff8
      Anshuman Gupta 提交于
      Enable dc3co state in enable_dc module param and add dc3co
      enable mask to allowed_dc_mask and gen9_dc_mask.
      
      v1: Adding enable_dc=3,4 options to enable DC3CO with DC5 and DC6
          independently. [Animesh]
      v2: Using a switch statement for cleaner code. [Animesh]
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Animesh Manna <animesh.manna@intel.com>
      Reviewed-by: NAnimesh Manna <animesh.manna@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Signed-off-by: NAnshuman Gupta <anshuman.gupta@intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20191003081738.22101-3-anshuman.gupta@intel.com
      19c79ff8
  13. 06 10月, 2019 1 次提交
  14. 02 10月, 2019 1 次提交
  15. 24 9月, 2019 1 次提交
  16. 29 8月, 2019 1 次提交
    • I
      drm/i915: Align power domain names with port names · 8a84bacb
      Imre Deak 提交于
      There is a difference in BSpec's and the driver's designation of DDI
      ports. BSpec uses the following names:
      - before GEN11:
        BSpec/driver:
        	port A/B/C/D etc
      - GEN11:
        BSpec/driver:
      	port A-F
      - GEN12:
        BSpec:
        	port A/B/C for combo PHY ports
      	port TC1-6 for Type C PHY ports
        driver:
      	port A-I.
        The driver's port D name matches BSpec's TC1 port name.
      
      So far power domains were named according to the BSpec designation, to
      make it easier to match the code against the specification. That however
      can be confusing when a power domain needs to be matched to a port on
      GEN12+. To resolve that use the driver's port A-I designation for power
      domain names too and rename the corresponding power wells so that they
      reflect the mapping from the driver's to BSpec's port name.
      
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190823100711.27833-1-imre.deak@intel.com
      8a84bacb
  17. 21 8月, 2019 1 次提交
  18. 20 8月, 2019 1 次提交
  19. 17 8月, 2019 2 次提交
  20. 12 8月, 2019 2 次提交
  21. 07 8月, 2019 2 次提交
  22. 29 7月, 2019 1 次提交
  23. 27 7月, 2019 1 次提交
  24. 12 7月, 2019 5 次提交
  25. 11 7月, 2019 2 次提交
  26. 05 7月, 2019 1 次提交
    • V
      drm/i915/ehl: Add support for DPLL4 (v10) · eef037ea
      Vivek Kasireddy 提交于
      This patch adds support for DPLL4 on EHL that include the
      following restrictions:
      
      - DPLL4 cannot be used with DDIA (combo port A internal eDP usage).
        DPLL4 can be used with other DDIs, including DDID
        (combo port A external usage).
      
      - DPLL4 cannot be enabled when DC5 or DC6 are enabled.
      
      - The DPLL4 enable, lock, power enabled, and power state are connected
        to the MGPLL1_ENABLE register.
      
      v2: (suggestions from Bob Paauwe)
      - Rework ehl_get_dpll() function to call intel_find_shared_dpll() and
        iterate twice: once for Combo plls and once for MG plls.
      
      - Use MG pll funcs for DPLL4 instead of creating new ones and modify
        mg_pll_enable to include the restrictions for EHL.
      
      v3: Fix compilation error
      
      v4: (suggestions from Lucas and Ville)
      - Treat DPLL4 as a combo phy PLL and not as MG PLL
      - Disable DC states when this DPLL is being enabled
      - Reuse icl_get_dpll instead of creating a separate one for EHL
      
      v5: (suggestion from Ville)
      - Refcount the DC OFF power domains during the enabling and disabling
        of this DPLL.
      
      v6: rebase
      
      v7: (suggestion from Imre)
      - Add a new power domain instead of iterating over the domains
        assoicated with DC OFF power well.
      
      v8: (Ville and Imre)
      - Rename POWER_DOMAIN_DPLL4 TO POWER_DOMAIN_DPLL_DC_OFF
      - Grab a reference in intel_modeset_setup_hw_state() if this
        DPLL was already enabled perhaps by BIOS.
      - Check for the port type instead of the encoder
      
      v9: (Ville)
      - Move the block of code that grabs a reference to the power domain
        POWER_DOMAIN_DPLL_DC_OFF to intel_modeset_readout_hw_state() to ensure
        that there is a reference present before this DPLL might get disabled.
      
      v10: rebase
      
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Signed-off-by: NVivek Kasireddy <vivek.kasireddy@intel.com>
      Reviewed-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190703230353.24059-1-vivek.kasireddy@intel.com
      eef037ea