tools/power/x86/intel-speed-select: Display error for invalid priority type
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 5 Mar 2020 22:45:25 +0000 (14:45 -0800)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 20 Mar 2020 12:46:21 +0000 (14:46 +0200)
When priority type for core-power enable command is anything more than 1
display error before change to 1, which is ordered priority.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
tools/power/x86/intel-speed-select/isst-core.c

index 732d9a5eacf1e429f8fc5dadb6cdb3f62199290b..f69c009ef6f6afa2d0056b9edbaeb5108cde8a08 100644 (file)
@@ -897,6 +897,9 @@ int isst_pm_qos_config(int cpu, int enable_clos, int priority_type)
        else
                req = req & ~BIT(1);
 
+       if (priority_type > 1)
+               fprintf(stderr, "Invalid priority type: Changing type to ordered\n");
+
        if (priority_type)
                req = req | BIT(2);
        else