public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Tolakanahalli Pradeep, Madhumitha" <madhumitha.tolakanahalli.pradeep@intel.com>
To: "Navare, Manasi D" <manasi.d.navare@intel.com>,
	"Ser, Simon" <simon.ser@intel.com>
Cc: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"Latvala, Petri" <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] igt/tests/kms_dp_tiled_display.c : kms test file for display port tiled displays
Date: Wed, 14 Aug 2019 22:05:45 +0000	[thread overview]
Message-ID: <daa9d25b772d90ad613dc0d2b2146e72ad805f40.camel@intel.com> (raw)
In-Reply-To: <d348d4b1d3e7918a55082ed339d65adc9b6e6077.camel@intel.com>

On Wed, 2019-08-14 at 14:43 +0100, Ser, Simon wrote:
> On Wed, 2019-08-07 at 18:10 -0700, Tolakanahalli Pradeep, Madhumitha
> wrote:
> > > > I believe tests in kms_flip do a similar check. The
> > > > page_flip_handler
> > > > function handles the page flip event (which is given the flip
> > > > timestamp
> > > > and sequence number). check_state verifies that the timestamp
> > > > is
> > > > close
> > > > enough to what we expect (in our atomic check, maybe we can
> > > > compare
> > > > with strict equality).
> > > > 
> > > > Since we're dealing with multiple CRTCs, it may be a good idea
> > > > to
> > > > use
> > > > drmEventContext.version = 3 with page_flip_handler2 so that we
> > > > also
> > > > get
> > > > the CRTC in the page flip handler. Version 3 is a core DRM
> > > > feature,
> > > > all
> > > > drivers support it given a recent enough kernel.
> > > > 
> > > > Rough pseudo-code:
> > > > 
> > > > 	/* When committing buffer, request a page flip */
> > > > 	drmModeAtomicCommit(fd, req, DRM_MODE_ATOMIC_NONBLOCK |
> > > > 			    DRM_MODE_PAGE_FLIP_EVENT, data);
> > > 
> > > Here we do the modese with igt_display_commit2 call that then
> > > calls
> > > drmModeAtomicCommit but
> > > doesnt call it with Page flip, do we have another igt helper that
> > > does a atomic commit with
> > > page flip event?
> > > 
> > > Can we not just do atomic commit and get vblank events so for two
> > > crtcs we get two events and compare
> > > the timestamp and make sure they are close enough?
> 
> I believe doing an atomic commit with DRM_MODE_PAGE_FLIP_EVENT as
> Madhumitha suggested should be enough.

Looks like using DRM_MODE_PAGE_FLIP_EVENT is giving me a errno 22,
invalid argument.

> 
> > > Manasi
> > > 
> > > > 	static void page_flip_handler(int fd, unsigned seq,
> > > > 				      unsigned tv_sec,
> > > > 				      unsigned tv_usec,
> > > > 				      unsigned crtc_id, void
> > > > *data)
> > > > 	{
> > > > 		/* Compare params with the other page flip */
> > > > 	}
> > > > 
> > > > 	/* When we get POLLIN in the DRM FD */
> > > > 	drmEventContext event = {
> > > > 		.version = 3,
> > > > 		.page_flip_handler2 = page_flip_handler,
> > > > 	};
> > > > 	drmHandleEvent(fd, &event);
> > > > 
> > 
> > I was trying to implement the above code with igt_display_commit2.
> > Looks like I'm timing out while poll-ing for POLLIN.
> > 
> > Is there something I could be doing wrong? According to my
> > understanding, igt_display_commit2 should cause a page-flip event
> > right?
> 
> Hmm. Yeah, it should work, assuming you use DRM_MODE_PAGE_FLIP_EVENT
> when doing the atomic commit. Can you push your code somewhere (e.g.
> on
> a GitLab fork) so that I can have a look?


Sure!
Here is the link to my forked repository. The commit and polling is in
igt_main().
https://gitlab.freedesktop.org/mtolakan/igt-gpu-tools
My suspicion is the commit is not asynchronous, which is why I am unble
to capture the page flip event. Please do let me know what you think,
thanks!

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

  reply	other threads:[~2019-08-14 22:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17 18:02 [igt-dev] [PATCH i-g-t] igt/tests/kms_dp_tiled_display.c : kms test file for display port tiled displays Madhumitha Tolakanahalli Pradeep
2019-07-17 18:35 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2019-07-17 18:56 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2019-07-18  6:43 ` [igt-dev] [PATCH i-g-t] " Ser, Simon
2019-07-30 19:21   ` Manasi Navare
2019-07-31  7:25     ` Ser, Simon
2019-07-31 17:13       ` Manasi Navare
2019-08-01  7:41         ` Ser, Simon
2019-08-01 17:38           ` Manasi Navare
2019-08-02  1:09             ` Tolakanahalli Pradeep, Madhumitha
2019-08-08  1:10             ` Tolakanahalli Pradeep, Madhumitha
2019-08-14 13:43               ` Ser, Simon
2019-08-14 22:05                 ` Tolakanahalli Pradeep, Madhumitha [this message]
2019-08-15 11:30                   ` Ser, Simon
2019-08-17  0:01                     ` Tolakanahalli Pradeep, Madhumitha
2019-08-19 14:50                       ` Ser, Simon
2019-07-31  0:42   ` Tolakanahalli Pradeep, Madhumitha
2019-07-31  8:15     ` Ser, Simon

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=daa9d25b772d90ad613dc0d2b2146e72ad805f40.camel@intel.com \
    --to=madhumitha.tolakanahalli.pradeep@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=manasi.d.navare@intel.com \
    --cc=petri.latvala@intel.com \
    --cc=simon.ser@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