public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 01/10] lib: add 16 and 8 bit versions of INREG and OUTREG
Date: Mon, 4 May 2015 17:12:19 +0200	[thread overview]
Message-ID: <20150504151219.GU30184@phenom.ffwll.local> (raw)
In-Reply-To: <b7dbb39438e5b136088a81e10030d46223c2596e.1430222534.git.jani.nikula@intel.com>

On Tue, Apr 28, 2015 at 03:04:26PM +0300, Jani Nikula wrote:
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  lib/intel_io.h   |  4 ++++
>  lib/intel_mmio.c | 24 ++++++++++++++++++++++++
>  2 files changed, 28 insertions(+)
> 
> diff --git a/lib/intel_io.h b/lib/intel_io.h
> index 04aa3fd496b4..1c3b4445cd5b 100644
> --- a/lib/intel_io.h
> +++ b/lib/intel_io.h
> @@ -43,7 +43,11 @@ void intel_register_write(uint32_t reg, uint32_t val);
>  int intel_register_access_needs_fakewake(void);
>  
>  uint32_t INREG(uint32_t reg);
> +uint16_t INREG16(uint32_t reg);
> +uint8_t INREG8(uint32_t reg);
>  void OUTREG(uint32_t reg, uint32_t val);
> +void OUTREG16(uint32_t reg, uint16_t val);
> +void OUTREG8(uint32_t reg, uint8_t val);
>  
>  /* sideband access functions from intel_iosf.c */
>  uint32_t intel_dpio_reg_read(uint32_t reg, int phy);
> diff --git a/lib/intel_mmio.c b/lib/intel_mmio.c
> index 9a2ee27bd5e5..40ce94c8f600 100644
> --- a/lib/intel_mmio.c
> +++ b/lib/intel_mmio.c
> @@ -324,6 +324,18 @@ uint32_t INREG(uint32_t reg)
>  	return *(volatile uint32_t *)((volatile char *)mmio + reg);
>  }
>  
> +/* 16-bit version of INREG */

gtkdoc is missing here for these new functions. And while at it please
also do the s/OUTRET/OUTREG/ type ;-)

Otherise entire series looks really nifty and has my Ack.

Cheers, Daniel

> +uint16_t INREG16(uint32_t reg)
> +{
> +	return *(volatile uint16_t *)((volatile char *)mmio + reg);
> +}
> +
> +/* 8-bit version of INREG */
> +uint8_t INREG8(uint32_t reg)
> +{
> +	return *((volatile uint8_t *)mmio + reg);
> +}
> +
>  /**
>   * OUTRET:
>   * @reg: register offset
> @@ -338,3 +350,15 @@ void OUTREG(uint32_t reg, uint32_t val)
>  {
>  	*(volatile uint32_t *)((volatile char *)mmio + reg) = val;
>  }
> +
> +/* 16-bit version of OUTREG */
> +void OUTREG16(uint32_t reg, uint16_t val)
> +{
> +	*(volatile uint16_t *)((volatile char *)mmio + reg) = val;
> +}
> +
> +/* 8-bit version of OUTREG */
> +void OUTREG8(uint32_t reg, uint8_t val)
> +{
> +	*((volatile uint8_t *)mmio + reg) = val;
> +}
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-05-04 15:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 12:04 [PATCH i-g-t 00/10] rename mmio global variable to igt_global_mmio Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 01/10] lib: add 16 and 8 bit versions of INREG and OUTREG Jani Nikula
2015-05-04 15:12   ` Daniel Vetter [this message]
2015-05-05 10:18     ` Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 02/10] intel_reg: switch to " Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 03/10] intel_backlight: " Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 04/10] intel_reg_checker: switch to INREG Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 05/10] intel_reg_{read, write}: switch to INREG and OUTREG Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 06/10] intel_watermark: switch to INREG Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 07/10] intel_display_poller: use INREG and OUTREG Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 08/10] intel_vga_{read, write}: " Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 09/10] tests/gen7_forcewake_mt: use local mmio variable Jani Nikula
2015-04-28 12:04 ` [PATCH i-g-t 10/10] rename global mmio variable to igt_global_mmio Jani Nikula

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=20150504151219.GU30184@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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