intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] drm: Let userspace check if driver supports modeset
@ 2018-07-26 22:43 José Roberto de Souza
  2018-07-26 22:43 ` [PATCH 02/10] drm/i915: Set PCH as NOP when display is disabled José Roberto de Souza
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: José Roberto de Souza @ 2018-07-26 22:43 UTC (permalink / raw)
  To: intel-gfx

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

Right now we are checking
drmModeGetResources()/drm_mode_getresources() for a error to detect
if display is enabled but it is a hackish way it can fail for other
reasons 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] 14+ messages in thread

end of thread, other threads:[~2018-07-27  0:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-26 22:43 [PATCH 01/10] drm: Let userspace check if driver supports modeset José Roberto de Souza
2018-07-26 22:43 ` [PATCH 02/10] drm/i915: Set PCH as NOP when display is disabled José Roberto de Souza
2018-07-26 22:43 ` [PATCH 03/10] drm/i915/runtime_pm: Share code to enable/disable PCH reset handshake José Roberto de Souza
2018-07-26 22:43 ` [PATCH 04/10] drm/i915: Move out non-display related calls from display/modeset init/cleanup José Roberto de Souza
2018-07-26 22:43 ` [PATCH 05/10] drm/i915: Move drm_vblank_init() to i915_load_modeset_init() José Roberto de Souza
2018-07-26 22:43 ` [PATCH 06/10] drm/i915: Move FBC init and cleanup calls to modeset functions José Roberto de Souza
2018-07-26 22:43 ` [PATCH 07/10] drm/i915: Do not modifiy reserved bit in gens that do not have IPC José Roberto de Souza
2018-07-26 22:43 ` [PATCH 08/10] drm/i915: Move intel_init_ipc() call to i915_load_modeset_init() José Roberto de Souza
2018-07-26 22:43 ` [PATCH 09/10] drm/i915: Do not call modeset related functions when display is disabled José Roberto de Souza
2018-07-26 22:43 ` [PATCH 10/10] drm/i915: Remove redundant checks for num_pipes == 0 José Roberto de Souza
2018-07-26 22:56 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/10] drm: Let userspace check if driver supports modeset Patchwork
2018-07-26 23:00 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-07-26 23:17 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-27  0:06 ` ✗ Fi.CI.IGT: failure " Patchwork

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).