diff options
author | Mustapha Ghaddar <mghaddar@amd.com> | 2022-12-07 14:01:36 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-01-13 14:56:15 -0500 |
commit | 857aa2beda3789a36de8b0c1beb6104f3e377ab2 (patch) | |
tree | 7148f38757bfc82c851b5292e6c973edc0840277 /drivers/gpu/drm/amd/display/dmub/src | |
parent | 6b8701be1f66064ca72733c5f6e13748cdbf8397 (diff) | |
download | linux-857aa2beda3789a36de8b0c1beb6104f3e377ab2.tar.gz linux-857aa2beda3789a36de8b0c1beb6104f3e377ab2.tar.bz2 linux-857aa2beda3789a36de8b0c1beb6104f3e377ab2.zip |
drm/amd/display: Update BW alloc after new DMUB logic
[WHY]
After introducing new DPIA NOTIFICATION we will need
to update the exiting BW allocation logic
[HOW]
Updated the BW alloc source and header files
Tested-by: Daniel Wheeler <Daniel.Wheeler@amd.com>
Reviewed-by: Meenakshikumar Somasundaram <Meenakshikumar.Somasundaram@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Mustapha Ghaddar <mghaddar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dmub/src')
-rw-r--r-- | drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c index 55a534ec0794..4948f9724db2 100644 --- a/drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c +++ b/drivers/gpu/drm/amd/display/dmub/src/dmub_srv_stat.c @@ -98,19 +98,19 @@ enum dmub_status dmub_srv_stat_get_notification(struct dmub_srv *dmub, if (cmd.dpia_notify.payload.header.type == DPIA_NOTIFY__BW_ALLOCATION) { - if (cmd.dpia_notify.payload.data.dpia_bw_alloc.bits.bw_request_failed) { + notify->bw_alloc_reply.estimated_bw = + cmd.dpia_notify.payload.data.dpia_bw_alloc.estimated_bw; + notify->bw_alloc_reply.allocated_bw = + cmd.dpia_notify.payload.data.dpia_bw_alloc.allocated_bw; + + if (cmd.dpia_notify.payload.data.dpia_bw_alloc.bits.bw_request_failed) notify->result = DPIA_BW_REQ_FAILED; - } else if (cmd.dpia_notify.payload.data.dpia_bw_alloc.bits.bw_request_succeeded) { + else if (cmd.dpia_notify.payload.data.dpia_bw_alloc.bits.bw_request_succeeded) notify->result = DPIA_BW_REQ_SUCCESS; - notify->bw_alloc_reply.allocated_bw = - cmd.dpia_notify.payload.data.dpia_bw_alloc.allocated_bw; - } else if (cmd.dpia_notify.payload.data.dpia_bw_alloc.bits.est_bw_changed) { + else if (cmd.dpia_notify.payload.data.dpia_bw_alloc.bits.est_bw_changed) notify->result = DPIA_EST_BW_CHANGED; - notify->bw_alloc_reply.estimated_bw = - cmd.dpia_notify.payload.data.dpia_bw_alloc.estimated_bw; - } else if (cmd.dpia_notify.payload.data.dpia_bw_alloc.bits.bw_alloc_cap_changed) { + else if (cmd.dpia_notify.payload.data.dpia_bw_alloc.bits.bw_alloc_cap_changed) notify->result = DPIA_BW_ALLOC_CAPS_CHANGED; - } } break; default: |