Thread (24 messages) 24 messages, 6 authors, 2025-06-07

Re: [PATCH v20 2/9] drm: bridge: cadence: Update mhdp8546 mailbox access functions

From: Dmitry Baryshkov <hidden>
Date: 2024-12-17 11:07:51
Also in: dri-devel, linux-devicetree, linux-phy, lkml

On Tue, Dec 17, 2024 at 02:51:44PM +0800, Sandor Yu wrote:
Basic mailbox access functions are removed, they are replaced by
mailbox helper functions:
- cdns_mhdp_mailbox_send()
- cdns_mhdp_mailbox_send_recv()
- cdns_mhdp_mailbox_send_recv_multi()
- cdns_mhdp_secure_mailbox_send()
- cdns_mhdp_secure_mailbox_send_recv()
- cdns_mhdp_secure_mailbox_send_recv_multi()

All MHDP commands that need to be passed through the mailbox
have been rewritten using these new helper functions.

Signed-off-by: Sandor Yu <redacted>
---
v19->v20:
- remove mhdp helper functions from the patch.

v18->v19:
- Use guard(mutex)
- Add kerneldocs for all new APIs.
- Detail comments for mailbox access specific case.
- Remove cdns_mhdp_dp_reg_write() because it is not needed by driver now.

v17->v18:
- Create three ordinary mailbox access APIs
    cdns_mhdp_mailbox_send
    cdns_mhdp_mailbox_send_recv
    cdns_mhdp_mailbox_send_recv_multi
- Create three secure mailbox access APIs
    cdns_mhdp_secure_mailbox_send
    cdns_mhdp_secure_mailbox_send_recv
    cdns_mhdp_secure_mailbox_send_recv_multi
- MHDP8546 DP and HDCP commands that need access mailbox are rewrited
  with above 6 API functions.

v16->v17:
- Replaces the local mutex mbox_mutex with a global mutex mhdp_mailbox_mutex

v12->v16:
 *No change.

 drivers/gpu/drm/bridge/cadence/Kconfig        |   1 +
 .../drm/bridge/cadence/cdns-mhdp8546-core.c   | 487 +++---------------
 .../drm/bridge/cadence/cdns-mhdp8546-core.h   |  47 +-
 .../drm/bridge/cadence/cdns-mhdp8546-hdcp.c   | 212 +-------
 .../drm/bridge/cadence/cdns-mhdp8546-hdcp.h   |  18 +-
 5 files changed, 104 insertions(+), 661 deletions(-)
Reviewed-by: Dmitry Baryshkov <redacted>

-- 
With best wishes
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help