[PATCH 3/3] drm/amd/display: Solve mst monitors blank out problem after resume

2024-06-26 Thread Wayne Lin
st in resume"). And adjust the reason to trigger dc_link_detect by DETECT_REASON_RESUMEFROMS3S4. Fixes: 202dc359adda ("drm/amd/display: Defer handling mst up request in resume") Signed-off-by: Wayne Lin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- 1 file changed

[PATCH 2/3] drm/dp_mst: Skip CSN if topology probing is not done yet

2024-06-26 Thread Wayne Lin
: Harry Wentland Cc: Jani Nikula Cc: Imre Deak Cc: Daniel Vetter Cc: sta...@vger.kernel.org Signed-off-by: Wayne Lin --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu

[PATCH 1/3] drm/dp_mst: Fix all mstb marked as not probed after suspend/resume

2024-06-26 Thread Wayne Lin
conditions. Cc: Lyude Paul Cc: Harry Wentland Cc: Jani Nikula Cc: Imre Deak Cc: Daniel Vetter Cc: sta...@vger.kernel.org Fixes: 37dfdc55ffeb ("drm/dp_mst: Cleanup drm_dp_send_link_address() a bit") Signed-off-by: Wayne Lin --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 ++-

[PATCH 0/3] Fix mst daisy chain light up issue after resume

2024-06-26 Thread Wayne Lin
rce should ignore the CSN event before source completeting topology probing during resume. Wayne Lin (3): drm/dp_mst: Fix all mstb marked as not probed after suspend/resume drm/dp_mst: Skip CSN if topology probing is not done yet drm/amd/display: Solve mst monitors blank out problem after resume

[PATCH] drm/dp_mst: Fix all mstb marked as not probed after suspend/resume

2024-05-27 Thread Wayne Lin
conditions. Cc: Lyude Paul Cc: Harry Wentland Cc: Jani Nikula Cc: sta...@vger.kernel.org Fixes: 37dfdc55ffeb ("drm/dp_mst: Cleanup drm_dp_send_link_address() a bit") Signed-off-by: Wayne Lin --- drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 ++-- 1 file changed, 2 insertions(+),

[PATCH] drm/mst: Fix NULL pointer dereference at drm_dp_add_payload_part2

2024-03-06 Thread Wayne Lin
..@ruhr-uni-bochum.de/ Cc: ly...@redhat.com Cc: imre.d...@intel.com Cc: sta...@vger.kernel.org Cc: regressi...@lists.linux.dev Signed-off-by: Wayne Lin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +- drivers/gpu/drm/display/drm_dp_mst_topology.c | 4 +---

[PATCH] drm/amd/display: Fix mst hub unplug warning

2023-10-05 Thread Wayne Lin
: Refactor the flow for payload allocation/removement") Reviewed-by: Jerry Zuo Signed-off-by: Wayne Lin --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 38 +-- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_

[PATCH v3 3/3] drm/mst: adjust the function drm_dp_remove_payload_part2()

2023-08-23 Thread Wayne Lin
is already included in new mst_state. By this, we can also remove redundant workaround for amdgpu driver. [How] Remove "old_payload" input of drm_dp_remove_payload_part2() and get the latest number of allocated time slot for the port from new mst_state instead. Signed-off-by:

[PATCH v3 2/3] drm/mst: Refactor the flow for payload allocation/removement

2023-08-23 Thread Wayne Lin
#x27;nv50_msto_prepare'. Catched by kernel test robot Changes since v2: * Fix indention Signed-off-by: Wayne Lin Reviewed-by: Lyude Paul --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 20 ++- drivers/gpu/drm/display/drm_dp_mst_topology.c | 159 +++--- drivers/gpu/drm/i915/

[PATCH v3 1/3] drm/mst: delete unnecessary case in drm_dp_add_payload_part2()

