mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 12:52:55 +00:00
lib/igt_kms: add kmstest_get_crtc_idx
Move it from pm_rpm.c to lib/igt_kms and remove the hardcoded version from kms_frontbuffer_tracking. I'm also planning to add other callers. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This commit is contained in:
@@ -2212,16 +2212,12 @@ static void wait_flip_event(void)
|
||||
|
||||
static void set_prim_plane_for_params(struct modeset_params *params)
|
||||
{
|
||||
int rc, i, crtc_index = -1;
|
||||
int rc, i;
|
||||
int crtc_idx = kmstest_get_crtc_idx(drm.res, params->crtc_id);
|
||||
uint32_t plane_id = 0;
|
||||
|
||||
for (i = 0; i < drm.res->count_crtcs; i++)
|
||||
if (drm.res->crtcs[i] == params->crtc_id)
|
||||
crtc_index = i;
|
||||
igt_assert(crtc_index >= 0);
|
||||
|
||||
for (i = 0; i < drm.plane_res->count_planes; i++)
|
||||
if ((drm.planes[i]->possible_crtcs & (1 << crtc_index)) &&
|
||||
if ((drm.planes[i]->possible_crtcs & (1 << crtc_idx)) &&
|
||||
drm.plane_types[i] == DRM_PLANE_TYPE_PRIMARY)
|
||||
plane_id = drm.planes[i]->plane_id;
|
||||
igt_assert(plane_id);
|
||||
|
||||
Reference in New Issue
Block a user