1. 01 12月, 2017 2 次提交
  2. 30 11月, 2017 2 次提交
  3. 28 11月, 2017 1 次提交
    • C
      drm/i915: Enable hotplug polling after registering the outputs · 448aa911
      Chris Wilson 提交于
      Previously we would enable hotplug polling on the outputs immediately
      upon construction. This would allow a very early hotplug event to
      trigger before we had finishing setting up the driver to handle it.
      Instead, move the output polling to the last step of registration, after
      we have set up all handlers, including the fbdev configuration.
      
      v2: Symmetrically turnoff the hotplug helper in unregister after the
      fbdev is first synchronised then finalized. This stops a late hotplug
      event being processed after the interrupts are disabled.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #v1
      Link: https://patchwork.freedesktop.org/patch/msgid/20171128110147.28654-1-chris@chris-wilson.co.uk
      448aa911
  4. 23 11月, 2017 1 次提交
  5. 22 11月, 2017 9 次提交
  6. 17 11月, 2017 2 次提交
  7. 16 11月, 2017 1 次提交
  8. 15 11月, 2017 1 次提交
  9. 14 11月, 2017 1 次提交
  10. 13 11月, 2017 3 次提交
  11. 11 11月, 2017 4 次提交
  12. 10 11月, 2017 1 次提交
    • V
      drm/i915: Nuke intel_digital_port->port · 8f4f2797
      Ville Syrjälä 提交于
      Remove intel_digital_port->port and replace its users with
      intel_encoder->port. intel_encoder->port is a superset of
      intel_digital_port->port, and it works correctly even for
      MST encoders.
      
      v2: Eliminate a few dp_to_dig_port()->base.port cases too (DK)
      
      Performed with cocci:
      @@
      @@
      struct intel_digital_port {
             ...
      -       enum port port;
             ...
      }
      
      @@
      struct intel_digital_port *D;
      expression E;
      @@
      - D->port = E;
      
      @@
      struct intel_digital_port *D;
      @@
      - D->port
      + D->base.port
      
      @
      expression E;
      @@
      (
      - dp_to_dig_port(E)->port
      + dp_to_dig_port(E)->base.port
      |
      - enc_to_dig_port(E)->port
      + to_intel_encoder(E)->port
      )
      
      @@
      expression E;
      @@
      - to_intel_encoder(&E->base)
      + E
      
      @@
      struct intel_digital_port *D;
      identifier I, M;
      @@
        I = &D->base
      <...
      (
      - D->base.M
      + I->M
      |
      - &D->base
      + I
      )
      ...>
      
      @@
      identifier D;
      expression E;
      identifier M;
      @@
       D = enc_to_dig_port(&E->base)
      <...
      (
      - D->base.M
      + E->M
      |
      - &D->base
      + E
      )
      ...>
      
      @@
      identifier D, DP;
      expression E;
      identifier M;
      @@
       DP = enc_to_intel_dp(&E->base)
      <...
      (
      - dp_to_dig_port(DP)->base.M
      + E->M
      |
      - &dp_to_dig_port(DP)->base
      + E
      )
      ...>
      
      @@
      expression E;
      identifier M;
      @@
      (
      - enc_to_dig_port(&E->base)->base.M
      + E->M
      |
      - enc_to_dig_port(&E->base)->base
      + E
      |
      - enc_to_mst(&E->base)->primary->base.port
      + E->port
      )
      
      @@
      expression E;
      identifier D;
      @@
      - struct intel_digital_port *D = E;
      ... when != D
      
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Reviewed-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171109152434.32074-1-ville.syrjala@linux.intel.com
      8f4f2797
  13. 09 11月, 2017 2 次提交
  14. 08 11月, 2017 1 次提交
    • C
      drm/i915: Read ilk FDI PLL frequency once during initialisation · 58ecd9d5
      Chris Wilson 提交于
      During intel_atomic_check(), we do not take the intel_runtime_pm_get()
      wakeref and so should do the atomic modeset precalculations without
      referring to the HW. However, on Ironlake we see
      
      <7>[   23.487557] [drm:intel_atomic_check [i915]] [CONNECTOR:47:VGA-1] checking for sink bpp constrains
      <7>[   23.487615] [drm:intel_atomic_check [i915]] clamping display bpp (was 36) to default limit of 24
      <4>[   23.487621] RPM wakelock ref not held during HW access
      <4>[   23.487652] ------------[ cut here ]------------
      <4>[   23.487697] WARNING: CPU: 0 PID: 1343 at drivers/gpu/drm/i915/intel_drv.h:1813 gen5_read32+0x183/0x200 [i915]
      <4>[   23.487701] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic i915 intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul snd_hda_intel ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm lpc_ich e1000e mei_me ptp mei pps_core prime_numbers
      <4>[   23.487784] CPU: 0 PID: 1343 Comm: debugfs_test Tainted: G        W       4.14.0-rc7-CI-Trybot_1378+ #1
      <4>[   23.487788] Hardware name: Hewlett-Packard HP Compaq 8100 Elite SFF PC/304Ah, BIOS 786H1 v01.13 07/14/2011
      <4>[   23.487793] task: ffff8801f90aa6c0 task.stack: ffffc900013ec000
      <4>[   23.487838] RIP: 0010:gen5_read32+0x183/0x200 [i915]
      <4>[   23.487842] RSP: 0018:ffffc900013efb58 EFLAGS: 00010292
      <4>[   23.487849] RAX: 000000000000002a RBX: ffff880205c00000 RCX: 0000000000000006
      <4>[   23.487854] RDX: 000000000000140a RSI: ffffffff81d0eb14 RDI: ffffffff81cc26f6
      <4>[   23.487857] RBP: ffffc900013efb80 R08: ffff8801f90aaff8 R09: 0000000000000000
      <4>[   23.487861] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001
      <4>[   23.487865] R13: 0000000000046000 R14: ffff88020ffaba78 R15: ffff88020b109bf8
      <4>[   23.487870] FS:  00007f53b5e40a40(0000) GS:ffff88021bc00000(0000) knlGS:0000000000000000
      <4>[   23.487874] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4>[   23.487878] CR2: 000055e41900c0e8 CR3: 00000001fa0d6005 CR4: 00000000000206f0
      <4>[   23.487882] Call Trace:
      <4>[   23.487931]  intel_atomic_check+0x745/0x1290 [i915]
      <4>[   23.487948]  drm_atomic_check_only+0x459/0x560
      <4>[   23.487956]  ? drm_atomic_set_crtc_for_connector+0xc9/0x100
      <4>[   23.488025]  drm_atomic_commit+0x18/0x50
      <4>[   23.488035]  restore_fbdev_mode_atomic+0x190/0x1f0
      <4>[   23.488059]  restore_fbdev_mode+0x32/0x120
      <4>[   23.488072]  drm_fb_helper_restore_fbdev_mode_unlocked+0x50/0xa0
      <4>[   23.488139]  intel_fbdev_restore_mode+0x34/0x90 [i915]
      <4>[   23.488194]  i915_driver_lastclose+0xe/0x10 [i915]
      <4>[   23.488208]  drm_lastclose+0x39/0xf0
      <4>[   23.488219]  drm_release+0x30c/0x3c0
      <4>[   23.488236]  __fput+0xb9/0x200
      <4>[   23.488252]  ____fput+0xe/0x10
      <4>[   23.488264]  task_work_run+0x89/0xc0
      <4>[   23.488278]  exit_to_usermode_loop+0x83/0x90
      <4>[   23.488290]  syscall_return_slowpath+0xd0/0x110
      <4>[   23.488304]  entry_SYSCALL_64_fastpath+0xaf/0xb1
      <4>[   23.488312] RIP: 0033:0x7f53b4317560
      <4>[   23.488320] RSP: 002b:00007ffca7e70748 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
      <4>[   23.488333] RAX: 0000000000000000 RBX: 0000000000000001 RCX: 00007f53b4317560
      <4>[   23.488340] RDX: 0000000000000005 RSI: 00007ffca7e70640 RDI: 0000000000000004
      <4>[   23.488347] RBP: 000055e417783900 R08: 000055e418f9e290 R09: 0000000000000000
      <4>[   23.488356] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
      <4>[   23.488363] R13: 00007f53b4302c40 R14: 0000000000000000 R15: 0000000000000000
      <4>[   23.488384] Code: b5 f2 f2 e0 0f ff e9 c5 fe ff ff 80 3d 0e 4b 10 00 00 0f 85 c6 fe ff ff 48 c7 c7 30 73 29 a0 c6 05 fa 4a 10 00 01 e8 8e f2 f2 e0 <0f> ff e9 ac fe ff ff e8 51 9d f3 e0 85 c0 0f 85 01 ff ff ff 48
      <4>[   23.488780] ---[ end trace 6bc72ce7f1596190 ]---
      <7>[   23.488844] [drm:intel_atomic_check [i915]] checking fdi config on pipe A, lanes 1
      <7>[   23.488911] [drm:intel_atomic_check [i915]] hw max bpp: 36, pipe bpp: 24, dithering: 0
      
      due to intel_fdi_link_freq() poking at FDI_PLL_BIOS_0. Avoid this by
      recording the fdi pll frequency during device initiailisation.
      
      v2: Also extract the static FDI PLL frequencies for Sandybridge and
      Ivybridge.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171107214713.18704-1-chris@chris-wilson.co.ukReviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      58ecd9d5
  15. 31 10月, 2017 2 次提交
  16. 27 10月, 2017 1 次提交
    • M
      drm/i915: Cancel the modeset retry work during modeset cleanup · 886c6b86
      Manasi Navare 提交于
      During modeset cleanup on driver unload we may have a pending
      hotplug work. This needs to be canceled early during the teardown
      so that it does not fire after we have freed the connector.
      We do this after drm_kms_helper_poll_fini(dev) since this might
      trigger modeset retry work due to link retrain and before
      intel_fbdev_fini() since this work requires the lock from fbdev.
      
      If this is not done we may see something like:
      DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock))
       ------------[ cut here ]------------
       WARNING: CPU: 4 PID: 5010 at kernel/locking/mutex-debug.c:103 mutex_destroy+0x4e/0x60
       Modules linked in: i915(-) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem ax88179_178
      +a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e ptp pps_core prime_numbers i2c_hid
      +[last unloaded: snd_hda_intel]
       CPU: 4 PID: 5010 Comm: drv_module_relo Tainted: G     U          4.14.0-rc3-CI-CI_DRM_3186+ #1
       Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWX1.R00.X104.A03.1709140524 09/14/2017
       task: ffff8803c827aa40 task.stack: ffffc90000520000
       RIP: 0010:mutex_destroy+0x4e/0x60
       RSP: 0018:ffffc90000523d58 EFLAGS: 00010292
       RAX: 000000000000002a RBX: ffff88044fbef648 RCX: 0000000000000000
       RDX: 0000000080000001 RSI: 0000000000000001 RDI: ffffffff810f0cf0
       RBP: ffffc90000523d60 R08: 0000000000000001 R09: 0000000000000001
       R10: 000000000f21cb81 R11: 0000000000000000 R12: ffff88044f71efc8
       R13: ffffffffa02b3d20 R14: ffffffffa02b3d90 R15: ffff880459b29308
       FS:  00007f5df4d6e8c0(0000) GS:ffff88045d300000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 000055ec51f00a18 CR3: 0000000451782006 CR4: 00000000003606e0
       DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
       DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
       Call Trace:
        drm_fb_helper_fini+0xd9/0x130
        intel_fbdev_destroy+0x12/0x60 [i915]
        intel_fbdev_fini+0x28/0x30 [i915]
        intel_modeset_cleanup+0x45/0xa0 [i915]
        i915_driver_unload+0x92/0x180 [i915]
        i915_pci_remove+0x19/0x30 [i915]
        i915_driver_unload+0x92/0x180 [i915]
        i915_pci_remove+0x19/0x30 [i915]
        pci_device_remove+0x39/0xb0
        device_release_driver_internal+0x15d/0x220
        driver_detach+0x40/0x80
        bus_remove_driver+0x58/0xd0
        driver_unregister+0x2c/0x40
        pci_unregister_driver+0x36/0xb0
        i915_exit+0x1a/0x8b [i915]
        SyS_delete_module+0x18c/0x1e0
        entry_SYSCALL_64_fastpath+0x1c/0xb1
       RIP: 0033:0x7f5df3286287
       RSP: 002b:00007fff8e107cc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0
       RAX: ffffffffffffffda RBX: ffffffff81493a03 RCX: 00007f5df3286287
       RDX: 0000000000000001 RSI: 0000000000000800 RDI: 0000564c7be02e48
       RBP: ffffc90000523f88 R08: 0000000000000000 R09: 0000000000000080
       R10: 00007f5df4d6e8c0 R11: 0000000000000246 R12: 0000000000000000
       R13: 00007fff8e107eb0 R14: 0000000000000000 R15: 0000000000000000
      Or a GPF like:
      
       general protection fault: 0000 [#1] PREEMPT SMP
       Modules linked in: i915(-) snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core snd_pcm vgem ax88179_178
      +a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel e1000e ptp pps_core prime_numbers i2c_hid
      +[last unloaded: snd_hda_intel]
       CPU: 0 PID: 82 Comm: kworker/0:1 Tainted: G     U  W       4.14.0-rc3-CI-CI_DRM_3186+ #1
       Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWX1.R00.X104.A03.1709140524 09/14/2017
       Workqueue: events intel_dp_modeset_retry_work_fn [i915]
       task: ffff88045a5caa40 task.stack: ffffc90000378000
       RIP: 0010:drm_setup_crtcs+0x143/0xbf0
       RSP: 0018:ffffc9000037bd20 EFLAGS: 00010202
       RAX: 6b6b6b6b6b6b6b6b RBX: 0000000000000002 RCX: 0000000000000001
       RDX: 0000000000000001 RSI: 0000000000000780 RDI: 00000000ffffffff
       RBP: ffffc9000037bdb8 R08: 0000000000000001 R09: 0000000000000001
       R10: 0000000000000780 R11: 0000000000000000 R12: 0000000000000002
       R13: ffff88044fbef4e8 R14: 0000000000000780 R15: 0000000000000438
       FS:  0000000000000000(0000) GS:ffff88045d200000(0000) knlGS:0000000000000000
       CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
       CR2: 000055ec51ee5168 CR3: 000000044c89d003 CR4: 00000000003606f0
       Call Trace:
        drm_fb_helper_hotplug_event.part.18+0x7e/0xc0
        drm_fb_helper_hotplug_event+0x1a/0x20
        intel_fbdev_output_poll_changed+0x1a/0x20 [i915]
        drm_kms_helper_hotplug_event+0x27/0x30
        intel_dp_modeset_retry_work_fn+0x77/0x80 [i915]
        process_one_work+0x233/0x660
        worker_thread+0x206/0x3b0
        kthread+0x152/0x190
        ? process_one_work+0x660/0x660
        ? kthread_create_on_node+0x40/0x40
        ret_from_fork+0x27/0x40
       Code: 06 00 00 45 8b 45 20 31 db 45 31 e4 45 85 c0 0f 8e 91 06 00 00 44 8b 75 94 44 8b 7d 90 49 8b 45 28 49 63 d4 44 89 f6 41 83 c4 01 <48> 8b 04 d0 44
      +89 fa 48 8b 38 48 8b 87 a8 01 00 00 ff 50 20 01
       RIP: drm_setup_crtcs+0x143/0xbf0 RSP: ffffc9000037bd20
       ---[ end trace 08901ff1a77d30c7 ]---
      
      v2:
      * Rename it to intel_hpd_poll_fini() and call drm_kms_helper_fini() inside it
      as the first step before cancel work (Chris Wilson)
      * Add GPF trace in commit message and make the function static (Maarten Lankhorst)
      Suggested-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Suggested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Fixes: 9301397a ("drm/i915: Implement Link Rate fallback on Link training failure")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Tony Cheng <tony.cheng@amd.com>
      Cc: Harry Wentland <Harry.wentland@amd.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
      Cc: Manasi Navare <manasi.d.navare@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NManasi Navare <manasi.d.navare@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1509054720-25325-1-git-send-email-manasi.d.navare@intel.comReviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      886c6b86
  17. 26 10月, 2017 1 次提交
  18. 25 10月, 2017 3 次提交
  19. 19 10月, 2017 1 次提交
  20. 18 10月, 2017 1 次提交