2023-08-23 Thread Wayne Lin
[Why] There is no need to consider payload->delete case since we won't call drm_dp_add_payload_part2() to create a payload when we're about to remove it. [How] Delete unnecessary case to simplify the code. Signed-off-by: Wayne Lin Reviewed-by: Lyude Paul --- drivers/gp

[PATCH v3 0/3] Refactor and clean up codes of mst

2023-08-23 Thread Wayne Lin
sary codes. Changes since v1: * Remove the set but not use variable 'old_payload' in function 'nv50_msto_prepare'. Catched by kernel test robot Changes since v2: * Fix indention Wayne Lin (3): drm/mst: delete unnecessary case in drm_dp_add_payload_part2() drm/mst: Refactor t

[Patch v2 2/3] drm/mst: Refactor the flow for payload allocation/removement

2023-08-06 Thread Wayne Lin
#x27;nv50_msto_prepare'. Catched by kernel test robot Signed-off-by: Wayne Lin --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 20 ++- drivers/gpu/drm/display/drm_dp_mst_topology.c | 159 +++--- drivers/gpu/drm/i915/display/intel_dp_mst.c | 18 +- drivers/gpu/drm/no

[Patch v2 3/3] drm/mst: adjust the function drm_dp_remove_payload_part2()

2023-08-06 Thread Wayne Lin
is already included in new mst_state. By this, we can also remove redundant workaround for amdgpu driver. [How] Remove "old_payload" input of drm_dp_remove_payload_part2() and get the latest number of allocated time slot for the port from new mst_state instead. Signed-off-by:

[Patch v2 1/3] drm/mst: delete unnecessary case in drm_dp_add_payload_part2()

2023-08-06 Thread Wayne Lin
[Why] There is no need to consider payload->delete case since we won't call drm_dp_add_payload_part2() to create a payload when we're about to remove it. [How] Delete unnecessary case to simplify the code. Signed-off-by: Wayne Lin --- drivers/gpu/drm/display/drm_dp_mst_t

[Patch v2 0/3] Refactor and clean up codes of mst

2023-08-06 Thread Wayne Lin
sary codes. Changes since v1: * Remove the set but not use variable 'old_payload' in function 'nv50_msto_prepare'. Catched by kernel test robot Wayne Lin (3): drm/mst: delete unnecessary case in drm_dp_add_payload_part2() drm/mst: Refactor the flow for payload allocation/re

[PATCH 3/3] drm/mst: adjust the function drm_dp_remove_payload_part2()

2023-08-03 Thread Wayne Lin
is already included in new mst_state. By this, we can also remove redundant workaround for amdgpu driver. [How] Remove "old_payload" input of drm_dp_remove_payload_part2() and get the latest number of allocated time slot for the port from new mst_state instead. Signed-off-by:

[PATCH 1/3] drm/mst: delete unnecessary case in drm_dp_add_payload_part2()

2023-08-03 Thread Wayne Lin
[Why] There is no need to consider payload->delete case since we won't call drm_dp_add_payload_part2() to create a payload when we're about to remove it. [How] Delete unnecessary case to simplify the code. Signed-off-by: Wayne Lin --- drivers/gpu/drm/display/drm_dp_mst_t

[PATCH 2/3] drm/mst: Refactor the flow for payload allocation/removement

2023-08-03 Thread Wayne Lin
downstrean-facing port, but updating variables of SW mst mgr and HW configuration should be conducted anyway. That's because it's under commit_tail and we need to complete the HW programming. Signed-off-by: Wayne Lin --- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 20 ++- drivers/gpu/d

[PATCH 0/3] Refactor and clean up codes of mst

2023-08-03 Thread Wayne Lin
sary codes. Wayne Lin (3): drm/mst: delete unnecessary case in drm_dp_add_payload_part2() drm/mst: Refactor the flow for payload allocation/removement drm/mst: adjust the function drm_dp_remove_payload_part2() .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 60 +- drivers/gpu/d

