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

Imre Deak imre.deak at intel.com
Tue Sep 3 14:29:11 UTC 2024


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).

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


More information about the igt-dev mailing list