From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFEF810E143 for ; Mon, 23 Oct 2023 04:53:27 +0000 (UTC) Message-ID: Date: Mon, 23 Oct 2023 10:23:22 +0530 MIME-Version: 1.0 Content-Language: en-US To: Lee Shawn C , igt-dev@lists.freedesktop.org References: <20231022135416.1868389-1-shawn.c.lee@intel.com> From: "Sharma, Swati2" In-Reply-To: <20231022135416.1868389-1-shawn.c.lee@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [igt-dev] [PATCH] lib/i915/drrs: close file handler after update DRRS setting List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: LGTM Reviewed-by: Swati Sharma On 22-Oct-23 7:24 PM, Lee Shawn C wrote: > After configure DRRS status, test tool has to release file handler > properly to avoid unexpected problem. > > Cc: Tvrtko Ursulin > Cc: Vidya Srinivas > Cc: Juha-Pekka Heikkila > Cc: Jouni Högander > Signed-off-by: Lee Shawn C > --- > lib/i915/intel_drrs.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/i915/intel_drrs.c b/lib/i915/intel_drrs.c > index 2f83e1394a61..deaec90d3f59 100644 > --- a/lib/i915/intel_drrs.c > +++ b/lib/i915/intel_drrs.c > @@ -69,6 +69,7 @@ static void drrs_set(int device, enum pipe pipe, unsigned int val) > dir = igt_debugfs_pipe_dir(device, pipe, O_DIRECTORY); > igt_require_fd(dir); > ret = igt_sysfs_write(dir, "i915_drrs_ctl", buf, sizeof(buf) - 1); > + close(dir); > > /* > * drrs_enable() is called on DRRS capable platform only,