[PATCH v5] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-06-09 Thread Wayne Lin
le_event() to be an array align the size of esi[] Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 32 +-- drivers/gpu/drm/display/drm_dp_mst_topology.c | 54 --- drivers/gpu/drm/i915/display/intel_dp.c

[PATCH v4] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-06-08 Thread Wayne Lin
commit message * Adjust the naming of the divided 2 functions and add a new input parameter "ack". * Adjust code flow as per review comments. Changes since v3: * Update the function description of drm_dp_mst_hpd_irq_handle_event Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org ---

[PATCH v2] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-27 Thread Wayne Lin
tx() only when there is no on going message transaction. Changes since v1: * Reworked on review comments received -> Adjust the fix to let driver explicitly kick off new down request when mst irq event is handled and acked -> Adjust the commit message Signed-off-by: Wayne Lin Cc: sta...@

[PATCH] drm/dp_mst: Clear MSG_RDY flag before sending new message

2023-04-17 Thread Wayne Lin
lag before caliing drm_dp_mst_kick_tx(). Fix that. Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ drivers/gpu/drm/display/drm_dp_mst_topology.c | 22 +++ drivers/gpu/drm/i915/display/intel_dp.c | 3 +++ drive

[PATCH] Revert "drm/display/dp_mst: Move all payload info into the atomic state"

2023-01-12 Thread Wayne Lin
addressing all regression problems caused by this previous patch, will add it back and adjust it. Signed-off-by: Wayne Lin Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2171 Cc: sta...@vger.kernel.org # 6.1 Cc: Lyude Paul Cc: Harry Wentland Cc: Mario Limonciello Cc: Ville Syrjälä Cc: Ben

[PATCH] drm/dp_mst: Lower down debug info level when receive NAK

2022-04-28 Thread Wayne Lin
r. [How] Use drm_dbg_kms() to replace drm_err() when receive NAK. Changes since v1: * drm_dp_mst_topology.c file path changed. Folder was rename from 'dp' to 'display' Signed-off-by: Wayne Lin Reviewed-by: Harry Wentland --- drivers/gpu/drm/display/drm_dp_mst_topology

[PATCH] drm/dp_mst: Lower down debug info level when receive NAK

2022-03-29 Thread Wayne Lin
r. [How] Use drm_dbg_kms() to replace drm_err() when receive NAK. Signed-off-by: Wayne Lin --- drivers/gpu/drm/dp/drm_dp_mst_topology.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/dp/drm_dp_mst_topology.c b/drivers/gpu/drm/dp/drm_dp_mst_topology.c index 1

[PATCH 0/4] Unregister mst connectors when hotplug

2021-07-20 Thread Wayne Lin
er, find out that mst connectors won't reach connector destroy flow after hot unplug and hence will cause no more resources for new added connectors. Thus, this patch set is trying to solve observed registration/unregistration problem of mst connectors. Wayne Lin (4): drm/dp_mst: Put malloc

[PATCH 2/4] drm/dp_mst: Only create connector for connected end device

2021-07-20 Thread Wayne Lin
mas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Alex Deucher Cc: Nicholas Kazlauskas Cc: Rodrigo Siqueira Cc: Aurabindo Pillai Cc: Eryk Brol Cc: Bas Nieuwenhuizen Cc: Nikola Cornij Cc: Wayne Lin Cc: "Ville Syrjälä" Cc: Jani Nikula Cc: Manasi Navare Cc: Ankit Nautiyal Cc

[PATCH 3/4] drm/dp_mst: Put connector of disconnected end device when handling CSN

2021-07-20 Thread Wayne Lin
), we won't unregiser such connector. [How] Take sst/dp_to_legacy conveter device into consideration, also unregister connectors of this case when handling CSN. In addition, check whether port->connector exist to avoid null pointer dereference. Cc: sta...@vger.kernel.org Signed-off-by: W

[PATCH 4/4] drm/dp_mst: Release disconnected connectors when resume

