From: Robert Foss <robert.foss@collabora.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, daniel.stone@collabora.com,
tomeu.vizoso@collabora.com, daniel.vetter@ffwll.ch
Subject: Re: [PATCH i-g-t v4 5/5] lib/igt_kms: Added pipe_id_to_vbl_flag() to igt_kms.
Date: Wed, 11 May 2016 09:49:17 -0400 [thread overview]
Message-ID: <5733385D.9060008@collabora.com> (raw)
In-Reply-To: <20160510175458.GW4329@intel.com>
On 2016-05-10 01:54 PM, Ville Syrjälä wrote:
> On Tue, Apr 26, 2016 at 11:54:22AM -0400, robert.foss@collabora.com wrote:
>> From: Robert Foss <robert.foss@collabora.com>
>>
>> Added function pipe_id_to_vbl_flag() to igt_kms.
>> This function formats a pipe_id into the format
>> expected by DRM while processing DRM_IOCTL_WAIT_VBLANK.
>>
>> Signed-off-by: Robert Foss <robert.foss@collabora.com>
>> ---
>> lib/igt_kms.c | 16 ++++++++++++++++
>> lib/igt_kms.h | 1 +
>> 2 files changed, 17 insertions(+)
>>
>> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
>> index 99b6279..48b95e6 100644
>> --- a/lib/igt_kms.c
>> +++ b/lib/igt_kms.c
>> @@ -2557,3 +2557,19 @@ void igt_reset_connectors(void)
>> close(fd);
>> }
>> }
>> +
>> +/**
>> + * pipe_id_to_vbl_flag:
>> + *
>> + * Convert a pipe if into the flag representation
>> + * expected in DRM while processing DRM_IOCTL_WAIT_VBLANK.
>> + */
>> +uint32_t pipe_id_to_vbl_flag(uint32_t pipe_id)
>> +{
>> + if (pipe_id == 0)
>> + return 0;
>> + else if (pipe_id == 1)
>> + return 1 | _DRM_VBLANK_SECONDARY;
>
> The '1 |' means this will always end up as DRM_VBLANK_RELATIVE.
Ah, of course. I will look into the proper formatting and submit it in v5.
Thank you Ville for having a look at this.
Rob.
>
>> + else
>> + return pipe_id << 1;
>> +}
>> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
>> index d9a4e11..f74edaf 100644
>> --- a/lib/igt_kms.h
>> +++ b/lib/igt_kms.h
>> @@ -400,6 +400,7 @@ void igt_wait_for_vblank(int drm_fd, enum pipe pipe);
>>
>> void igt_enable_connectors(void);
>> void igt_reset_connectors(void);
>> +uint32_t pipe_id_to_vbl_flag(uint32_t pipe_id);
>>
>> #define EDID_LENGTH 128
>> const unsigned char* igt_kms_get_base_edid(void);
>> --
>> 2.5.0
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2016-05-11 13:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 15:54 [PATCH i-g-t v4 0/5] kms_flip_event_leak and kms_vblank fixes for VC4 robert.foss
2016-04-26 15:54 ` [PATCH i-g-t v4 1/5] lib/igt_kms: Add support for up to 10 planes robert.foss
2016-04-26 15:54 ` [PATCH i-g-t v4 2/5] lib/igt_kms: Fix plane counting in igt_display_init robert.foss
2016-04-26 15:54 ` [PATCH i-g-t v4 3/5] lib/igt_kms: Switch to verbose assert robert.foss
2016-04-26 15:54 ` [PATCH i-g-t v4 4/5] kms_vblank: Switch from using crtc0 statically to explicitly setting mode robert.foss
2016-05-09 15:38 ` Marius Vlad
2016-05-09 20:31 ` Robert Foss
[not found] ` <5730F578.8000909@collabora.com>
2016-05-10 17:03 ` Marius Vlad
2016-05-10 17:19 ` Ville Syrjälä
2016-05-10 17:36 ` Chris Wilson
2016-05-10 17:58 ` Ville Syrjälä
2016-04-26 15:54 ` [PATCH i-g-t v4 5/5] lib/igt_kms: Added pipe_id_to_vbl_flag() to igt_kms robert.foss
2016-05-10 7:44 ` Daniel Vetter
2016-05-11 13:45 ` Robert Foss
2016-05-11 15:31 ` Robert Foss
2016-05-10 17:54 ` Ville Syrjälä
2016-05-11 13:49 ` Robert Foss [this message]
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=5733385D.9060008@collabora.com \
--to=robert.foss@collabora.com \
--cc=daniel.stone@collabora.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tomeu.vizoso@collabora.com \
--cc=ville.syrjala@linux.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