From: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t 7/7] kms_flip: Standardize return value for fb_is_bound
Date: Wed, 6 Mar 2019 18:40:27 -0300 [thread overview]
Message-ID: <20190306214027.bm2d4luyocawmbzj@smtp.gmail.com> (raw)
In-Reply-To: <7c52359d-89ba-d6a1-b812-7060d89ef42b@linux.intel.com>
[-- Attachment #1.1: Type: text/plain, Size: 2108 bytes --]
On 03/06, Maarten Lankhorst wrote:
> Op 04-03-2019 om 16:32 schreef Rodrigo Siqueira:
> > The function fb_is_bound() mix integer value with booleans for handling
> > the return value. This commit standardizes the return value of
> > fb_is_bound() for using only booleans.
> >
> > Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
> > ---
> > tests/kms_flip.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> > index de3ab600..abfdd363 100755
> > --- a/tests/kms_flip.c
> > +++ b/tests/kms_flip.c
> > @@ -947,8 +947,7 @@ static void paint_flip_mode(struct igt_fb *fb, bool odd_frame)
> > igt_put_cairo_ctx(drm_fd, fb, cr);
> > }
> >
> > -static int
> > -fb_is_bound(struct test_output *o, int fb)
> > +static bool fb_is_bound(struct test_output *o, int fb)
> > {
> > int n;
> >
> > @@ -958,7 +957,7 @@ fb_is_bound(struct test_output *o, int fb)
> > };
> >
> > if (drmIoctl(drm_fd, DRM_IOCTL_MODE_GETCRTC, &mode))
> > - return 0;
> > + return false;
> >
> > if (!mode.mode_valid || mode.fb_id != fb)
> > return false;
> >
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
>
> Nice cleanup. Hope we can eventually convert kms_flip to igt_display at some point for readability.
Hi Petri and Maarten,
First of all, thanks for your review and the clarification in the patch
4 (I really missed the ret = 0, thanks for highlight this case :)
Maarten, could you give some extra details about the idea of converting
kms_flip to igt_display? Could you point out some links or code
reference? I'm just curious to know a little more about this subject.
Best Regards
Rodrigo Siqueira
> For all except patch 4:
>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>
> :)
>
--
Rodrigo Siqueira
https://siqueira.tech
Graduate Student
Department of Computer Science
University of São Paulo
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 153 bytes --]
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-03-06 21:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-04 15:29 [igt-dev] [PATCH i-g-t 0/7] kms_flip: cleanups Rodrigo Siqueira
2019-03-04 15:29 ` [igt-dev] [PATCH i-g-t 1/7] kms_flip: Removes unreachable code related to TEST_RPM Rodrigo Siqueira
2019-03-04 15:30 ` [igt-dev] [PATCH i-g-t 2/7] kms_flip: Removes unreachable code related to TEST_TS_CONT Rodrigo Siqueira
2019-03-04 15:30 ` [igt-dev] [PATCH i-g-t 3/7] kms_flip: Fix warning related to i915 gem dependence Rodrigo Siqueira
2019-03-04 15:30 ` [igt-dev] [PATCH i-g-t 4/7] kms_flip: Remove unreachable condition in wait_for_events Rodrigo Siqueira
2019-03-05 10:39 ` Petri Latvala
2019-03-04 15:31 ` [igt-dev] [PATCH i-g-t 5/7] kms_flip: Remove magic constant in run_test_on_crtc_set() Rodrigo Siqueira
2019-03-04 15:31 ` [igt-dev] [PATCH i-g-t 6/7] kms_flip: Rework set_mode() Rodrigo Siqueira
2019-03-04 15:32 ` [Intel-gfx] [PATCH i-g-t 7/7] kms_flip: Standardize return value for fb_is_bound Rodrigo Siqueira
2019-03-06 11:25 ` [Intel-gfx] [igt-dev] " Maarten Lankhorst
2019-03-06 21:40 ` Rodrigo Siqueira [this message]
2019-03-04 16:18 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_flip: cleanups Patchwork
2019-03-04 20:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20190306214027.bm2d4luyocawmbzj@smtp.gmail.com \
--to=rodrigosiqueiramelo@gmail.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=petri.latvala@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