All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robert Foss <robert.foss@collabora.com>
To: Daniel Vetter <daniel@ffwll.ch>
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:45:04 -0400	[thread overview]
Message-ID: <57333760.9080300@collabora.com> (raw)
In-Reply-To: <20160510074405.GI27098@phenom.ffwll.local>



On 2016-05-10 03:44 AM, Daniel Vetter 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>
>
> This needs to be reorder with patch 4 since otherwise the patch to change
> kms_vblank won't compile.

Naturally, I will change that in v5.

>> ---
>>   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)
>
> kmstest_ prefix please. Also, maybe we should directly take a drmModeCrtc
> for even more convenience.

I'll add the prefix and look into taking an drmModeCrtc instead of a 
pipe id.

>
> Also please use this helper everywhere, a quick grep shows drm_read.c,
> kms_flip.c, kms_vblank.c (already in this series) and lib/igt_kms.c.
> -Daniel
>

Will do. I'll add additional uses of this helper function in v5.

>> +{
>> +	if (pipe_id == 0)
>> +		return 0;
>> +	else if (pipe_id == 1)
>> +		return 1 | _DRM_VBLANK_SECONDARY;
>> +	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

  reply	other threads:[~2016-05-11 13:45 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 [this message]
2016-05-11 15:31       ` Robert Foss
2016-05-10 17:54   ` Ville Syrjälä
2016-05-11 13:49     ` Robert Foss

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=57333760.9080300@collabora.com \
    --to=robert.foss@collabora.com \
    --cc=daniel.stone@collabora.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tomeu.vizoso@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.