2021-07-20 Thread Wayne Lin
. Cc: sta...@vger.kernel.org Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_dp_mst_topology.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 85a959427247..0b04ea65cb8e 100644 --- a/drive

[PATCH 1/4] drm/dp_mst: Put malloc_kref of vcpi pointing port when disable MST

2021-07-20 Thread Wayne Lin
te on topology disable") Cc: Sean Paul Cc: Wayne Lin Cc: Ville Syrjälä Cc: sta...@vger.kernel.org # v4.4+ Cc: Lyude Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: # v5.7+ Signed-off-by:

[PATCH 3/3] drm/dp_mst: Add missing drm parameters to recently added call to drm_dbg_kms()

2021-07-16 Thread Wayne Lin
ayload table by ports in stale topology") Cc: Wayne Lin Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Cc: sta...@vger.kernel.org Signed-off-by: José Roberto de Souza Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/2021061619

[PATCH 1/3] drm/dp_mst: Do not set proposed vcpi directly

2021-07-16 Thread Wayne Lin
xed & Cc tags Signed-off-by: Wayne Lin Fixes: 7617e9621bf2 ("drm/dp_mst: clear time slots for ports invalid") Cc: Lyude Paul Cc: Wayne Lin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: # v5.5+ Signed-off-by: Lyude Paul Lin

[PATCH 3/3] drm/dp_mst: Add missing drm parameters to recently added call to drm_dbg_kms()

2021-07-16 Thread Wayne Lin
ayload table by ports in stale topology") Cc: Wayne Lin Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Cc: sta...@vger.kernel.org Signed-off-by: José Roberto de Souza Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/2021061619

[PATCH 1/3] drm/dp_mst: Do not set proposed vcpi directly

2021-07-16 Thread Wayne Lin
xed & Cc tags Signed-off-by: Wayne Lin Fixes: 7617e9621bf2 ("drm/dp_mst: clear time slots for ports invalid") Cc: Lyude Paul Cc: Wayne Lin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: # v5.5+ Signed-off-by: Lyude Paul Lin

[PATCH 3/3] drm/dp_mst: Add missing drm parameters to recently added call to drm_dbg_kms()

2021-07-16 Thread Wayne Lin
ayload table by ports in stale topology") Cc: Wayne Lin Cc: Lyude Paul Cc: dri-devel@lists.freedesktop.org Cc: sta...@vger.kernel.org Signed-off-by: José Roberto de Souza Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/2021061619

[PATCH 1/3] drm/dp_mst: Do not set proposed vcpi directly

2021-07-16 Thread Wayne Lin
xed & Cc tags Signed-off-by: Wayne Lin Fixes: 7617e9621bf2 ("drm/dp_mst: clear time slots for ports invalid") Cc: Lyude Paul Cc: Wayne Lin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: # v5.5+ Signed-off-by: Lyude Paul Lin

[PATCH v2 2/2] drm/dp_mst: Avoid to mess up payload table by ports in stale topology

2021-06-15 Thread Wayne Lin
e. 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: Wayne Lin Cc: sta...@vger.kernel.org --- drive

[PATCH v2 0/2] Fix observed mst problems with StarTech hub

2021-06-15 Thread Wayne Lin
unavailable VCP ID for new streams Changes since v1: * Add appropriate tags: Fixes & Cc * Change debug macro to use drm_dbg_kms() instead Wayne Lin (2): drm/dp_mst: Do not set proposed vcpi directly drm/dp_mst: Avoid to mess up payload table by ports in stale topology drivers/gpu/drm/dr

[PATCH v2 1/2] drm/dp_mst: Do not set proposed vcpi directly

2021-06-15 Thread Wayne Lin
xed & Cc tags Signed-off-by: Wayne Lin Fixes: 7617e9621bf2 ("drm/dp_mst: clear time slots for ports invalid") Cc: Lyude Paul Cc: Wayne Lin Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Cc: # v5.5+ --- drivers/gpu/drm/drm_dp_m

