From: "Souza, Jose" <jose.souza@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"Gupta, Anshuman" <anshuman.gupta@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t v2 1/2] tests/i915_pm_dc: Dump power_domain_info on DC test failures
Date: Wed, 26 Feb 2020 20:31:40 +0000 [thread overview]
Message-ID: <e86bc01ee9b5818bf37a778df8e34a3bd393ce9d.camel@intel.com> (raw)
In-Reply-To: <9723755767ba53a4858bae8904f2b42114971d3b.camel@intel.com>
On Thu, 2020-02-20 at 21:25 +0000, Souza, Jose wrote:
> On Thu, 2020-02-20 at 18:30 +0530, Anshuman Gupta wrote:
> > Dump i915_power_domain_info debugfs attribute on DC state
> > test failures, it will help to identify culprit, which
> > causes non zero refcount for "DC off" power well.
> >
> > v2:
> > - Fix the mem leak. [Jose]
> >
> > Cc: Animesh Manna <animesh.manna@intel.com>
> > Cc: José Roberto de Souza <jose.souza@intel.com>
> > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> > ---
> > tests/i915/i915_pm_dc.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
> > index afcc10bc..fc6faa16 100644
> > --- a/tests/i915/i915_pm_dc.c
> > +++ b/tests/i915/i915_pm_dc.c
> > @@ -39,6 +39,10 @@
> > #define CHECK_DC6 (1 << 1)
> > #define CHECK_DC3CO (1 << 2)
> >
> > +#define PWR_DOMAIN_INFO "i915_power_domain_info"
> > +
> > +char *pwr_dmn_info;
>
> not sure about this global variable but I also can't think in a
> better
> solution, Animesh any idea?
pass data_t to check_dc_counter() replacing debugfs_fd and move
pwr_dmn_info to data_t.
With that:
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
>
> > +
> > typedef struct {
> > double r, g, b;
> > } color_t;
> > @@ -210,7 +214,8 @@ static void check_dc_counter(int debugfs_fd,
> > int
> > dc_flag, uint32_t prev_dc_count
> > snprintf(tmp, sizeof(tmp), "%s", dc_flag & CHECK_DC3CO ?
> > "DC3CO" :
> > (dc_flag & CHECK_DC5 ? "DC5" : "DC6"));
> > igt_assert_f(dc_state_wait_entry(debugfs_fd, dc_flag,
> > prev_dc_count),
> > - "%s state is not achieved\n", tmp);
> > + "%s state is not achieved\n%s:\n%s\n", tmp,
> > PWR_DOMAIN_INFO,
> > + pwr_dmn_info = igt_sysfs_get(debugfs_fd,
> > PWR_DOMAIN_INFO));
> > }
> >
> > static void setup_videoplayback(data_t *data)
> > @@ -441,6 +446,8 @@ int main(int argc, char *argv[])
> > }
> >
> > igt_fixture {
> > + if (pwr_dmn_info)
> > + free(pwr_dmn_info);
>
> nitpick: free() handles NULL, no need of the check here.
>
> > close(data.debugfs_fd);
> > close(data.msr_fd);
> > display_fini(&data);
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-02-26 20:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 13:00 [igt-dev] [PATCH i-g-t v2 0/2] DC states IGT misc Anshuman Gupta
2020-02-20 13:00 ` [igt-dev] [PATCH i-g-t v2 1/2] tests/i915_pm_dc: Dump power_domain_info on DC test failures Anshuman Gupta
2020-02-20 21:25 ` Souza, Jose
2020-02-26 20:31 ` Souza, Jose [this message]
2020-02-20 13:00 ` [igt-dev] [PATCH i-g-t v2 2/2] tests/i915_pm_dc: psr required only for dc*-psr tests Anshuman Gupta
2020-02-20 21:13 ` Souza, Jose
2020-02-20 14:18 ` [igt-dev] ✓ Fi.CI.BAT: success for DC states IGT misc (rev3) Patchwork
2020-02-22 16:54 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e86bc01ee9b5818bf37a778df8e34a3bd393ce9d.camel@intel.com \
--to=jose.souza@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.