[igt-dev] [PATCH i-g-t v2] tests/kms_content_protection: check i915 and generic debugfs name for HDCP caps

Harry Wentland hwentlan at amd.com
Wed Oct 23 14:18:13 UTC 2019


On 2019-10-21 3:42 p.m., Bhawanpreet Lakha wrote:
> The content protection tests only start if this debugfs entry exists.
> Since the name is specific to intel driver these tests cannot be used with
> other drivers. So we should check generic debugfs name also
> 
> v2: Check i915_* if device is i915, otherwise check the generic name.
> 
> Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>

Reviewed-by: Harry Wentland <harry.wentland at amd.com>

Harry

> ---
>  tests/kms_content_protection.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> index e676b60b..42fdc459 100644
> --- a/tests/kms_content_protection.c
> +++ b/tests/kms_content_protection.c
> @@ -554,7 +554,11 @@ static bool sink_hdcp_capable(igt_output_t *output)
>  	if (fd < 0)
>  		return false;
>  
> -	debugfs_read(fd, "i915_hdcp_sink_capability", buf);
> +	if (is_i915_device(data.drm_fd))
> +		debugfs_read(fd, "i915_hdcp_sink_capability", buf);
> +	else
> +		debugfs_read(fd, "hdcp_sink_capability", buf);
> +
>  	close(fd);
>  
>  	igt_debug("Sink capability: %s\n", buf);
> @@ -571,7 +575,11 @@ static bool sink_hdcp2_capable(igt_output_t *output)
>  	if (fd < 0)
>  		return false;
>  
> -	debugfs_read(fd, "i915_hdcp_sink_capability", buf);
> +	if (is_i915_device(data.drm_fd))
> +		debugfs_read(fd, "i915_hdcp_sink_capability", buf);
> +	else
> +		debugfs_read(fd, "hdcp_sink_capability", buf);
> +
>  	close(fd);
>  
>  	igt_debug("Sink capability: %s\n", buf);
> 


More information about the igt-dev mailing list