summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dm_helpers.h
diff options
context:
space:
mode:
authorJude Shih <shenshih@amd.com>2021-04-20 05:19:37 +0300
committerAlex Deucher <alexander.deucher@amd.com>2021-05-11 01:06:44 +0300
commit81927e2808be5adace93c2012d45d6938d3a7aa0 (patch)
tree95f90e9a665f319d77ff5700d82870673bb47949 /drivers/gpu/drm/amd/display/dc/dm_helpers.h
parent7f63d8a1ad37a481dba7e721c3510025bdb897d4 (diff)
downloadlinux-81927e2808be5adace93c2012d45d6938d3a7aa0.tar.xz
drm/amd/display: Support for DMUB AUX
[WHY] To process AUX transactions with DMUB using inbox1 and outbox1 mail boxes. [How] 1) Added inbox1 command DMUB_CMD__DP_AUX_ACCESS to issue AUX commands to DMUB in dc_process_dmub_aux_transfer_async(). DMUB processes AUX cmd with DCN and sends reply back in an outbox1 message triggering an outbox1 interrupt to driver. 2) In existing driver implementation, AUX commands are processed synchronously by configuring DCN reg. But in DMUB AUX, driver sends an inbox1 message and waits for a conditional variable (CV) which will be signaled by outbox1 ISR. 3) DM will retrieve Outbox1 message and send back reply to upper layer and complete the AUX command Signed-off-by: Jude Shih <shenshih@amd.com> Reviewed-by: Hanghong Ma <Hanghong.Ma@amd.com> Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Acked-by: Wayne Lin <Wayne.Lin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dm_helpers.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dm_helpers.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dm_helpers.h b/drivers/gpu/drm/amd/display/dc/dm_helpers.h
index 7617fab9e1f9..304d50d16d01 100644
--- a/drivers/gpu/drm/amd/display/dc/dm_helpers.h
+++ b/drivers/gpu/drm/amd/display/dc/dm_helpers.h
@@ -34,6 +34,8 @@
#include "dc.h"
struct dp_mst_stream_allocation_table;
+struct aux_payload;
+enum aux_return_code_type;
/*
* Allocate memory accessible by the GPU
@@ -158,6 +160,11 @@ void dm_set_dcn_clocks(
struct dc_context *ctx,
struct dc_clocks *clks);
-bool dm_helpers_dmub_outbox0_interrupt_control(struct dc_context *ctx, bool enable);
+bool dm_helpers_dmub_outbox_interrupt_control(struct dc_context *ctx, bool enable);
+int dm_helper_dmub_aux_transfer_sync(
+ struct dc_context *ctx,
+ const struct dc_link *link,
+ struct aux_payload *payload,
+ enum aux_return_code_type *operation_result);
#endif /* __DM_HELPERS__ */