mirror of
https://github.com/torvalds/linux.git
synced 2026-04-28 03:22:27 -04:00
drm/amd/display: Add Support for reg inbox0 for host->DMUB CMDs
[WHY] DCN4+ supports a new register based mailbox for sending messages from host to DMCUB. This mailbox supports 64 byte commands, which makes it compatible with the same structure as the frame buffer based mailbox. [HOW] The intention for reg_inbox0 is to be slot in replacement for the frame buffer based mailbox (Inbox1). It supports all of the required features: - Supports all messages handled by FB Inbox1 - Supports multi command batching Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Dillon Varone <Dillon.Varone@amd.com> Signed-off-by: Fangzhi Zuo <jerry.zuo@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
4b884e3f03
commit
a3b7dc4a1e
@@ -5993,6 +5993,9 @@ static inline uint32_t dmub_rb_num_free(struct dmub_rb *rb)
|
||||
else
|
||||
data_count = rb->capacity - (rb->rptr - rb->wrpt);
|
||||
|
||||
/* +1 because 1 entry is always unusable */
|
||||
data_count += DMUB_RB_CMD_SIZE;
|
||||
|
||||
return (rb->capacity - data_count) / DMUB_RB_CMD_SIZE;
|
||||
}
|
||||
|
||||
@@ -6012,6 +6015,7 @@ static inline bool dmub_rb_full(struct dmub_rb *rb)
|
||||
else
|
||||
data_count = rb->capacity - (rb->rptr - rb->wrpt);
|
||||
|
||||
/* -1 because 1 entry is always unusable */
|
||||
return (data_count == (rb->capacity - DMUB_RB_CMD_SIZE));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user