1. 10 11月, 2021 1 次提交
  2. 28 7月, 2021 1 次提交
  3. 17 6月, 2021 3 次提交
    • J
      drm/dp_mst: Add missing drm parameters to recently added call to drm_dbg_kms() · 24ff3dc1
      José Roberto de Souza 提交于
      Commit 3769e4c0 ("drm/dp_mst: Avoid to mess up payload table by
      ports in stale topology") added to calls to drm_dbg_kms() but it
      missed the first parameter, the drm device breaking the build.
      
      Fixes: 3769e4c0 ("drm/dp_mst: Avoid to mess up payload table by ports in stale topology")
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: dri-devel@lists.freedesktop.org
      Cc: stable@vger.kernel.org
      Signed-off-by: NJosé Roberto de Souza <jose.souza@intel.com>
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210616194415.36926-1-jose.souza@intel.com
      24ff3dc1
    • W
      drm/dp_mst: Avoid to mess up payload table by ports in stale topology · 3769e4c0
      Wayne Lin 提交于
      [Why]
      After unplug/hotplug hub from the system, userspace might start to
      clear stale payloads gradually. If we call drm_dp_mst_deallocate_vcpi()
      to release stale VCPI of those ports which are not relating to current
      topology, we have chane to wrongly clear active payload table entry for
      current topology.
      
      E.g.
      We have allocated VCPI 1 in current payload table and we call
      drm_dp_mst_deallocate_vcpi() to clean VCPI 1 in stale topology. In
      drm_dp_mst_deallocate_vcpi(), it will call drm_dp_mst_put_payload_id()
      tp put VCPI 1 and which means ID 1 is available again. Thereafter, if we
      want to allocate a new payload stream, it will find ID 1 is available by
      drm_dp_mst_assign_payload_id(). However, ID 1 is being used
      
      [How]
      Check target sink is relating to current topology or not before doing
      any payload table update.
      Searching upward to find the target sink's relevant root branch device.
      If the found root branch device is not the same root of current
      topology, don't update payload table.
      
      Changes since v1:
      * Change debug macro to use drm_dbg_kms() instead
      * Amend the commit message to add Cc tag.
      Signed-off-by: NWayne Lin <Wayne.Lin@amd.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210616035501.3776-3-Wayne.Lin@amd.comReviewed-by: NLyude Paul <lyude@redhat.com>
      3769e4c0
    • W
      drm/dp_mst: Do not set proposed vcpi directly · 35d3e8cb
      Wayne Lin 提交于
      [Why]
      When we receive CSN message to notify one port is disconnected, we will
      implicitly set its corresponding num_slots to 0. Later on, we will
      eventually call drm_dp_update_payload_part1() to arrange down streams.
      
      In drm_dp_update_payload_part1(), we iterate over all proposed_vcpis[]
      to do the update. Not specific to a target sink only. For example, if we
      light up 2 monitors, Monitor_A and Monitor_B, and then we unplug
      Monitor_B. Later on, when we call drm_dp_update_payload_part1() to try
      to update payload for Monitor_A, we'll also implicitly clean payload for
      Monitor_B at the same time. And finally, when we try to call
      drm_dp_update_payload_part1() to clean payload for Monitor_B, we will do
      nothing at this time since payload for Monitor_B has been cleaned up
      previously.
      
      For StarTech 1to3 DP hub, it seems like if we didn't update DPCD payload
      ID table then polling for "ACT Handled"(BIT_1 of DPCD 002C0h) will fail
      and this polling will last for 3 seconds.
      
      Therefore, guess the best way is we don't set the proposed_vcpi[]
      diretly. Let user of these herlper functions to set the proposed_vcpi
      directly.
      
      [How]
      1. Revert commit 7617e962 ("drm/dp_mst: clear time slots for ports
      invalid")
      2. Tackle the issue in previous commit by skipping those trasient
      proposed VCPIs. These stale VCPIs shoulde be explicitly cleared by
      user later on.
      
      Changes since v1:
      * Change debug macro to use drm_dbg_kms() instead
      * Amend the commit message to add Fixed & Cc tags
      Signed-off-by: NWayne Lin <Wayne.Lin@amd.com>
      Fixes: 7617e962 ("drm/dp_mst: clear time slots for ports invalid")
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Thomas Zimmermann <tzimmermann@suse.de>
      Cc: dri-devel@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v5.5+
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210616035501.3776-2-Wayne.Lin@amd.comReviewed-by: NLyude Paul <lyude@redhat.com>
      35d3e8cb
  4. 28 5月, 2021 1 次提交
  5. 30 4月, 2021 1 次提交
  6. 28 4月, 2021 3 次提交
  7. 09 4月, 2021 1 次提交
  8. 27 3月, 2021 1 次提交
  9. 25 2月, 2021 2 次提交
  10. 18 2月, 2021 1 次提交
  11. 10 2月, 2021 1 次提交
  12. 05 2月, 2021 3 次提交
  13. 04 2月, 2021 1 次提交
  14. 02 2月, 2021 1 次提交
  15. 29 1月, 2021 1 次提交
  16. 20 1月, 2021 1 次提交
    • L
      drm/dp: Revert "drm/dp: Introduce EDID-based quirks" · 7c553f8b
      Lyude Paul 提交于
      This reverts commit 0883ce81. Originally
      these quirks were added because of the issues with using the eDP
      backlight interfaces on certain laptop panels, which made it impossible
      to properly probe for DPCD backlight support without having a whitelist
      for panels that we know have working VESA backlight control interfaces
      over DPCD. As well, it should be noted it was impossible to use the
      normal sink OUI for recognizing these panels as none of them actually
      filled out their OUIs, hence needing to resort to checking EDIDs.
      
      At the time we weren't really sure why certain panels had issues with
      DPCD backlight controls, but we eventually figured out that there was a
      second interface that these problematic laptop panels actually did work
      with and advertise properly: Intel's proprietary backlight interface for
      HDR panels. So far the testing we've done hasn't brought any panels to
      light that advertise this interface and don't support it properly, which
      means we finally have a real solution to this problem.
      
      As a result, we now have no need for the force DPCD backlight quirk, and
      furthermore this also removes the need for any kind of EDID quirk
      checking in DRM. So, let's just revert it for now since we were the only
      driver using this.
      
      v3:
      * Rebase
      v2:
      * Fix indenting error picked up by checkpatch in
        intel_edp_init_connector()
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Cc: thaytan@noraisin.net
      Cc: Vasily Khoruzhick <anarsoul@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210114221709.2261452-6-lyude@redhat.com
      7c553f8b
  17. 12 1月, 2021 1 次提交
  18. 18 11月, 2020 1 次提交
  19. 11 11月, 2020 1 次提交
  20. 23 9月, 2020 1 次提交
  21. 01 9月, 2020 3 次提交
  22. 17 8月, 2020 1 次提交
  23. 05 8月, 2020 1 次提交
  24. 02 7月, 2020 1 次提交
  25. 11 6月, 2020 5 次提交
    • I
      drm/dp_mst: Fix flushing the delayed port/mstb destroy work · 72822c3b
      Imre Deak 提交于
      Atm, a pending delayed destroy work during module removal will be
      canceled, leaving behind MST ports, mstbs. Fix this by using a dedicated
      workqueue which will be drained of requeued items as well when
      destroying it.
      
      v2:
      - Check if wq is NULL before calling destroy_workqueue().
      
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Reviewed-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200610134704.25270-1-imre.deak@intel.com
      72822c3b
    • I
      drm/dp_mst: Fix the DDC I2C device registration of an MST port · d8bd15b3
      Imre Deak 提交于
      During the initial MST probing an MST port's I2C device will be
      registered using the kdev of the DRM device as a parent. Later after MST
      Connection Status Notifications this I2C device will be re-registered
      with the kdev of the port's connector. This will also move
      inconsistently the I2C device's sysfs entry from the DRM device's sysfs
      dir to the connector's dir.
      
      Fix the above by keeping the DRM kdev as the parent of the I2C device.
      
      Ideally the connector's kdev would be used as a parent, similarly to
      non-MST connectors, however that needs some more refactoring to ensure
      the connector's kdev is already available early enough. So keep the
      existing (initial) behavior for now.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200607212522.16935-2-imre.deak@intel.com
      d8bd15b3
    • I
      drm/dp_mst: Fix the DDC I2C device unregistration of an MST port · 7d115076
      Imre Deak 提交于
      The WARN below triggers during the removal of an MST port. The problem
      is that the parent device's (the connector's kdev) sysfs directory is
      removed recursively when the connector is unregistered (even though the
      I2C device holds a reference on the parent device). To fix this set
      first the Peer Device Type to none which will remove the I2C device.
      
      Note that atm, inconsistently, the parent of the I2C device is initially set to
      the DRM kdev and after a Connection Status Notification the parent may be reset
      to be the connector's kdev. This problem is addressed by the next patch.
      
      [ 4462.989299] ------------[ cut here ]------------
      [ 4463.014940] sysfs group 'power' not found for kobject 'i2c-24'
      [ 4463.034664] WARNING: CPU: 0 PID: 970 at fs/sysfs/group.c:281 sysfs_remove_group+0x71/0x80
      [ 4463.044357] Modules linked in: snd_hda_intel i915 drm_kms_helper(O) drm netconsole snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul snd_intel_dspcf
      g crc32_pclmul snd_hda_codec snd_hwdep ghash_clmulni_intel snd_hda_core asix usbnet kvm_intel mii i2c_algo_bit snd_pcm syscopyarea sysfillrect e1000e sysimgblt fb_sys_fops prim
      e_numbers ptp pps_core i2c_i801 r8169 mei_me realtek mei [last unloaded: drm]
      [ 4463.044399] CPU: 0 PID: 970 Comm: kworker/0:2 Tainted: G           O      5.7.0+ #172
      [ 4463.044402] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP
      [ 4463.044423] Workqueue: events drm_dp_delayed_destroy_work [drm_kms_helper]
      [ 4463.044428] RIP: 0010:sysfs_remove_group+0x71/0x80
      [ 4463.044431] Code: 48 89 df 5b 5d 41 5c e9 cd b6 ff ff 48 89 df e8 95 b4 ff ff eb cb 49 8b 14 24 48 8b 75 00 48 c7 c7 20 0f 3f 82 e8 9f c5 d7 ff <0f> 0b 5b 5d 41 5c c3 0f 1f
      84 00 00 00 00 00 48 85 f6 74 31 41 54
      [ 4463.044433] RSP: 0018:ffffc900018bfbf0 EFLAGS: 00010282
      [ 4463.044436] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
      [ 4463.044439] RDX: 0000000080000001 RSI: ffff88849e828f38 RDI: 00000000ffffffff
      [ 4463.052970] [drm:drm_atomic_get_plane_state [drm]] Added [PLANE:100:plane 2B] 00000000c2160caa state to 00000000d172564a
      [ 4463.070533] RBP: ffffffff820cea20 R08: ffff88847f4b8958 R09: 0000000000000000
      [ 4463.070535] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88848a725018
      [ 4463.070537] R13: 0000000000000000 R14: ffffffff827090e0 R15: 0000000000000002
      [ 4463.070539] FS:  0000000000000000(0000) GS:ffff88849e800000(0000) knlGS:0000000000000000
      [ 4463.070541] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 4463.070543] CR2: 00007fdf8a756538 CR3: 0000000489684001 CR4: 0000000000760ef0
      [ 4463.070545] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 4463.070547] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [ 4463.070549] PKRU: 55555554
      [ 4463.070551] Call Trace:
      [ 4463.070560]  device_del+0x84/0x400
      [ 4463.070571]  cdev_device_del+0x10/0x30
      [ 4463.070578]  put_i2c_dev+0x69/0x80
      [ 4463.070584]  i2cdev_detach_adapter+0x2e/0x60
      [ 4463.070591]  notifier_call_chain+0x34/0x90
      [ 4463.070599]  blocking_notifier_call_chain+0x3f/0x60
      [ 4463.070606]  device_del+0x7c/0x400
      [ 4463.087817]  ? lockdep_init_map_waits+0x57/0x210
      [ 4463.087825]  device_unregister+0x11/0x60
      [ 4463.087829]  i2c_del_adapter+0x249/0x310
      [ 4463.087846]  drm_dp_port_set_pdt+0x6b/0x2c0 [drm_kms_helper]
      [ 4463.087862]  drm_dp_delayed_destroy_work+0x2af/0x350 [drm_kms_helper]
      [ 4463.087876]  process_one_work+0x268/0x600
      [ 4463.105438]  ? __schedule+0x30c/0x920
      [ 4463.105451]  worker_thread+0x37/0x380
      [ 4463.105457]  ? process_one_work+0x600/0x600
      [ 4463.105462]  kthread+0x140/0x160
      [ 4463.105466]  ? kthread_park+0x80/0x80
      [ 4463.105474]  ret_from_fork+0x24/0x50
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200607212522.16935-1-imre.deak@intel.com
      7d115076
    • I
      drm/i915/dp_mst: Work around out-of-spec adapters filtering short pulses · 471bdd0d
      Imre Deak 提交于
      Some TypeC -> native DP adapters, at least the Club 3D CAC-1557 adapter,
      incorrectly filter out HPD short pulses with a duration less than
      ~540 usec, leading to MST probe failures.
      
      According to the DP Standard 2.0 section 5.1.4:
      - DP sinks should generate short pulses in the 500 usec -> 1 msec range
      - DP sources should detect short pulses in the 250 usec -> 2 msec range
      
      According to the DP Alt Mode on TypeC Standard section 3.9.2, adapters
      should detect and forward short pulses according to how sources should
      detect them as specified in the DP Standard (250 usec -> 2 msec).
      
      Based on the above filtering out short pulses with a duration less than
      540 usec is incorrect.
      
      To make such adapters work add support for a driver polling on MST
      inerrupt flags, and wire this up in the i915 driver. The sink can clear
      an interrupt it raised after 110 msec if the source doesn't respond, so
      use a 50 msec poll period to avoid missing an interrupt. Polling of the
      MST interrupt flags is explicitly allowed by the DP Standard.
      
      This fixes MST probe failures I saw using this adapter and a DELL U2515H
      monitor.
      
      v2:
      - Fix the wait event timeout for the no-poll case.
      v3 (Ville):
      - Fix the short pulse duration limits in the commit log prescribed by the
        DP Standard.
      - Add code comment explaining why/how polling is used.
      - Factor out a helper to schedule the port's hpd irq handler and move it
        to the rest of hotplug handlers.
      - Document the new MST callback.
      - s/update_hpd_irq_state/poll_hpd_irq/
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200604184500.23730-2-imre.deak@intel.com
      471bdd0d
    • I
  26. 18 5月, 2020 1 次提交
  27. 15 5月, 2020 1 次提交
    • I
      drm/dp_mst: Fix timeout handling of MST down messages · 58c17217
      Imre Deak 提交于
      This fixes the following use-after-free problem in case an MST down
      message times out, while waiting for the response for it:
      
      [  449.022841] [drm:drm_dp_mst_wait_tx_reply.isra.26] timedout msg send 0000000080ba7fa2 2 0
      [  449.022898] ------------[ cut here ]------------
      [  449.022903] list_add corruption. prev->next should be next (ffff88847dae32c0), but was 6b6b6b6b6b6b6b6b. (prev=ffff88847db1c140).
      [  449.022931] WARNING: CPU: 2 PID: 22 at lib/list_debug.c:28 __list_add_valid+0x4d/0x70
      [  449.022935] Modules linked in: asix usbnet mii snd_hda_codec_hdmi mei_hdcp i915 x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep e1000e snd_hda_core ptp snd_pcm pps_core mei_me mei intel_lpss_pci prime_numbers
      [  449.022966] CPU: 2 PID: 22 Comm: kworker/2:0 Not tainted 5.7.0-rc3-CI-Patchwork_17536+ #1
      [  449.022970] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019
      [  449.022976] Workqueue: events_long drm_dp_mst_link_probe_work
      [  449.022982] RIP: 0010:__list_add_valid+0x4d/0x70
      [  449.022987] Code: c3 48 89 d1 48 c7 c7 f0 e7 32 82 48 89 c2 e8 3a 49 b7 ff 0f 0b 31 c0 c3 48 89 c1 4c 89 c6 48 c7 c7 40 e8 32 82 e8 23 49 b7 ff <0f> 0b 31 c0 c3 48 89 f2 4c 89 c1 48 89 fe 48 c7 c7 90 e8 32 82 e8
      [  449.022991] RSP: 0018:ffffc900001abcb0 EFLAGS: 00010286
      [  449.022995] RAX: 0000000000000000 RBX: ffff88847dae2d58 RCX: 0000000000000001
      [  449.022999] RDX: 0000000080000001 RSI: ffff88849d914978 RDI: 00000000ffffffff
      [  449.023002] RBP: ffff88847dae32c0 R08: ffff88849d914978 R09: 0000000000000000
      [  449.023006] R10: ffffc900001abcb8 R11: 0000000000000000 R12: ffff888490d98400
      [  449.023009] R13: ffff88847dae3230 R14: ffff88847db1c140 R15: ffff888490d98540
      [  449.023013] FS:  0000000000000000(0000) GS:ffff88849ff00000(0000) knlGS:0000000000000000
      [  449.023017] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  449.023021] CR2: 00007fb96fafdc63 CR3: 0000000005610004 CR4: 0000000000760ee0
      [  449.023025] PKRU: 55555554
      [  449.023028] Call Trace:
      [  449.023034]  drm_dp_queue_down_tx+0x59/0x110
      [  449.023041]  ? rcu_read_lock_sched_held+0x4d/0x80
      [  449.023050]  ? kmem_cache_alloc_trace+0x2a6/0x2d0
      [  449.023060]  drm_dp_send_link_address+0x74/0x870
      [  449.023065]  ? __slab_free+0x3e1/0x5c0
      [  449.023071]  ? lockdep_hardirqs_on+0xe0/0x1c0
      [  449.023078]  ? lockdep_hardirqs_on+0xe0/0x1c0
      [  449.023097]  drm_dp_check_and_send_link_address+0x9a/0xc0
      [  449.023106]  drm_dp_mst_link_probe_work+0x9e/0x160
      [  449.023117]  process_one_work+0x268/0x600
      [  449.023124]  ? __schedule+0x307/0x8d0
      [  449.023139]  worker_thread+0x37/0x380
      [  449.023149]  ? process_one_work+0x600/0x600
      [  449.023153]  kthread+0x140/0x160
      [  449.023159]  ? kthread_park+0x80/0x80
      [  449.023169]  ret_from_fork+0x24/0x50
      
      Fixes: d308a881 ("drm/dp_mst: Kill the second sideband tx slot, save the world")
      Cc: Lyude Paul <lyude@redhat.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: <stable@vger.kernel.org> # v3.17+
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200513103155.12336-1-imre.deak@intel.com
      58c17217