[RFC 1/5] drm: Add HDMI 2.0+ features exposing knob
Jose Abreu
Jose.Abreu at synopsys.com
Wed Mar 22 17:35:57 UTC 2017
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 at synopsys.com>
Cc: Carlos Palminha <palminha at synopsys.com>
Cc: dri-devel at lists.freedesktop.org
---
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;
+ 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
More information about the dri-devel
mailing list