[PATCH 1/2] drm/dp_mst: Do not set proposed vcpi directly

2021-05-28 Thread Wayne Lin
st: 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. Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_dp_mst_topology.c | 36 --- 1

[PATCH 2/2] drm/dp_mst: Avoid to mess up payload table by ports in stale topology

2021-05-28 Thread Wayne Lin
e. If the found root branch device is not the same root of current topology, don't update payload table. Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_dp_mst_topology.c | 29 +++ 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/d

[PATCH 0/2] Fix observed mst problems with StarTech hub

2021-05-28 Thread Wayne Lin
unavailable VCP ID for new streams Wayne Lin (2): drm/dp_mst: Do not set proposed vcpi directly drm/dp_mst: Avoid to mess up payload table by ports in stale topology drivers/gpu/drm/drm_dp_mst_topology.c | 65 --- 1 file changed, 39 insertions(+), 26 deletions(-) -- 2.17.1

[PATCH v2 2/2] drm/dp_mst: Set CLEAR_PAYLOAD_ID_TABLE as broadcast

2021-02-24 Thread Wayne Lin
[Why & How] According to DP spec, CLEAR_PAYLOAD_ID_TABLE is a path broadcast request message and current implementation is incorrect. Fix it. Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org --- drivers/gpu/drm/drm_dp_mst_topology.c | 4 +++- 1 file changed, 3 insertions(+), 1 dele

[PATCH v2 1/2] drm/dp_mst: Revise broadcast msg lct & lcr

2021-02-24 Thread Wayne Lin
[Why & How] According to DP spec, broadcast message LCT equals to 1 and LCR equals to 6. Current implementation is incorrect. Fix it. In addition, revise a bit the hdr->rad handling to include broadcast case. Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org --- drivers/

[PATCH v2 0/2] Set CLEAR_PAYLOAD_ID_TABLE as broadcast request

2021-02-24 Thread Wayne Lin
set lct=1 & lcr=6 2. CLEAR_PAYLOAD_ID_TABLE request message is not set as path broadcast request message. Should fix this. Changes since v1: *Refer to the suggestion from Ville Syrjala. While preparing hdr-rad, take broadcast case into consideration. Wayne Lin (2): drm/dp_mst: Revise broad

[PATCH 2/2] drm/dp_mst: Set CLEAR_PAYLOAD_ID_TABLE as broadcast

2021-02-21 Thread Wayne Lin
[Why & How] According to DP spec, CLEAR_PAYLOAD_ID_TABLE is a path broadcast request message and current implementation is incorrect. Fix it. Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org --- drivers/gpu/drm/drm_dp_mst_topology.c | 4 +++- 1 file changed, 3 insertions(+), 1 dele

[PATCH 1/2] drm/dp_mst: Revise broadcast msg lct & lcr

2021-02-21 Thread Wayne Lin
[Why & How] According to DP spec, broadcast message LCT equals to 1 and LCR equals to 6. Current implementation is incorrect. Fix it. Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org --- drivers/gpu/drm/drm_dp_mst_topology.c | 10 -- 1 file changed, 8 insertions(+), 2 delet

[PATCH 0/2] Set CLEAR_PAYLOAD_ID_TABLE as broadcast request

2021-02-21 Thread Wayne Lin
set lct=1 & lcr=6 2. CLEAR_PAYLOAD_ID_TABLE request message is not set as path broadcast request message. Should fix this. Wayne Lin (2): drm/dp_mst: Revise broadcast msg lct & lcr drm/dp_mst: Set CLEAR_PAYLOAD_ID_TABLE as broadcast drivers/gpu/drm/drm_dp_mst_topology.c | 14 ++

Re: [PATCH v2 0/4] Revert "drm/amd/display: Expose new CRC window property" and changes associated with this commit

