[PATCH i-g-t 12/14] lib/igt_kms: allow set and reset value to be same

Joshi, Kunal1 kunal1.joshi at intel.com
Thu Sep 12 06:03:05 UTC 2024


Hello Imre,

-----Original Message-----
From: Deak, Imre <imre.deak at intel.com> 
Sent: Tuesday, September 3, 2024 7:59 PM
To: Joshi, Kunal1 <kunal1.joshi at intel.com>
Cc: igt-dev at lists.freedesktop.org
Subject: Re: [PATCH i-g-t 12/14] lib/igt_kms: allow set and reset value to be same

On Mon, Aug 26, 2024 at 01:36:10AM +0530, Kunal Joshi wrote:
> allow set and reset value to be same, let the caller handle this 
> scenario instead.
> 
> example scenario where this is required.
> i915_dp_force_link_rate should be auto before starting test should be 
> auto at exit
> 
> Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
> ---
>  lib/igt_kms.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c index b7511ccfc..5427a849e 
> 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1572,9 +1572,6 @@ static bool connector_attr_set(int idx, drmModeConnector *connector,
>  		return false;
>  	}
>  
> -	if (!strcmp(c->value, c->reset_value))
> -		connector_attr_free(c);
> -

But it's not handled now by the caller. I agree it's better to keep the behavior for existing users, maybe adding a separate function for this (named *force_reset() or similar).
----------------------------------------------------------------------------------------------
Will add parameter to allow similar set and reset_value if allow_eqaul_set_reset is true
And handle this wherever we have used this.

Thanks and Regards
Kunal Joshi

>  	return true;
>  }
>  
> --
> 2.34.1
> 


More information about the igt-dev mailing list