From: Jani Nikula <jani.nikula@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
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: Tue, 05 May 2015 13:18:17 +0300 [thread overview]
Message-ID: <874mnr8h06.fsf@intel.com> (raw)
In-Reply-To: <20150504151219.GU30184@phenom.ffwll.local>
On Mon, 04 May 2015, Daniel Vetter <daniel@ffwll.ch> wrote:
> 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.
Fixed and pushed the series.
Jani.
>
> 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
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-05-05 10:16 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
2015-05-05 10:18 ` Jani Nikula [this message]
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=874mnr8h06.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/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