History

drm: Add DRM client cap for aspect-ratio

To enable aspect-ratio support in DRM, blindly exposing the aspect ratio information along with mode, can break things in existing non-atomic user-spaces which have no intention or support to use this aspect ratio information. To avoid this, a new drm client cap is required to enable a non-atomic user-space to advertise if it supports modes with aspect-ratio. Based on this cap value, the kernel will take a call on exposing the aspect ratio info in modes or not. This patch adds the client cap for aspect-ratio. Since no atomic-userspaces blow up on receiving aspect-ratio information, the client cap for aspect-ratio is always enabled for atomic clients. Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Cc: Shashank Sharma <shashank.sharma@intel.com> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> V3: rebase V4: As suggested by Marteen Lankhorst modified the commit message explaining the need to use the DRM cap for aspect-ratio. Also, tweaked the comment lines in the code for better understanding and clarity, as recommended by Shashank Sharma. V5: rebase V6: rebase V7: rebase V8: rebase V9: rebase V10: rebase V11: rebase V12: As suggested by Daniel Vetter and Ville Syrjala, always enable aspect-ratio client cap for atomic userspaces, if no atomic userspace breaks on aspect-ratio bits. V13: rebase V14: rebase

Ankit Nautiyal committed 8 years ago

Commit 7595bda1 parent bfe2e2c3 files · +24 −0Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/drm/drm.h+7−0
@@ -680,6 +680,13 @@ struct drm_get_cap { · 679 unmodified lines
680680 */
681681 #define DRM_CLIENT_CAP_ATOMIC 3
682682
683+/**
684+ * DRM_CLIENT_CAP_ASPECT_RATIO
685+ *
686+ * If set to 1, the DRM core will provide aspect ratio information in modes.
687+ */
688+#define DRM_CLIENT_CAP_ASPECT_RATIO 4
689+
683690 /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
684691 struct drm_set_client_cap {
685692 __u64 capability;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t