[igt-dev] [i-g-t] lib/igt_kms: Don't read max dotclock on non-display platforms

Modem, Bhanuprakash bhanuprakash.modem at intel.com
Wed Nov 15 12:01:47 UTC 2023


On Wed-15-11-2023 04:37 pm, Ville Syrjälä wrote:
> 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ä <ville.syrjala at linux.intel.com>
>> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
>> ---
>>   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.

I'm really sorry I couldn't get you. Can you elaborate, please? :-)

- Bhanu

> 
>>   		return max_dotclock;
>>   
>>   	dir = igt_debugfs_dir(fd);
>> -- 
>> 2.40.0
> 


More information about the igt-dev mailing list