From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D1CA10E542 for ; Wed, 15 Nov 2023 11:07:32 +0000 (UTC) Date: Wed, 15 Nov 2023 13:07:28 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Bhanuprakash Modem Message-ID: References: <20231115090605.1506704-1-bhanuprakash.modem@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231115090605.1506704-1-bhanuprakash.modem@intel.com> Subject: Re: [igt-dev] [i-g-t] lib/igt_kms: Don't read max dotclock on non-display platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Wed, Nov 15, 2023 at 02:36:05PM +0530, Bhanuprakash Modem wrote: > On non-display platforms, there is no point in checking for > max dotclock. > > Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/9672 > Cc: Ville Syrjälä > Signed-off-by: Bhanuprakash Modem > --- > lib/igt_kms.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/igt_kms.c b/lib/igt_kms.c > index 89510ff22..2073fae53 100644 > --- a/lib/igt_kms.c > +++ b/lib/igt_kms.c > @@ -6056,7 +6056,8 @@ int igt_get_max_dotclock(int fd) > char *s; > int dir, res, max_dotclock = 0; > > - if (!is_intel_device(fd)) > + /* If there is no display, then no point to check for dotclock. */ > + if (!is_intel_device(fd) || !drmModeGetResources(fd)) That will leak. > return max_dotclock; > > dir = igt_debugfs_dir(fd); > -- > 2.40.0 -- Ville Syrjälä Intel