2021-01-13 Thread Wayne Lin
Thanks Siqueira. Series is: Reviewed-by: Wayne Lin On 1/12/21 10:55 PM, Rodrigo Siqueira wrote: Hi, In the V1, Wayne pointed out two problems: 1. The revert patch included one extra line that does not belong to it; 2. The original patch also had other fixes in the same commit; I removed the

[PATCH v2 0/1] Take SST-only branch device into account

2020-01-16 Thread Wayne Lin
ase in and remain the original processing logic in current code. Changes since v1:(https://patchwork.kernel.org/cover/11323075/) * Squash previous two patches into one patch * Combine if statements to have code cleaner Wayne Lin (1): drm/dp_mst: Handle SST-only branch device case drivers/gpu/d

[PATCH v2 1/1] drm/dp_mst: Handle SST-only branch device case

2020-01-16 Thread Wayne Lin
tements mentioned in comments Fixes: c485e2c97dae ("drm/dp_mst: Refactor pdt setup/teardown, add more locking") Cc: Ville Syrjälä Cc: Harry Wentland Cc: Lyude Paul Signed-off-by: Wayne Lin Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 140 +++-

[PATCH] drm/dp_mst: Have DP_Tx send one msg at a time

2020-01-13 Thread Wayne Lin
r down request in queue at the end of drm_dp_mst_wait_tx_reply() (attempt to send out messages in queue when errors occur) Cc: Lyude Paul Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_dp_mst_topology.c | 14 -- include/drm/drm_dp_mst_helper.h | 6 ++ 2 files changed,

[PATCH 1/2] drm/dp_mst: Add a function to determine the mst end device

2020-01-08 Thread Wayne Lin
[Why] For later usage convenience, add the function drm_dp_mst_is_dp_mst_end_device() to decide whether a peer device connected to a DFP is mst end device. Which also indicates if the peer device is capable of handling message or not. Signed-off-by: Wayne Lin --- drivers/gpu/drm

[PATCH 2/2] drm/dp_mst: Handle SST-only branch device case

2020-01-08 Thread Wayne Lin
n, add more locking") Cc: Ville Syrjälä Cc: Harry Wentland Cc: Lyude Paul Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_dp_mst_topology.c | 131 +- 1 file changed, 68 insertions(+), 63 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers

[PATCH 0/2] Take SST-only branch device into account

2020-01-08 Thread Wayne Lin
device case in and remain the original processing logic in current code. Wayne Lin (2): drm/dp_mst: Add a function to determine the mst end device drm/dp_mst: Handle SST-only branch device case drivers/gpu/drm/drm_dp_mst_topology.c | 147 +++--- 1 file changed, 84 insertions(+

[PATCH v2] drm/dp_mst: clear time slots for ports invalid

2020-01-06 Thread Wayne Lin
, we can successfully update the DPCD payload table of down stream port and clear the proposed_vcpi[] to NULL. Changes since v1:(https://patchwork.kernel.org/patch/11275801/) * Invert the conditional to reduce the indenting Reviewed-by: Lyude Paul Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org ---

[PATCH v2] drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ

2020-01-02 Thread Wayne Lin
(drm/helper: add Displayport multi-stream helper (v0.6)) Reviewed-by: Harry Wentland Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu

[PATCH] drm/dp_mst: correct the shifting in DP_REMOTE_I2C_READ

2019-12-29 Thread Wayne Lin
[Why] According to DP spec, it should shift left 4 digits for NO_STOP_BIT in REMOTE_I2C_READ message. Not 5 digits. [How] Correct the shifting value of NO_STOP_BIT for DP_REMOTE_I2C_READ case in drm_dp_encode_sideband_req(). Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_dp_mst_topology.c

[PATCH] drm/dp_mst: Avoid NULL pointer dereference

2019-12-25 Thread Wayne Lin
rce causes kernel NULL pointer dereference at drm_dp_mst_atomic_check_bw_limit(). When calculating pbn_limit, if branch is null, accessing "&branch->ports" causes the problem. [How] Judge branch is null or not at the beginning. If it is null, return 0. Signed-off-by: Wayne Lin Cc: st

[PATCH] drm/dp_mst: clear time slots for ports invalid

2019-12-06 Thread Wayne Lin
, we can successfully update the DPCD payload table of down stream port and clear the proposed_vcpi[] to NULL. Signed-off-by: Wayne Lin Cc: sta...@vger.kernel.org --- drivers/gpu/drm/drm_dp_mst_topology.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers

[PATCH v2] drm/dp_mst: Remove VCPI while disabling topology mgr

2019-12-05 Thread Wayne Lin
up the data of stale proposed_vcpi[] and reset mgr->proposed_vcpis to NULL while disabling mst in drm_dp_mst_topology_mgr_set_mst(). Changes since v1: *Add on more details in commit message to describe the issue which the patch is trying to fix Signed-off-by: Wayne Lin --- drivers/gpu/drm/dr

[PATCH v2] drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()

2019-12-02 Thread Wayne Lin
ng to payload_state of current payload. Changes since v1: * Refine the code to have it easy reading * Amend the commit message to meet the way code is modified now. Signed-off-by: Wayne Lin Reviewed-by: Lyude Paul --- drivers/gpu/drm/drm_dp_mst_topology.c | 6 -- 1 file changed, 4 inser

[PATCH] drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()

2019-12-01 Thread Wayne Lin
rrent payload. Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_dp_mst_topology.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 81e92b260d7a..8da5d461ea01 100644 --- a/drivers/gp

[PATCH] drm/dp_mst: Remove VCPI while disabling topology mgr

2019-12-01 Thread Wayne Lin
[Why] While disabling mst topology manager in drm_dp_mst_topology_mgr_set_mst(), now just reset the mgr->payloads but doesn't handle the mgr->proposed_vcpis. [How] Remove mgr->proposed_vcpis to NULL. Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++

[PATCH V2 2/2] drm/edid: Add alternate clock for SMPTE 4K

2019-11-18 Thread Wayne Lin
to there is no more exception for VIC 4 mode. Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_edid.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 0307cad36f14..e6368c3c4471 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b

[PATCH V2 1/2] drm/edid: Add aspect ratios to HDMI 4K modes

2019-11-18 Thread Wayne Lin
VIC and HDMI_VIC by taking aspect ratio into consideration. v2: Correct missing initializer error at adding aspect ratio of SMPTE mode. Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_edid.c | 45 +- 1 file changed, 35 insertions(+), 10 deletions(-) diff

[PATCH 2/2] drm/edid: Add alternate clock for SMPTE 4K

2019-11-11 Thread Wayne Lin
[Why] In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode (4096x2160@24) due to there is no alternate clock defined for that mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. [How] Remove the exception Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_edid.c | 3 --- 1

[PATCH 1/2] drm/edid: Add aspect ratios to HDMI 4K modes

2019-11-11 Thread Wayne Lin
VIC and HDMI_VIC by taking aspect ratio into consideration. Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_edid.c | 45 +- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 77a39f

[PATCH] drm/drm_edid: correct VIC and HDMI_VIC under HDMI 2.0

2019-09-23 Thread Wayne Lin
In HDMI 1.4 defines 4k modes without specific aspect ratio. However, in HDMI 2.0, adds aspect ratio attribute to distinguish different 4k modes. According to Appendix E of HDMI 2.0 spec, source should use VSIF to indicate VIC mode only when the mode is one defined in HDMI 1.4b 4K modes. Otherwise,

[PATCH] drm/drm_connector: add additional aspect ratio values

2019-08-22 Thread Wayne Lin
to "64:27" or "256:135" after creating aspect ratio property. Change-Id: Ifc9df54e8e8f78e70960fcd737a3a57e49c81152 Signed-off-by: Wayne Lin --- drivers/gpu/drm/drm_connector.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/dr