Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: igt-dev@lists.freedesktop.org, petri.latvala@intel.com,
	badal.nilawar@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t v2 3/4] test: i915_pm_rpm: conditional initialization of igt_display_t
Date: Tue, 17 May 2022 08:52:19 -0700	[thread overview]
Message-ID: <87pmkcf970.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20220511113734.27776-4-anshuman.gupta@intel.com>

On Wed, 11 May 2022 04:37:33 -0700, Anshuman Gupta wrote:
>
> Initialize igt_display_t display only in case of there are
> valid drm kms resources.
>
> v2:
> - Move igt_display_fini under the 'if (data->res)' cond. [Ashutosh]

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
>  tests/i915/i915_pm_rpm.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
> index b836656c2..a6035e60b 100644
> --- a/tests/i915/i915_pm_rpm.c
> +++ b/tests/i915/i915_pm_rpm.c
> @@ -406,9 +406,9 @@ static void init_mode_set_data(struct mode_set_data *data)
>		}
>
>		kmstest_set_vt_graphics_mode();
> +		igt_display_require(&data->display, drm_fd);
>	}
>
> -	igt_display_require(&data->display, drm_fd);
>	init_modeset_cached_params(&ms_data);
>  }
>
> @@ -420,9 +420,8 @@ static void fini_mode_set_data(struct mode_set_data *data)
>			drmModeFreePropertyBlob(data->edids[i]);
>		}
>		drmModeFreeResources(data->res);
> +		igt_display_fini(&data->display);
>	}
> -
> -	igt_display_fini(&data->display);
>  }
>
>  static void get_drm_info(struct compare_data *data)
> --
> 2.26.2
>

  reply	other threads:[~2022-05-17 15:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 11:37 [igt-dev] [PATCH i-g-t v2 0/4] RPM Test on HEADLESS Anshuman Gupta
2022-05-11 11:37 ` [igt-dev] [PATCH i-g-t v2 1/4] test: i915_pm_rpm: init devid in setup_envirnoment Anshuman Gupta
2022-05-11 11:37 ` [igt-dev] [PATCH i-g-t v2 2/4] i915_pm_rpm: %s/display_disabled/display_enabled Anshuman Gupta
2022-05-17 15:43   ` Dixit, Ashutosh
2022-05-11 11:37 ` [igt-dev] [PATCH i-g-t v2 3/4] test: i915_pm_rpm: conditional initialization of igt_display_t Anshuman Gupta
2022-05-17 15:52   ` Dixit, Ashutosh [this message]
2022-05-11 11:37 ` [igt-dev] [PATCH i-g-t v2 4/4] i915_pm_rpm: rpm resume by user forcewake Anshuman Gupta
2022-05-17 17:05   ` Dixit, Ashutosh
2022-05-18  6:28     ` Gupta, Anshuman
2022-05-11 12:17 ` [igt-dev] ✓ Fi.CI.BAT: success for RPM Test on HEADLESS (rev2) Patchwork
2022-05-11 15:39 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=87pmkcf970.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox