mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
drm/amd/display: Add return code instead of boolean for future use
Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com> Reviewed-by: Mikita Lipski <Mikita.Lipski@amd.com> Acked-by: Anson Jacob <Anson.Jacob@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
27859ee3df
commit
bd0c064c16
1 changed files with 4 additions and 4 deletions
|
@ -526,11 +526,11 @@ bool dm_helpers_submit_i2c(
|
||||||
bool dm_helpers_dp_write_dsc_enable(
|
bool dm_helpers_dp_write_dsc_enable(
|
||||||
struct dc_context *ctx,
|
struct dc_context *ctx,
|
||||||
const struct dc_stream_state *stream,
|
const struct dc_stream_state *stream,
|
||||||
bool enable
|
bool enable)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
uint8_t enable_dsc = enable ? 1 : 0;
|
uint8_t enable_dsc = enable ? 1 : 0;
|
||||||
struct amdgpu_dm_connector *aconnector;
|
struct amdgpu_dm_connector *aconnector;
|
||||||
|
uint8_t ret;
|
||||||
|
|
||||||
if (!stream)
|
if (!stream)
|
||||||
return false;
|
return false;
|
||||||
|
@ -541,13 +541,13 @@ bool dm_helpers_dp_write_dsc_enable(
|
||||||
if (!aconnector->dsc_aux)
|
if (!aconnector->dsc_aux)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return (drm_dp_dpcd_write(aconnector->dsc_aux, DP_DSC_ENABLE, &enable_dsc, 1) >= 0);
|
ret = drm_dp_dpcd_write(aconnector->dsc_aux, DP_DSC_ENABLE, &enable_dsc, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT)
|
if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT)
|
||||||
return dm_helpers_dp_write_dpcd(ctx, stream->link, DP_DSC_ENABLE, &enable_dsc, 1);
|
return dm_helpers_dp_write_dpcd(ctx, stream->link, DP_DSC_ENABLE, &enable_dsc, 1);
|
||||||
|
|
||||||
return false;
|
return (ret > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dm_helpers_is_dp_sink_present(struct dc_link *link)
|
bool dm_helpers_is_dp_sink_present(struct dc_link *link)
|
||||||
|
|
Loading…
Reference in a new issue