mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-21 21:32:56 +00:00
lib: extract kmstest_get_pipe_from_crtc_id
This commit is contained in:
@@ -916,3 +916,16 @@ void kmstest_dump_mode(drmModeModeInfo *mode)
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
int kmstest_get_pipe_from_crtc_id(int fd, int crtc_id)
|
||||
{
|
||||
struct drm_i915_get_pipe_from_crtc_id pfci;
|
||||
int ret;
|
||||
|
||||
memset(&pfci, 0, sizeof(pfci));
|
||||
pfci.crtc_id = crtc_id;
|
||||
ret = drmIoctl(fd, DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID, &pfci);
|
||||
assert(ret == 0);
|
||||
|
||||
return pfci.pipe;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@ unsigned int kmstest_create_fb(int fd, int width, int height, int bpp,
|
||||
void *func_arg);
|
||||
void kmstest_remove_fb(int fd, int fb_id);
|
||||
void kmstest_dump_mode(drmModeModeInfo *mode);
|
||||
int kmstest_get_pipe_from_crtc_id(int fd, int crtc_id);
|
||||
|
||||
inline static void _do_or_die(const char *function, int line, int ret)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user