From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 167B210E55B for ; Wed, 18 May 2022 20:02:12 +0000 (UTC) Date: Wed, 18 May 2022 13:02:11 -0700 Message-ID: <87bkvuzk1o.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Anshuman Gupta In-Reply-To: <20220518165454.17352-5-anshuman.gupta@intel.com> References: <20220518165454.17352-1-anshuman.gupta@intel.com> <20220518165454.17352-5-anshuman.gupta@intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Subject: Re: [igt-dev] [PATCH i-g-t v3 4/4] i915_pm_rpm: rpm resume by user forcewake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: petri.latvala@intel.com, Chris Wilson , igt-dev@lists.freedesktop.org, badal.nilawar@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: 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()); > +}