[PATCH i-g-t v1 1/3] lib/igt_kms: Add mode restriction check for Intel scaling

Naladala, Ramanaidu Ramanaidu.naladala at intel.com
Tue Apr 8 16:47:08 UTC 2025


Hi Jeevan,

On 3/28/2025 2:21 PM, B, Jeevan wrote:
>> -----Original Message-----
>> From: igt-dev<igt-dev-bounces at lists.freedesktop.org> On Behalf Of Naladala
>> Ramanaidu
>> Sent: Friday, March 28, 2025 2:23 AM
>> To:igt-dev at lists.freedesktop.org
>> Cc: Sharma, Swati2<swati2.sharma at intel.com>; Naladala, Ramanaidu
>> <ramanaidu.naladala at intel.com>
>> Subject: [PATCH i-g-t v1 1/3] lib/igt_kms: Add mode restriction check for Intel
>> scaling
>>
>> Add function to verify display mode parameters (horizontal resolution, vertical
>> resolution, refresh rate) within 4K limits for scaling operation.
>>
>> Signed-off-by: Naladala Ramanaidu<ramanaidu.naladala at intel.com>
>> ---
>>   lib/igt_kms.c | 23 +++++++++++++++++++++++  lib/igt_kms.h |  1 +
>>   2 files changed, 24 insertions(+)
>>
>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 99c8707c7..332f6dbf3 100644
>> --- a/lib/igt_kms.c
>> +++ b/lib/igt_kms.c
>> @@ -93,6 +93,10 @@
>>   #define MAX_EDID 2
>>   #define DISPLAY_TILE_BLOCK 0x12
>>
>> +#define HDISPLAY_SCALING_MAX 3840
>> +#define VDISPLAY_SCALING_MAX 2160
>> +#define VREFRESH_SCALING_MAX 60
> Can you please mention the spec number or Kernel patch where we have this restrictions mentioned ?
As per Bspec: 49199 Pipe scalers maximum horizontal source size 4096 
pixels.
>
>> +
>>   typedef bool (*igt_connector_attr_set)(int dir, const char *attr, const char
>> *value);
>>
>>   struct igt_connector_attr {
>> @@ -6998,6 +7002,25 @@ int get_num_scalers(igt_display_t *display, enum pipe
>> pipe)
>>   	return num_scalers;
>>   }
>>
>> +/**
>> + * is_intel_support_scaling:
>> + * @drmModeModeInfo *mode: Pointer to a structure with display mode
>> information.
>> + *
>> + * Finds the display mode's horizontal resolution, vertical resolution,
>> +and refresh
>> + * rate are within the specified maximum limits.
>> + *
>> + * Returns: true on success, false  on failure  */ bool
>> +is_intel_support_scaling(drmModeModeInfo *mode) {
>> +	if ((mode->hdisplay <= HDISPLAY_SCALING_MAX) &&
>> +	    (mode->vdisplay <= VDISPLAY_SCALING_MAX) &&
>> +	    (mode->vrefresh <= VREFRESH_SCALING_MAX))
>> +		return true;
>> +
>> +	return false;
>> +}
>> +
>>   /**
>>    * igt_parse_marked_value:
>>    * @buf: Buffer containing the content to parse diff --git a/lib/igt_kms.h
>> b/lib/igt_kms.h index 0381c82ad..0e3d1297d 100644
>> --- a/lib/igt_kms.h
>> +++ b/lib/igt_kms.h
>> @@ -1279,5 +1279,6 @@ void igt_set_link_params(int drm_fd, igt_output_t
>> *output,
>>   			   char *link_rate, char *lane_count);  int
>> igt_backlight_read(int *result, const char *fname, igt_backlight_context_t
>> *context);  int igt_backlight_write(int value, const char *fname,
>> igt_backlight_context_t *context);
>> +bool is_intel_support_scaling(drmModeModeInfo *mode);
>>
>>   #endif /* __IGT_KMS_H__ */
>> --
>> 2.43.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20250408/87254319/attachment.htm>


More information about the igt-dev mailing list