diff mbox series

[v8,4/4] drm/i915/selftests: skip comparison of power for discrete graphics

Message ID 20230405060029.3574262-5-riana.tauro@intel.com (mailing list archive)
State New, archived
Headers show
Series Add hwmon support for dgfx selftests | expand

Commit Message

Riana Tauro April 5, 2023, 6 a.m. UTC
skip comparison of power for discrete graphics

TODO : measure power of GT in discrete graphics and modify the
condition.

Signed-off-by: Riana Tauro <riana.tauro@intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_rc6.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Gupta, Anshuman April 5, 2023, 6:12 a.m. UTC | #1
> -----Original Message-----
> From: Tauro, Riana <riana.tauro@intel.com>
> Sent: Wednesday, April 5, 2023 11:30 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: Tauro, Riana <riana.tauro@intel.com>; Gupta, Anshuman
> <anshuman.gupta@intel.com>; Dixit, Ashutosh <ashutosh.dixit@intel.com>;
> Tangudu, Tilak <tilak.tangudu@intel.com>; Nilawar, Badal
> <badal.nilawar@intel.com>
> Subject: [PATCH v8 4/4] drm/i915/selftests: skip comparison of power for
> discrete graphics
> 
> skip comparison of power for discrete graphics
We need to specify the reason for doing so.
Hwmon read the energy/power consumed by discrete soc, which essentially means
There are other non-gfx discrete devices will draw power same will be reported by
Hwmon interface. This test uses power consumed by GPU to validate the RC6 
Power Consumption.

With that : 
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
> 
> TODO : measure power of GT in discrete graphics and modify the condition.
> 
> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/selftest_rc6.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/selftest_rc6.c
> b/drivers/gpu/drm/i915/gt/selftest_rc6.c
> index 682f2fe67b3a..57c0cb4ecc88 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_rc6.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_rc6.c
> @@ -107,7 +107,13 @@ int live_rc6_manual(void *arg)
>  				      ktime_to_ns(dt));
>  		pr_info("GPU consumed %llduW in RC0 and %llduW in
> RC6\n",
>  			rc0_power, rc6_power);
> -		if (2 * rc6_power > rc0_power) {
> +
> +		/*
> +		 * Condition valid for integrated graphics
> +		 * TODO : Measure power of GT for discrete graphics and
> +		 * modify the condition
> +		 */
> +		if (!IS_DGFX(gt->i915) && (2 * rc6_power > rc0_power)) {
>  			pr_err("GPU leaked energy while in RC6!\n");
>  			err = -EINVAL;
>  			goto out_unlock;
> --
> 2.40.0
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/selftest_rc6.c b/drivers/gpu/drm/i915/gt/selftest_rc6.c
index 682f2fe67b3a..57c0cb4ecc88 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rc6.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rc6.c
@@ -107,7 +107,13 @@  int live_rc6_manual(void *arg)
 				      ktime_to_ns(dt));
 		pr_info("GPU consumed %llduW in RC0 and %llduW in RC6\n",
 			rc0_power, rc6_power);
-		if (2 * rc6_power > rc0_power) {
+
+		/*
+		 * Condition valid for integrated graphics
+		 * TODO : Measure power of GT for discrete graphics and
+		 * modify the condition
+		 */
+		if (!IS_DGFX(gt->i915) && (2 * rc6_power > rc0_power)) {
 			pr_err("GPU leaked energy while in RC6!\n");
 			err = -EINVAL;
 			goto out_unlock;