mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 08:12:41 -04:00
drm/amd/display: Add const to a function
When calling the dc_link_bw_kbps_from_raw_frl_link_rate_data from amdgpu_dm, GCC highlighted the following issue: In function ‘get_conv_frl_bw’: error: passing argument 1 of ‘dc_link_bw_kbps_from_raw_frl_link_rate_data’ discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 997 | aconnector->dc_link->dc, This commit fix this issue by making DC a constant variable since we only use it to invoke the function bw_kbps_from_raw_frl_link_rate_data(). Reviewed-by: Chris Park <Chris.Park@amd.com> Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com> Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@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
28e5c9d601
commit
c964b86e32
@@ -285,8 +285,7 @@ int dc_link_aux_transfer_raw(struct ddc_service *ddc,
|
||||
ddc, payload, operation_result);
|
||||
}
|
||||
|
||||
uint32_t dc_link_bw_kbps_from_raw_frl_link_rate_data(
|
||||
struct dc *dc, uint8_t bw)
|
||||
uint32_t dc_link_bw_kbps_from_raw_frl_link_rate_data(const struct dc *dc, uint8_t bw)
|
||||
{
|
||||
return dc->link_srv->bw_kbps_from_raw_frl_link_rate_data(bw);
|
||||
}
|
||||
|
||||
@@ -1768,8 +1768,7 @@ void dc_restore_link_res_map(const struct dc *dc, uint32_t *map);
|
||||
bool dc_link_update_dsc_config(struct pipe_ctx *pipe_ctx);
|
||||
|
||||
/* translate a raw link rate data to bandwidth in kbps */
|
||||
uint32_t dc_link_bw_kbps_from_raw_frl_link_rate_data(
|
||||
struct dc *dc, uint8_t bw);
|
||||
uint32_t dc_link_bw_kbps_from_raw_frl_link_rate_data(const struct dc *dc, uint8_t bw);
|
||||
|
||||
/* determine the optimal bandwidth given link and required bw.
|
||||
* @link - current detected link
|
||||
|
||||
Reference in New Issue
Block a user