[igt-dev] [PATCH i-g-t v3 4/4] i915_pm_rpm: rpm resume by user forcewake

Dixit, Ashutosh ashutosh.dixit at intel.com
Wed May 18 20:02:11 UTC 2022


On Wed, 18 May 2022 09:54:54 -0700, Anshuman Gupta wrote:
>

Hi Anshuman,

> +static void
> +enable_one_screen_or_forcewake_get_and_wait(struct mode_set_data *data)
> +{
> +	bool headless;
> +
> +	/* Try to resume by enabling any type of display */
> +	headless = !enable_one_screen_with_type(data, SCREEN_TYPE_ANY);
> +
> +	/*
> +	 * Get User Forcewake to trigger rpm resume in case of headless
> +	 * as well as no display being connected.
> +	 */
> +	if (headless) {
> +		data->fw_fd = igt_open_forcewake_handle(drm_fd);
> +		igt_require(data->fw_fd > 0);
> +	}
> +	igt_assert(wait_for_active());
> +}
> +
> +static void clear_forcewake(struct mode_set_data *data)

I was trying to merge this as is but because of other things that went in
meanwhile this patch doesn't apply now. Could you please quickly re-spin
it?

Also, I was going to merge it anyway, but since we are respinning maybe
s/clear_forcewake/forcewake_put/ since we have now changed the naming for
these functions?

Thanks.
--
Ashutosh

> +{
> +	if (data->fw_fd <= 0)
> +		return;
> +
> +	data->fw_fd = close(data->fw_fd);
> +	igt_assert_eq(data->fw_fd, 0);
> +}
> +
> +static void
> +disable_all_screens_or_forcewake_put_and_wait(struct mode_set_data *data)
> +{
> +	clear_forcewake(data);
> +	disable_all_screens(data);
> +	igt_assert(wait_for_suspended());
> +}


More information about the igt-dev mailing list