public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Katarzyna Dec <katarzyna.dec@intel.com>
To: Petri Latvala <petri.latvala@intel.com>,
	Daniel Mrzyglod <daniel.t.mrzyglod@intel.com>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2] lib: move upper_32_bits() and lower_32_bits() to library
Date: Wed, 18 Mar 2020 11:22:14 +0100	[thread overview]
Message-ID: <20200318102214.GH25035@kdec5-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20200306101913.GW3839@platvala-desk.ger.corp.intel.com>

On Fri, Mar 06, 2020 at 12:19:13PM +0200, Petri Latvala wrote:
> On Thu, Mar 05, 2020 at 04:22:56PM +0100, Daniel Mrzyglod wrote:
> > Move inline upper_32_bits() and lower_32_bits() function from tests to
> > library. Functiom will be usefull for elsewhere use.
> > 
> > v2: fix function description
> > 
> > Cc: Katarzyna Dec <katarzyna.dec@intel.com>
> > Signed-off-by: Daniel Mrzyglod <daniel.t.mrzyglod@intel.com>
> 
> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
And merged :)
Kasia
> 
> 
> > ---
> >  lib/ioctl_wrappers.h        | 20 ++++++++++++++++++++
> >  tests/i915/gem_exec_fence.c | 10 ----------
> >  2 files changed, 20 insertions(+), 10 deletions(-)
> > 
> > diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
> > index 7614e688c..9b29fce81 100644
> > --- a/lib/ioctl_wrappers.h
> > +++ b/lib/ioctl_wrappers.h
> > @@ -244,4 +244,24 @@ static inline void *from_user_pointer(uint64_t u64)
> >  	return (void *)(uintptr_t)u64;
> >  }
> >  
> > +/**
> > + * lower_32_bits:
> > + *
> > + * return bits 0-31 of a number.
> > + */
> > +static inline uint32_t lower_32_bits(uint64_t x)
> > +{
> > +	return x & 0xffffffff;
> > +}
> > +
> > +/**
> > + * upper_32_bits:
> > + *
> > + * return bits 32-63 of a number.
> > + */
> > +static inline uint32_t upper_32_bits(uint64_t x)
> > +{
> > +	return x >> 32;
> > +}
> > +
> >  #endif /* IOCTL_WRAPPERS_H */
> > diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c
> > index 9b3735325..ebd0f931f 100644
> > --- a/tests/i915/gem_exec_fence.c
> > +++ b/tests/i915/gem_exec_fence.c
> > @@ -590,16 +590,6 @@ static uint32_t batch_create(int fd)
> >  	return handle;
> >  }
> >  
> > -static inline uint32_t lower_32_bits(uint64_t x)
> > -{
> > -	return x & 0xffffffff;
> > -}
> > -
> > -static inline uint32_t upper_32_bits(uint64_t x)
> > -{
> > -	return x >> 32;
> > -}
> > -
> >  static void test_keep_in_fence(int fd, const struct intel_execution_engine2 *e)
> >  {
> >  	struct sigaction sa = { .sa_handler = alarm_handler };
> > -- 
> > 2.21.1
> > 
> > _______________________________________________
> > igt-dev mailing list
> > igt-dev@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/igt-dev
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      reply	other threads:[~2020-03-18 10:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 15:22 [igt-dev] [PATCH i-g-t v2] lib: move upper_32_bits() and lower_32_bits() to library Daniel Mrzyglod
2020-03-05 16:34 ` [igt-dev] ✓ Fi.CI.BAT: success for lib: move upper_32_bits() and lower_32_bits() to library (rev2) Patchwork
2020-03-06  5:37 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-03-06 10:19 ` [igt-dev] [PATCH i-g-t v2] lib: move upper_32_bits() and lower_32_bits() to library Petri Latvala
2020-03-18 10:22   ` Katarzyna Dec [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=20200318102214.GH25035@kdec5-desk.ger.corp.intel.com \
    --to=katarzyna.dec@intel.com \
    --cc=daniel.t.mrzyglod@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --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