Re: [RFC 1/5] drm: Add HDMI 2.0+ features exposing knob

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 22, 2017 at 05:35:57PM +0000, Jose Abreu wrote:
> We can't expect userspace to have full support for all HDMI 2.0+
> features. Instead of expecting/waiting for userspace to support
> the new features add a knob, much like the stereo knob, so that
> DRM core will only expose the features when asked too.
> 
> Signed-off-by: Jose Abreu <joabreu@xxxxxxxxxxxx>
> Cc: Carlos Palminha <palminha@xxxxxxxxxxxx>
> Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
> ---
>  drivers/gpu/drm/drm_ioctl.c | 5 +++++
>  include/drm/drm_file.h      | 8 ++++++++
>  include/uapi/drm/drm.h      | 7 +++++++
>  3 files changed, 20 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index a7c61c2..2430e2e 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -318,6 +318,11 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
>  		file_priv->atomic = req->value;
>  		file_priv->universal_planes = req->value;
>  		break;
> +	case DRM_CLIENT_CAP_HDMI2:
> +		if (req->value > 1)
> +			return -EINVAL;
> +		file_priv->hdmi2_allowed = req->value;

Needs some userspace to make use of this (like the -modesetting x.org
driver).
-Daniel

> +		break;
>  	default:
>  		return -EINVAL;
>  	}
> diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h
> index 5dd27ae..7b97d85 100644
> --- a/include/drm/drm_file.h
> +++ b/include/drm/drm_file.h
> @@ -192,6 +192,14 @@ struct drm_file {
>  	unsigned is_master:1;
>  
>  	/**
> +	 * @hdmi2_allowed:
> +	 *
> +	 * True if client understands HDMI 2.0+ features like, for example,
> +	 * extended aspect ratios
> +	 */
> +	unsigned hdmi2_allowed:1;
> +
> +	/**
>  	 * @master:
>  	 *
>  	 * Master this node is currently associated with. Only relevant if
> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
> index b2c5284..9e25138 100644
> --- a/include/uapi/drm/drm.h
> +++ b/include/uapi/drm/drm.h
> @@ -678,6 +678,13 @@ struct drm_get_cap {
>   */
>  #define DRM_CLIENT_CAP_ATOMIC	3
>  
> +/**
> + * DRM_CLIENT_CAP_HDMI2
> + *
> + * If set to 1, the DRM core will expose HDMI 2.0+ features to userspace
> + */
> +#define DRM_CLIENT_CAP_HDMI2	4
> +
>  /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
>  struct drm_set_client_cap {
>  	__u64 capability;
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux