From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: yalin wang <yalin.wang2010@gmail.com>, <adaplas@gmail.com>,
<plagnioj@jcrosoft.com>, <linux-fbdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] fbdev/riva:change to use generice function to implement reverse_order()
Date: Thu, 20 Aug 2015 14:02:01 +0300 [thread overview]
Message-ID: <55D5B3A9.6040901@ti.com> (raw)
In-Reply-To: <C21B8761-0447-45A6-B833-742E3B4C13DE@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]
On 10/08/15 13:12, yalin wang wrote:
> This change to use swab32(bitrev32()) to implement reverse_order()
> function, have better performance on some platforms.
Which platforms? Presuming you tested this, roughly how much better
performance? If you didn't, how do you know it's faster?
> Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
> ---
> drivers/video/fbdev/riva/fbdev.c | 19 ++++++-------------
> 1 file changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riva/fbdev.c
> index f1ad274..4803901 100644
> --- a/drivers/video/fbdev/riva/fbdev.c
> +++ b/drivers/video/fbdev/riva/fbdev.c
> @@ -40,6 +40,7 @@
> #include <linux/init.h>
> #include <linux/pci.h>
> #include <linux/backlight.h>
> +#include <linux/swab.h>
> #include <linux/bitrev.h>
> #ifdef CONFIG_PMAC_BACKLIGHT
> #include <asm/machdep.h>
> @@ -84,6 +85,7 @@
> #define SetBit(n) (1<<(n))
> #define Set8Bits(value) ((value)&0xff)
>
> +#define reverse_order(v) swab32(bitrev32(v))
> /* HW cursor parameters */
> #define MAX_CURS 32
>
> @@ -451,15 +453,6 @@ static inline unsigned char MISCin(struct riva_par *par)
> return (VGA_RD08(par->riva.PVIO, 0x3cc));
> }
>
> -static inline void reverse_order(u32 *l)
I would suggest to do the work in the inline function, instead of a
macro. And if you keep the function prototype the same, then the changes
to each reverse_order call site are not needed.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-08-20 11:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-10 10:12 [RFC] fbdev/riva:change to use generice function to implement reverse_order() yalin wang
2015-08-20 11:02 ` Tomi Valkeinen [this message]
2015-08-20 11:30 ` yalin wang
2015-08-21 6:41 ` Tomi Valkeinen
2015-08-21 7:46 ` yalin wang
2015-08-21 8:01 ` Tomi Valkeinen
2015-08-22 7:53 ` Afzal Mohammed
2015-08-24 8:31 ` yalin wang
2015-08-24 13:41 ` Afzal Mohammed
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=55D5B3A9.6040901@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=adaplas@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=yalin.wang2010@gmail.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