diff mbox

[1/2] drm/amd/powerplay: fix pp_dpm_get_current_power_state()

Message ID 20170403184147.GA22462@mwanda (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Carpenter April 3, 2017, 6:41 p.m. UTC
This switch statement is missing breaks.

Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Alex Deucher April 3, 2017, 8:28 p.m. UTC | #1
On Mon, Apr 3, 2017 at 2:41 PM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> This switch statement is missing breaks.
>
> Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.  thanks!

>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index dfd4fe6f0578..260b732be7c3 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -539,10 +539,13 @@ static enum amd_pm_state_type pp_dpm_get_current_power_state(void *handle)
>         switch (state->classification.ui_label) {
>         case PP_StateUILabel_Battery:
>                 pm_type = POWER_STATE_TYPE_BATTERY;
> +               break;
>         case PP_StateUILabel_Balanced:
>                 pm_type = POWER_STATE_TYPE_BALANCED;
> +               break;
>         case PP_StateUILabel_Performance:
>                 pm_type = POWER_STATE_TYPE_PERFORMANCE;
> +               break;
>         default:
>                 if (state->classification.flags & PP_StateClassificationFlag_Boot)
>                         pm_type = POWER_STATE_TYPE_INTERNAL_BOOT;
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index dfd4fe6f0578..260b732be7c3 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -539,10 +539,13 @@  static enum amd_pm_state_type pp_dpm_get_current_power_state(void *handle)
 	switch (state->classification.ui_label) {
 	case PP_StateUILabel_Battery:
 		pm_type = POWER_STATE_TYPE_BATTERY;
+		break;
 	case PP_StateUILabel_Balanced:
 		pm_type = POWER_STATE_TYPE_BALANCED;
+		break;
 	case PP_StateUILabel_Performance:
 		pm_type = POWER_STATE_TYPE_PERFORMANCE;
+		break;
 	default:
 		if (state->classification.flags & PP_StateClassificationFlag_Boot)
 			pm_type = POWER_STATE_TYPE_INTERNAL_BOOT;