Commit 10406abe authored by Mario Limonciello's avatar Mario Limonciello Committed by Alex Deucher

drm/amd/display: make dc_set_power_state() return type `void` again

As dc_set_power_state() no longer allocates memory, it's not necessary
to have return types and check return code as it can't fail anymore.

Change it back to `void`.
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 06ad7e16
...@@ -2667,11 +2667,6 @@ static void hpd_rx_irq_work_suspend(struct amdgpu_display_manager *dm) ...@@ -2667,11 +2667,6 @@ static void hpd_rx_irq_work_suspend(struct amdgpu_display_manager *dm)
} }
} }
static int dm_set_power_state(struct dc *dc, enum dc_acpi_cm_power_state power_state)
{
return dc_set_power_state(dc, power_state) ? 0 : -ENOMEM;
}
static int dm_suspend(void *handle) static int dm_suspend(void *handle)
{ {
struct amdgpu_device *adev = handle; struct amdgpu_device *adev = handle;
...@@ -2707,7 +2702,9 @@ static int dm_suspend(void *handle) ...@@ -2707,7 +2702,9 @@ static int dm_suspend(void *handle)
hpd_rx_irq_work_suspend(dm); hpd_rx_irq_work_suspend(dm);
return dm_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D3); dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D3);
return 0;
} }
struct drm_connector * struct drm_connector *
...@@ -2901,9 +2898,7 @@ static int dm_resume(void *handle) ...@@ -2901,9 +2898,7 @@ static int dm_resume(void *handle)
if (r) if (r)
DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r); DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r);
r = dm_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0); dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0);
if (r)
return r;
dc_resume(dm->dc); dc_resume(dm->dc);
...@@ -2953,9 +2948,7 @@ static int dm_resume(void *handle) ...@@ -2953,9 +2948,7 @@ static int dm_resume(void *handle)
} }
/* power on hardware */ /* power on hardware */
r = dm_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0); dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D0);
if (r)
return r;
/* program HPD filter */ /* program HPD filter */
dc_resume(dm->dc); dc_resume(dm->dc);
......
...@@ -4777,12 +4777,12 @@ void dc_power_down_on_boot(struct dc *dc) ...@@ -4777,12 +4777,12 @@ void dc_power_down_on_boot(struct dc *dc)
dc->hwss.power_down_on_boot(dc); dc->hwss.power_down_on_boot(dc);
} }
bool dc_set_power_state( void dc_set_power_state(
struct dc *dc, struct dc *dc,
enum dc_acpi_cm_power_state power_state) enum dc_acpi_cm_power_state power_state)
{ {
if (!dc->current_state) if (!dc->current_state)
return true; return;
switch (power_state) { switch (power_state) {
case DC_ACPI_CM_POWER_STATE_D0: case DC_ACPI_CM_POWER_STATE_D0:
...@@ -4805,8 +4805,6 @@ bool dc_set_power_state( ...@@ -4805,8 +4805,6 @@ bool dc_set_power_state(
break; break;
} }
return true;
} }
void dc_resume(struct dc *dc) void dc_resume(struct dc *dc)
......
...@@ -2294,7 +2294,7 @@ void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bo ...@@ -2294,7 +2294,7 @@ void dc_notify_vsync_int_state(struct dc *dc, struct dc_stream_state *stream, bo
/* Power Interfaces */ /* Power Interfaces */
bool dc_set_power_state( void dc_set_power_state(
struct dc *dc, struct dc *dc,
enum dc_acpi_cm_power_state power_state); enum dc_acpi_cm_power_state power_state);
void dc_resume(struct dc *dc); void dc_resume(struct dc *dc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment