public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
To: igt-dev@lists.freedesktop.org, suresh.kumar.kurmi@intel.com,
	kishore.kunche@intel.com, petri.latvala@intel.com,
	mohammed.khajapasha@intel.com, arkadiusz.hiler@intel.com
Subject: [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Set pipe enum name to a pipe from drm pipe
Date: Thu,  4 Jun 2020 02:35:05 +0530	[thread overview]
Message-ID: <20200603210506.17185-2-mohammed.khajapasha@intel.com> (raw)
In-Reply-To: <20200603210506.17185-1-mohammed.khajapasha@intel.com>

set the pipe enum name to igt pipe from drm pipe,
in case of non-contiguous pipes in display, the igt pipes cann't
be same as enabled pipes in kernel.

Signed-off-by: Mohammed Khajapasha <mohammed.khajapasha@intel.com>
---
 lib/igt_kms.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index afef5939..a42a44c5 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1958,10 +1958,16 @@ void igt_display_require(igt_display_t *display, int drm_fd)
 		int p = 1;
 		int j, type;
 		uint8_t last_plane = 0, n_planes = 0;
+		struct drm_i915_get_pipe_from_crtc_id get_pipe;
 
 		pipe->crtc_id = resources->crtcs[i];
 		pipe->display = display;
-		pipe->pipe = i;
+		/* Get right pipe enum from kernel for a pipe */
+		get_pipe.pipe = 0;
+		get_pipe.crtc_id =  pipe->crtc_id;
+		do_ioctl(display->drm_fd,
+				DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID, &get_pipe);
+		pipe->pipe = get_pipe.pipe;
 		pipe->plane_cursor = -1;
 		pipe->plane_primary = -1;
 		pipe->planes = NULL;
-- 
2.24.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-06-03 21:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-03 21:05 [igt-dev] [PATCH i-g-t 0/2] test/kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
2020-06-03 21:05 ` Mohammed Khajapasha [this message]
2020-06-04 14:50   ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Set pipe enum name to a pipe from drm pipe Ville Syrjälä
2020-06-03 21:05 ` [igt-dev] [PATCH i-g-t 2/2] test/kms: In static iteration skip the testcases for disable pipes Mohammed Khajapasha
2020-06-03 21:29 ` [igt-dev] ✓ Fi.CI.BAT: success for test/kms: Add support for display with non-contiguous pipes (rev3) Patchwork
2020-06-04  8:19 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-06-03 20:55 [igt-dev] [PATCH i-g-t 0/2] test/kms: Add support for display with non-contiguous pipes Mohammed Khajapasha
2020-06-03 20:55 ` [igt-dev] [PATCH i-g-t 1/2] lib/igt_kms: Set pipe enum name to a pipe from drm pipe Mohammed Khajapasha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200603210506.17185-2-mohammed.khajapasha@intel.com \
    --to=mohammed.khajapasha@intel.com \
    --cc=arkadiusz.hiler@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kishore.kunche@intel.com \
    --cc=petri.latvala@intel.com \
    --cc=suresh.kumar.kurmi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox