1. 01 11月, 2019 1 次提交
  2. 28 10月, 2019 1 次提交
  3. 25 10月, 2019 1 次提交
  4. 23 10月, 2019 1 次提交
  5. 08 10月, 2019 1 次提交
    • 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
  6. 05 9月, 2019 2 次提交
  7. 29 8月, 2019 1 次提交
  8. 27 8月, 2019 3 次提交
    • J
      drm/i915/tgl: Add maximum resolution supported by PSR2 HW · f7b3c226
      José Roberto de Souza 提交于
      TGL PSR2 HW supports a bigger resolution, so lets add it
      
      BSpec: 50422, 49199
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: NAnshuman Gupta <anshuman.gupta@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-10-lucas.demarchi@intel.com
      f7b3c226
    • J
      drm/i915: Do not read PSR2 register in transcoders without PSR2 · 0f81e645
      José Roberto de Souza 提交于
      This fix unclaimed access warnings:
      
      [  245.525788] ------------[ cut here ]------------
      [  245.525884] Unclaimed read from register 0x62900
      [  245.526154] WARNING: CPU: 0 PID: 1234 at drivers/gpu/drm/i915/intel_uncore.c:1100 __unclaimed_reg_debug+0x40/0x50 [i915]
      [  245.526160] Modules linked in: i915 x86_pkg_temp_thermal ax88179_178a coretemp usbnet crct10dif_pclmul mii crc32_pclmul ghash_clmulni_intel e1000e [last unloaded: i915]
      [  245.526191] CPU: 0 PID: 1234 Comm: kms_fullmodeset Not tainted 5.1.0-rc6+ #915
      [  245.526197] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWR1.D00.2081.A10.1904182155 04/18/2019
      [  245.526273] RIP: 0010:__unclaimed_reg_debug+0x40/0x50 [i915]
      [  245.526281] Code: 74 05 5b 5d 41 5c c3 45 84 e4 48 c7 c0 76 97 21 a0 48 c7 c6 6c 97 21 a0 89 ea 48 0f 44 f0 48 c7 c7 7f 97 21 a0 e8 4f 1e fe e0 <0f> 0b 83 2d 6f d9 1c 00 01 5b 5d 41 5c c3 66 90 41 57 41 56 41 55
      [  245.526288] RSP: 0018:ffffc900006bf7d8 EFLAGS: 00010086
      [  245.526297] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
      [  245.526304] RDX: 0000000000000007 RSI: 0000000000000000 RDI: 00000000ffffffff
      [  245.526310] RBP: 0000000000061900 R08: 0000000000000000 R09: 0000000000000001
      [  245.526317] R10: 0000000000000006 R11: 0000000000000000 R12: 0000000000000001
      [  245.526324] R13: 0000000000000000 R14: ffff8882914f0d58 R15: 0000000000000206
      [  245.526332] FS:  00007fed2a3c39c0(0000) GS:ffff8882a8600000(0000) knlGS:0000000000000000
      [  245.526340] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  245.526347] CR2: 00007fed28dff000 CR3: 00000002a086c006 CR4: 0000000000760ef0
      [  245.526354] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [  245.526361] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [  245.526367] PKRU: 55555554
      [  245.526373] Call Trace:
      [  245.526454]  gen11_fwtable_read32+0x219/0x250 [i915]
      [  245.526576]  intel_psr_activate+0x57/0x400 [i915]
      [  245.526697]  intel_psr_enable_locked+0x367/0x4b0 [i915]
      [  245.526828]  intel_psr_enable+0xa4/0xd0 [i915]
      [  245.526946]  intel_enable_ddi+0x127/0x2f0 [i915]
      [  245.527075]  intel_encoders_enable.isra.79+0x62/0x90 [i915]
      [  245.527202]  haswell_crtc_enable+0x2a2/0x850 [i915]
      [  245.527337]  intel_update_crtc+0x51/0x360 [i915]
      [  245.527466]  skl_update_crtcs+0x26c/0x300 [i915]
      [  245.527603]  intel_atomic_commit_tail+0x3e5/0x13c0 [i915]
      [  245.527757]  intel_atomic_commit+0x24d/0x2d0 [i915]
      [  245.527782]  drm_atomic_helper_set_config+0x7b/0x90
      [  245.527799]  drm_mode_setcrtc+0x1b4/0x6f0
      [  245.527856]  ? drm_mode_getcrtc+0x180/0x180
      [  245.527867]  drm_ioctl_kernel+0xad/0xf0
      [  245.527886]  drm_ioctl+0x2f4/0x3b0
      [  245.527902]  ? drm_mode_getcrtc+0x180/0x180
      [  245.527935]  ? rcu_read_lock_sched_held+0x6f/0x80
      [  245.527956]  do_vfs_ioctl+0xa0/0x6d0
      [  245.527970]  ? __task_pid_nr_ns+0xb6/0x200
      [  245.527991]  ksys_ioctl+0x35/0x70
      [  245.528009]  __x64_sys_ioctl+0x11/0x20
      [  245.528020]  do_syscall_64+0x55/0x180
      [  245.528034]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      [  245.528042] RIP: 0033:0x7fed2cc7c3c7
      [  245.528050] Code: 00 00 90 48 8b 05 c9 3a 0d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 99 3a 0d 00 f7 d8 64 89 01 48
      [  245.528057] RSP: 002b:00007ffe36944378 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      [  245.528067] RAX: ffffffffffffffda RBX: 00007ffe369443b0 RCX: 00007fed2cc7c3c7
      [  245.528074] RDX: 00007ffe369443b0 RSI: 00000000c06864a2 RDI: 0000000000000003
      [  245.528081] RBP: 00007ffe369443b0 R08: 0000000000000000 R09: 0000564c0173ae98
      [  245.528088] R10: 0000564c0173aeb8 R11: 0000000000000246 R12: 00000000c06864a2
      [  245.528095] R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
      [  245.528128] irq event stamp: 140866
      [  245.528138] hardirqs last  enabled at (140865): [<ffffffff819a63dc>] _raw_spin_unlock_irqrestore+0x4c/0x60
      [  245.528148] hardirqs last disabled at (140866): [<ffffffff819a624d>] _raw_spin_lock_irqsave+0xd/0x50
      [  245.528158] softirqs last  enabled at (140860): [<ffffffff81c0038c>] __do_softirq+0x38c/0x499
      [  245.528170] softirqs last disabled at (140853): [<ffffffff810b4a09>] irq_exit+0xa9/0xc0
      [  245.528247] WARNING: CPU: 0 PID: 1234 at drivers/gpu/drm/i915/intel_uncore.c:1100 __unclaimed_reg_debug+0x40/0x50 [i915]
      [  245.528254] ---[ end trace 366069676e98a410 ]---
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-7-lucas.demarchi@intel.com
      0f81e645
    • J
      drm/i915/tgl: Guard and warn if more than one eDP panel is present · 6056517a
      José Roberto de Souza 提交于
      On TGL+ it's possible to have PSR1 enabled in other ports besides DDIA.
      PSR2 is still limited to DDIA. However currently we handle only one
      instance of PSR struct. Lets guard intel_psr_init_dpcd() against
      multiple eDP panels and warn about it.
      
      v2: Reword commit message to be TGL+ only and with the info where
      PSR1/PSR2 are supported (Lucas)
      
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Reviewed-by: NAnshuman Gupta <anshuman.gupta@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-6-lucas.demarchi@intel.com
      6056517a
  9. 23 8月, 2019 3 次提交
  10. 17 8月, 2019 1 次提交
  11. 07 8月, 2019 1 次提交
  12. 19 6月, 2019 1 次提交
  13. 17 6月, 2019 2 次提交
  14. 23 5月, 2019 2 次提交
  15. 09 4月, 2019 3 次提交
  16. 08 4月, 2019 3 次提交
  17. 27 3月, 2019 1 次提交
  18. 20 3月, 2019 1 次提交
  19. 19 3月, 2019 1 次提交
  20. 14 3月, 2019 3 次提交
  21. 09 3月, 2019 7 次提交