diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-11-22 10:36:58 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-11-27 09:50:04 +0100 |
commit | 5105f068f6525f4d863719acf754891442eed254 (patch) | |
tree | dbc62f09e7fba74af4d14700672587d9695d0843 /lib/igt_kms.c | |
parent | 88a50c7cb151ac5fd98c7ace158c6091053697dd (diff) |
lib/kms: Drop igt_display_init
If you need the high-level functions, then you probably need a
full display. Unexport the non-requiring version, and adjust the
documentation. This also gives us proper docs for the recently
added igt_display_require.
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-By: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index d806ccc1..7214101e 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1861,16 +1861,17 @@ static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane static void igt_fill_display_format_mod(igt_display_t *display); /** - * igt_display_init: + * igt_display_require: * @display: a pointer to an #igt_display_t structure * @drm_fd: a drm file descriptor * * Initialize @display and allocate the various resources required. Use * #igt_display_fini to release the resources when they are no longer required. * - * Returns: true if the display has outputs and pipes available, false otherwise + * This function automatically skips if the kernel driver doesn't support any + * CRTC or outputs. */ -bool igt_display_init(igt_display_t *display, int drm_fd) +void igt_display_require(igt_display_t *display, int drm_fd) { drmModeRes *resources; drmModePlaneRes *plane_resources; @@ -2034,12 +2035,7 @@ bool igt_display_init(igt_display_t *display, int drm_fd) out: LOG_UNINDENT(display); - return display->n_pipes && display->n_outputs; -} - -void igt_display_require(igt_display_t *display, int drm_fd) -{ - igt_require(igt_display_init(display, drm_fd)); + igt_require(display->n_pipes && display->n_outputs); } /** |