When reading link status, the request size is 13, but this real return
size from ls1028 dp firmware is 10, they don't match with each other.
So, getting training status operation is failed, and cause the whole
display driver initializes failed. This issue is introduced by commit
7ce8d36a326e("MLK-25748: gpu: drm: bridge: Added support for
fast link training"). But the root cause is that the dp firmware of
ls1028 platform from the latest LSDK2108 does not support the fast
link training. Because NXP never upgrade the ls1028 dp firmware since
LSDK2004, it still sends 10 bytes to mhdp driver, and then cause parse
command failed. This issue also occurs since LSDK2012.
In order to work with the current dp firmware of ls1028 platform and
not affect imx series platforms, so create a special case to process
ls1028 platform.

Signed-off-by: Meng Li <meng...@windriver.com>
---
 drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c 
b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c
index 299e533d6b52..46fc27dba884 100644
--- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c
+++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp-dp.c
@@ -233,13 +233,21 @@ static int cdns_mhdp_get_training_status(struct 
cdns_mhdp_device *mhdp)
        if (ret)
                goto err_get_training_status;
 
-       ret = cdns_mhdp_mailbox_validate_receive(mhdp, MB_MODULE_ID_DP_TX,
-                                                DPTX_READ_LINK_STAT,
-                                                sizeof(status));
+       if (of_machine_is_compatible("fsl,ls1028a-rdb"))
+               ret = cdns_mhdp_mailbox_validate_receive(mhdp, 
MB_MODULE_ID_DP_TX,
+                                                       DPTX_READ_LINK_STAT,
+                                                       sizeof(status) - 3);
+       else
+               ret = cdns_mhdp_mailbox_validate_receive(mhdp, 
MB_MODULE_ID_DP_TX,
+                                                       DPTX_READ_LINK_STAT,
+                                                       sizeof(status));
        if (ret)
                goto err_get_training_status;
 
-       ret = cdns_mhdp_mailbox_read_receive(mhdp, status, sizeof(status));
+       if (of_machine_is_compatible("fsl,ls1028a-rdb"))
+               ret = cdns_mhdp_mailbox_read_receive(mhdp, status, 
sizeof(status) - 3);
+       else
+               ret = cdns_mhdp_mailbox_read_receive(mhdp, status, 
sizeof(status));
        if (ret)
                goto err_get_training_status;
 
-- 
2.36.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12440): 
https://lists.yoctoproject.org/g/linux-yocto/message/12440
Mute This Topic: https://lists.yoctoproject.org/mt/98555944/21656
Group Owner: linux-yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to