diff options
author | Liviu Dudau <Liviu.Dudau@arm.com> | 2018-02-28 14:11:23 +0000 |
---|---|---|
committer | Liviu Dudau <Liviu.Dudau@arm.com> | 2018-06-20 15:30:20 +0100 |
commit | d67b6a2065076d763c7df626b8c54f16038ad862 (patch) | |
tree | fb7d98ec56e8a726aa2ea0696c55b6702265729e /drivers/gpu/drm/drm_ioctl.c | |
parent | b13cc8dd588434e2aec781e6d12224e4c408ac18 (diff) | |
download | linux-stable-d67b6a2065076d763c7df626b8c54f16038ad862.tar.gz linux-stable-d67b6a2065076d763c7df626b8c54f16038ad862.tar.bz2 linux-stable-d67b6a2065076d763c7df626b8c54f16038ad862.zip |
drm: writeback: Add client capability for exposing writeback connectors
Due to the fact that writeback connectors behave in a special way
in DRM (they always report being disconnected) we might confuse some
userspace. Add a client capability for writeback connectors that will
filter them out for clients that don't understand the capability.
Changelog:
- only accept the capability if the client has already set the
DRM_CLIENT_CAP_ATOMIC one.
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Brian Starkey <brian.starkey@arm.com>
Link: https://patchwork.freedesktop.org/patch/229038/
Diffstat (limited to 'drivers/gpu/drm/drm_ioctl.c')
-rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 0d4cfb232576..fe49fb0356b5 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -334,6 +334,13 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv) return -EINVAL; file_priv->aspect_ratio_allowed = req->value; break; + case DRM_CLIENT_CAP_WRITEBACK_CONNECTORS: + if (!file_priv->atomic) + return -EINVAL; + if (req->value > 1) + return -EINVAL; + file_priv->writeback_connectors = req->value; + break; default: return -EINVAL; } |