From: "Ser, Simon" <simon.ser@intel.com>
To: "Vasilev, Oleg" <oleg.vasilev@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Cc: "daniel@ffwll.ch" <daniel@ffwll.ch>
Subject: Re: [igt-dev] [PATCH 2/2] tests/prime_generic: add vendor-agnostic prime tests
Date: Fri, 16 Aug 2019 10:35:47 +0000 [thread overview]
Message-ID: <5b94bf2a8ea493236d4ad1c67cfd99a85803c1db.camel@intel.com> (raw)
In-Reply-To: <156595039692.11610.7865154036776730713@skylake-alporthouse-com>
On Fri, 2019-08-16 at 11:13 +0100, Chris Wilson wrote:
> Quoting Ser, Simon (2019-08-16 11:07:56)
> > On Fri, 2019-07-12 at 17:16 +0300, Oleg Vasilev wrote:
> > > +static bool has_prime_import(int fd)
> > > +{
> > > + uint64_t value;
> > > +
> > > + if (drmGetCap(fd, DRM_CAP_PRIME, &value))
> > > + return false;
> > > +
> > > + return value & DRM_PRIME_CAP_IMPORT;
> >
> > This returns a non-zero value when import is supported, but doesn't
> > return true. This can lead to strange bugs.
> >
> > It's common to use !! to convert to a bool.
>
> But not required when embracing stdbool as it defined in the spec for
> the implicit cast.
Oh, indeed, I didn't know! Thanks for the heads-up.
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-08-16 10:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-12 14:16 [igt-dev] [PATCH 1/2] lib: expose fb_init Oleg Vasilev
2019-07-12 14:16 ` [igt-dev] [PATCH 2/2] tests/prime_generic: add vendor-agnostic prime tests Oleg Vasilev
2019-07-12 14:20 ` Chris Wilson
2019-07-31 9:45 ` Vasilev, Oleg
2019-08-02 14:38 ` Daniel Vetter
2019-08-16 10:07 ` Ser, Simon
2019-08-16 10:13 ` Chris Wilson
2019-08-16 10:35 ` Ser, Simon [this message]
2019-08-16 14:21 ` Vasilev, Oleg
2019-08-16 14:33 ` Ser, Simon
2019-08-16 14:39 ` Ser, Simon
2019-08-16 14:21 ` [igt-dev] [PATCH 1/2] lib: expose fb_init Oleg Vasilev
2019-08-16 14:21 ` [igt-dev] [PATCH 2/2] tests/kms_prime: add vendor-agnostic kms prime tests Oleg Vasilev
2019-08-19 9:50 ` Ser, Simon
2019-07-12 15:45 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/2] lib: expose fb_init Patchwork
2019-07-12 17:07 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2019-07-14 4:16 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2019-08-16 14:56 ` [igt-dev] ✗ GitLab.Pipeline: warning for series starting with [1/2] lib: expose fb_init (rev3) Patchwork
2019-08-16 15:02 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2019-08-17 6:57 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-07-04 9:56 [igt-dev] [PATCH 1/2] lib: prepare helpers for generic prime test Oleg Vasilev
2019-07-04 9:56 ` [igt-dev] [PATCH 2/2] tests/prime_generic: add vendor-agnostic prime tests Oleg Vasilev
2019-07-09 13:48 ` Rodrigo Siqueira
2019-07-10 16:35 ` Daniel Vetter
2019-07-11 9:09 ` Vasilev, Oleg
2019-07-11 12:36 ` Daniel Vetter
2019-07-11 15:20 ` Ser, Simon
2019-07-11 17:19 ` Daniel Vetter
2019-07-12 8:36 ` Vasilev, Oleg
2019-07-12 10:24 ` 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=5b94bf2a8ea493236d4ad1c67cfd99a85803c1db.camel@intel.com \
--to=simon.ser@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--cc=igt-dev@lists.freedesktop.org \
--cc=oleg.vasilev@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