dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] drm: Let userspace check if driver supports modeset
@ 2018-07-16 22:38 José Roberto de Souza
  2018-07-16 22:38 ` [PATCH 2/6] drm/i915: Set PCH as NOP if display is disabled José Roberto de Souza
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: José Roberto de Souza @ 2018-07-16 22:38 UTC (permalink / raw)
  To: intel-gfx; +Cc: dri-devel

GPU accelerators usually don't have display block or the display
driver part can be disable when building driver(for servers it save
some resources) so it is important let userspace check this
capability too.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/drm_ioctl.c | 3 +++
 include/uapi/drm/drm.h      | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index ea10e9a26aad..3a8438ae9b51 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -244,6 +244,9 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
 	case DRM_CAP_SYNCOBJ:
 		req->value = drm_core_check_feature(dev, DRIVER_SYNCOBJ);
 		return 0;
+	case DRM_CAP_MODESET:
+		req->value = drm_core_check_feature(dev, DRIVER_MODESET);
+		return 0;
 	}
 
 	/* Other caps only work with KMS drivers */
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index 300f336633f2..85fae6ddbf48 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -649,6 +649,7 @@ struct drm_gem_open {
 #define DRM_CAP_PAGE_FLIP_TARGET	0x11
 #define DRM_CAP_CRTC_IN_VBLANK_EVENT	0x12
 #define DRM_CAP_SYNCOBJ		0x13
+#define DRM_CAP_MODESET		0x14
 
 /** DRM_IOCTL_GET_CAP ioctl argument type */
 struct drm_get_cap {
-- 
2.18.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-08-15 21:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-16 22:38 [PATCH 1/6] drm: Let userspace check if driver supports modeset José Roberto de Souza
2018-07-16 22:38 ` [PATCH 2/6] drm/i915: Set PCH as NOP if display is disabled José Roberto de Souza
2018-07-16 22:38 ` [PATCH 3/6] drm/i915: Move out non-modeset calls from modeset init and cleanup José Roberto de Souza
2018-07-17  7:27   ` [Intel-gfx] " Chris Wilson
2018-07-16 22:38 ` [PATCH 4/6] drm/i915: Move drm_vblank_init() to i915_load_modeset_init() José Roberto de Souza
2018-07-16 22:38 ` [PATCH 5/6] drm/i915: Do not call modeset related functions when display is disabled José Roberto de Souza
2018-07-16 22:38 ` [PATCH 6/6] drm/i915: Remove redundante checks for num_pipes == 0 José Roberto de Souza
2018-07-17  7:28 ` [Intel-gfx] [PATCH 1/6] drm: Let userspace check if driver supports modeset Chris Wilson
2018-07-17 17:02   ` Souza, Jose
2018-07-17 20:04     ` Chris Wilson
2018-08-15 21:15       ` Rodrigo Vivi
2018-08-15 21:46         ` [Intel-gfx] " Souza, Jose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).