1. 14 12月, 2022 5 次提交
  2. 11 11月, 2022 1 次提交
  3. 26 9月, 2022 1 次提交
  4. 15 9月, 2022 1 次提交
  5. 08 9月, 2022 1 次提交
  6. 06 9月, 2022 6 次提交
  7. 02 9月, 2022 1 次提交
    • I
      drm/i915/dp_mst: Fix mst_mgr lookup during atomic check · e06a4608
      Imre Deak 提交于
      If an MST connector was disabled in the old state during a commit, the
      connector's best_encoder will be NULL, so we can't look up mst_mgr via
      it. Do the lookup instead via intel_connector->mst_port which always
      points to the primary encoder.
      
      This fixes the following:
      [   58.922866] BUG: kernel NULL pointer dereference, address: 0000000000000170
      [   58.922867] #PF: supervisor read access in kernel mode
      [   58.922868] #PF: error_code(0x0000) - not-present page
      [   58.922869] PGD 0 P4D 0
      [   58.922870] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [   58.922872] CPU: 0 PID: 133 Comm: kworker/0:2 Tainted: G     U             6.0.0-rc3-imre+ #560
      [   58.922874] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR5 RVP, BIOS ADLPFWI1.R00.3135.A00.2203251419 03/25/2022
      [   58.922874] Workqueue: events output_poll_execute [drm_kms_helper]
      [   58.922879] RIP: 0010:intel_dp_mst_atomic_check+0xbb/0x1c0 [i915]
      [   58.922955] Code: 5b 7b f6 ff 84 c0 75 41 48 8b 44 24 18 65 48 2b 04 25 28 00 00 00 0f 85 ff 00 00 00 48 8b 45 10 48 8b 93 10 07 00 00 4c 89 e7 <48> 8b b0 70 01 00 00 48 83 c4 20 5b 5d 48 81 c6 f0 0c 00 00 41 5c
      [   58.922956] RSP: 0018:ffffc90000633a88 EFLAGS: 00010246
      [   58.922957] RAX: 0000000000000000 RBX: ffff888117d19000 RCX: ffff888101893308
      [   58.922958] RDX: ffff888122981000 RSI: ffffffff82309ecc RDI: ffff888114da6800
      [   58.922959] RBP: ffff8881094bab48 R08: 0000000081917436 R09: 0000000068191743
      [   58.922960] R10: 0000000000000001 R11: 0000000000000001 R12: ffff888114da6800
      [   58.922960] R13: ffff8881143f8000 R14: 0000000000000000 R15: ffff888119bf2000
      [   58.922961] FS:  0000000000000000(0000) GS:ffff888496200000(0000) knlGS:0000000000000000
      [   58.922962] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   58.922962] CR2: 0000000000000170 CR3: 0000000005612004 CR4: 0000000000770ef0
      [   58.922963] PKRU: 55555554
      [   58.922963] Call Trace:
      [   58.922964]  <TASK>
      [   58.922966]  drm_atomic_helper_check_modeset+0x3f8/0xc70 [drm_kms_helper]
      [   58.922972]  intel_atomic_check+0xb1/0x3180 [i915]
      [   58.923059]  ? find_held_lock+0x2b/0x80
      [   58.923064]  drm_atomic_check_only+0x5d3/0xa60 [drm]
      [   58.923082]  drm_atomic_commit+0x56/0xc0 [drm]
      [   58.923097]  ? drm_plane_get_damage_clips.cold+0x1c/0x1c [drm]
      [   58.923114]  drm_client_modeset_commit_atomic+0x235/0x280 [drm]
      [   58.923132]  drm_client_modeset_commit_locked+0x5b/0x190 [drm]
      [   58.923148]  drm_client_modeset_commit+0x24/0x50 [drm]
      [   58.923164]  drm_fb_helper_set_par+0xae/0xe0 [drm_kms_helper]
      [   58.923171]  drm_fb_helper_hotplug_event+0xd5/0xf0 [drm_kms_helper]
      [   58.923178]  output_poll_execute+0xac/0x200 [drm_kms_helper]
      [   58.923187]  process_one_work+0x268/0x580
      [   58.923190]  ? process_one_work+0x580/0x580
      [   58.923191]  worker_thread+0x52/0x3b0
      [   58.923193]  ? process_one_work+0x580/0x580
      [   58.923195]  kthread+0xf0/0x120
      [   58.923196]  ? kthread_complete_and_exit+0x20/0x20
      [   58.923198]  ret_from_fork+0x1f/0x30
      [   58.923202]  </TASK>
      
      Fixes: ffac9721 ("drm/display/dp_mst: Don't open code modeset checks for releasing time slots")
      Cc: Lyude Paul <lyude@redhat.com>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NLyude Paul <lyude@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220901161933.1004778-1-imre.deak@intel.com
      e06a4608
  8. 24 8月, 2022 3 次提交
    • L
      drm/display/dp_mst: Move all payload info into the atomic state · 4d07b0bc
      Lyude Paul 提交于
      Now that we've finally gotten rid of the non-atomic MST users leftover in
      the kernel, we can finally get rid of all of the legacy payload code we
      have and move as much as possible into the MST atomic state structs. The
      main purpose of this is to make the MST code a lot less confusing to work
      on, as there's a lot of duplicated logic that doesn't really need to be
      here. As well, this should make introducing features like fallback link
      retraining and DSC support far easier.
      
      Since the old payload code was pretty gnarly and there's a Lot of changes
      here, I expect this might be a bit difficult to review. So to make things
      as easy as possible for reviewers, I'll sum up how both the old and new
      code worked here (it took me a while to figure this out too!).
      
      The old MST code basically worked by maintaining two different payload
      tables - proposed_vcpis, and payloads. proposed_vcpis would hold the
      modified payload we wanted to push to the topology, while payloads held the
      payload table that was currently programmed in hardware. Modifications to
      proposed_vcpis would be handled through drm_dp_allocate_vcpi(),
      drm_dp_mst_deallocate_vcpi(), and drm_dp_mst_reset_vcpi_slots(). Then, they
      would be pushed via drm_dp_mst_update_payload_step1() and
      drm_dp_mst_update_payload_step2().
      
      Furthermore, it's important to note how adding and removing VC payloads
      actually worked with drm_dp_mst_update_payload_step1(). When a VC payload
      is removed from the VC table, all VC payloads which come after the removed
      VC payload's slots must have their time slots shifted towards the start of
      the table. The old code handles this by looping through the entire payload
      table and recomputing the start slot for every payload in the topology from
      scratch. While very much overkill, this ends up doing the right thing
      because we always order the VCPIs for payloads from first to last starting
      timeslot.
      
      It's important to also note that drm_dp_mst_update_payload_step2() isn't
      actually limited to updating a single payload - the driver can use it to
      queue up multiple payload changes so that as many of them can be sent as
      possible before waiting for the ACT. This is -technically- not against
      spec, but as Wayne Lin has pointed out it's not consistently implemented
      correctly in hubs - so it might as well be.
      
      drm_dp_mst_update_payload_step2() is pretty self explanatory and basically
      the same between the old and new code, save for the fact we don't have a
      second step for deleting payloads anymore -and thus rename it to
      drm_dp_mst_add_payload_step2().
      
      The new payload code stores all of the current payload info within the MST
      atomic state and computes as much of the state as possible ahead of time.
      This has the one exception of the starting timeslots for payloads, which
      can't be determined at atomic check time since the starting time slots will
      vary depending on what order CRTCs are enabled in the atomic state - which
      varies from driver to driver. These are still stored in the atomic MST
      state, but are only copied from the old MST state during atomic commit
      time. Likewise, this is when new start slots are determined.
      
      Adding/removing payloads now works much more closely to how things are
      described in the spec. When we delete a payload, we loop through the
      current list of payloads and update the start slots for any payloads whose
      time slots came after the payload we just deleted. Determining the starting
      time slots for new payloads being added is done by simply keeping track of
      where the end of the VC table is in
      drm_dp_mst_topology_mgr->next_start_slot. Additionally, it's worth noting
      that we no longer have a single update_payload() function. Instead, we now
      have drm_dp_mst_add_payload_step1|2() and drm_dp_mst_remove_payload(). As
      such, it's now left it up to the driver to figure out when to add or remove
      payloads. The driver already knows when it's disabling/enabling CRTCs, so
      it also already knows when payloads should be added or removed.
      
      Changes since v1:
      * Refactor around all of the completely dead code changes that are
        happening in amdgpu for some reason when they really shouldn't even be
        there in the first place… :\
      * Remove mention of sending one ACT per series of payload updates. As Wayne
        Lin pointed out, there are apparently hubs on the market that don't work
        correctly with this scheme and require a separate ACT per payload update.
      * Fix accidental drop of mst_mgr.lock - Wayne Lin
      * Remove mentions of allowing multiple ACT updates per payload change,
        mention that this is a result of vendors not consistently supporting this
        part of the spec and requiring a unique ACT for each payload change.
      * Get rid of reference to drm_dp_mst_port in DC - turns out I just got
        myself confused by DC and we don't actually need this.
      Changes since v2:
      * Get rid of fix for not sending payload deallocations if ddps=0 and just
        go back to wayne's fix
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Fangzhi Zuo <Jerry.Zuo@amd.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sean Paul <sean@poorly.run>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220817193847.557945-18-lyude@redhat.com
      4d07b0bc
    • L
      drm/display/dp_mst: Don't open code modeset checks for releasing time slots · ffac9721
      Lyude Paul 提交于
      I'm not sure why, but at the time I originally wrote the find/release time
      slot helpers I thought we should avoid keeping modeset tracking out of the
      MST helpers. In retrospect though there's no actual good reason to do
      this, and the logic has ended up being identical across all the drivers
      using the helpers. Also, it needs to be fixed anyway so we don't break
      things when going atomic-only with MST.
      
      So, let's just move this code into drm_dp_atomic_release_time_slots() and
      stop open coding it.
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Fangzhi Zuo <Jerry.Zuo@amd.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sean Paul <sean@poorly.run>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220817193847.557945-10-lyude@redhat.com
      ffac9721
    • L
      drm/display/dp_mst: Call them time slots, not VCPI slots · df78f7f6
      Lyude Paul 提交于
      VCPI is only sort of the correct term here, originally the majority of this
      code simply referred to timeslots vaguely as "slots" - and since I started
      working on it and adding atomic functionality, the name "VCPI slots" has
      been used to represent time slots.
      
      Now that we actually have consistent access to the DisplayPort spec thanks
      to VESA, I now know this isn't actually the proper term - as the
      specification refers to these as time slots.
      
      Since we're trying to make this code as easy to figure out as possible,
      let's take this opportunity to correct this nomenclature and call them by
      their proper name - timeslots. Likewise, we rename various functions
      appropriately, along with replacing references in the kernel documentation
      and various debugging messages.
      
      It's important to note that this patch series leaves the legacy MST code
      untouched for the most part, which is fine since we'll be removing it soon
      anyhow. There should be no functional changes in this series.
      
      v2:
      * Add note that Wayne Lin from AMD suggested regarding slots being between
        the source DP Tx and the immediate downstream DP Rx
      Signed-off-by: NLyude Paul <lyude@redhat.com>
      Cc: Wayne Lin <Wayne.Lin@amd.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Fangzhi Zuo <Jerry.Zuo@amd.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Sean Paul <sean@poorly.run>
      Acked-by: NJani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220817193847.557945-5-lyude@redhat.com
      df78f7f6
  9. 13 7月, 2022 1 次提交
  10. 07 7月, 2022 1 次提交
  11. 28 6月, 2022 1 次提交
  12. 30 3月, 2022 1 次提交
  13. 11 2月, 2022 1 次提交
  14. 01 2月, 2022 4 次提交
  15. 27 10月, 2021 1 次提交
  16. 26 10月, 2021 1 次提交
  17. 25 10月, 2021 1 次提交
  18. 08 10月, 2021 1 次提交
  19. 20 9月, 2021 1 次提交
  20. 15 9月, 2021 1 次提交
  21. 24 8月, 2021 1 次提交
  22. 14 8月, 2021 1 次提交
  23. 28 7月, 2021 1 次提交
  24. 24 7月, 2021 1 次提交
  25. 07 7月, 2021 1 次提交
  26. 25 6月, 2021 1 次提交