[PATCH 1/3] drm: add connector info/property for non-desktop displays

Philipp Zabel p.zabel at pengutronix.de
Thu Nov 2 11:04:23 UTC 2017


On Wed, 2017-10-25 at 16:30 +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> This adds the infrastructure needed to quirk displays
> using edid and to mark them as non-desktop to denote
> that userspace shouldn't display a standard desktop on them.
> 
> A non-desktop display is one which doesn't work like
> a normal rectangular monitor or requires some transformation
> of the output by the rendering process to make sense.
> 
> This is meant to cover head mounted devices like HTC Vive.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  drivers/gpu/drm/drm_connector.c | 13 +++++++++++++
>  drivers/gpu/drm/drm_edid.c      |  8 ++++++--
>  include/drm/drm_connector.h     |  5 +++++
>  include/drm/drm_mode_config.h   |  7 +++++++
>  4 files changed, 31 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 704fc89..f9d3538 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -234,6 +234,10 @@ int drm_connector_init(struct drm_device *dev,
>  				   config->link_status_property,
>  				   0);
>  
> +	drm_object_attach_property(&connector->base,
> +				   config->non_desktop_property,
> +				   0);
> +
>  	if (drm_core_check_feature(dev, DRIVER_ATOMIC)) {
>  		drm_object_attach_property(&connector->base, config->prop_crtc_id, 0);
>  	}
> @@ -811,6 +815,11 @@ int drm_connector_create_standard_properties(struct drm_device *dev)
>  		return -ENOMEM;
>  	dev->mode_config.link_status_property = prop;
>  
> +	prop = drm_property_create_bool(dev, DRM_MODE_PROP_IMMUTABLE, "non-desktop");

How to deal with devices that may switch to non-desktop mode dynamically
during runtime, such as PSVR (I don't know if there are or will be
others)?

The PSVR connection box initially (in "cinematic mode") passes through
its HDMI input to its external HDMI output unchanged and renders the
input image as a floating plane on the HMD.
The pass-through HDMI output may be connected to the system's only
monitor, therefor PSVR doesn't belong in the drm_edid non-desktop quirk
list during boot.

Via USB commands the connection box can be switched to "VR mode", where
it passes through its HDMI input to the HMD and renders a re-undistorted 
version of one of the eye views to its HDMI output.

Should the non-desktop property be made mutable for such devices, or
should this just be left to userspace completely, keeping them
non-desktop=false?

regards
Philipp


More information about the dri-devel mailing list