> -----Original Message-----
> From: Tauro, Riana <riana.ta...@intel.com>
> Sent: Wednesday, April 5, 2023 11:30 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: Tauro, Riana <riana.ta...@intel.com>; Gupta, Anshuman
> <anshuman.gu...@intel.com>; Dixit, Ashutosh <ashutosh.di...@intel.com>;
> Tangudu, Tilak <tilak.tang...@intel.com>; Nilawar, Badal
> <badal.nila...@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.gu...@intel.com>
> 
> TODO : measure power of GT in discrete graphics and modify the condition.
> 
> Signed-off-by: Riana Tauro <riana.ta...@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

Reply via email to