From: Sergei Shtylyov <sshtylyov@mvista.com>
To: post@pfrst.de
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org,
attilio.fiandrotti@gmail.com
Subject: Re: [PATCH] Impact video driver for SGI Indigo2
Date: Mon, 12 Sep 2011 13:56:36 +0400 [thread overview]
Message-ID: <4E6DD754.7000907@mvista.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1109111200400.4146@Indigo2.Peter>
On 11.09.2011 15:14, peter fuerst wrote:
> Here's an attempt to bloat the linux source a bit more ;-)
> This patch brings, yet missing, parts that make a Linux-driven Indigo2
> Impact (IP28 and most probably IP22-Impact) an usable desktop-machine
> "out of the box".
> The driver provides the framebuffer console and an interface for the
> Xserver (mmap'ing a DMA-pool to the shadow framebuffer and doing the
> necessary cacheflush).
> Meanwhile only a few files are affected and obviously no side-effects
> to other parts of the kernel are to be expected.
> BTW: it would be appreciated, if someone could verify, that this driver
> also works for IP22 Impact.
> Signed-off-by: peter fuerst <post@pfrst.de>
> ---
> 1) Preparation
> drivers/video/Kconfig | 6 ++++++
> drivers/video/Makefile | 1 +
> drivers/video/logo/Kconfig | 2 +-
> arch/mips/sgi-ip22/ip22-setup.c | 37 +++++++++++++++++++++++++++++++++++++
> arch/mips/configs/ip28_defconfig | 1 +
> 5 files changed, 46 insertions(+), 1 deletions(-)
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 549b960..43dbc9f 100644
> --- a/drivers/video/Kconfig Thu Jan 1 00:00:00 1970
> +++ b/drivers/video/Kconfig Thu Mar 10 23:37:58 2011
> @@ -2383,6 +2383,12 @@ config FB_PUV3_UNIGFX
> Choose this option if you want to use the Unigfx device as a
> framebuffer device. Without the support of PCI & AGP.
It looks like the patch is spoiled as I'm seeing two spaces at the start
of line when looking at the message source.
>
> +config FB_IMPACT
> + tristate "SGI Indigo2 Impact graphics support"
> + depends on FB && (SGI_IP22 || SGI_IP28 || SGI_IP30)
> + help
> + SGI Indigo2 Impact (SI/HI/MI) graphics card support.
> +
> source "drivers/video/omap/Kconfig"
> source "drivers/video/omap2/Kconfig"
>
>
>
There are alos empty lines after each file in the patch -- which shouldn't
be there.
> diff --git a/drivers/video/Makefile b/drivers/video/Makefile
> index 8b83129..278c8fa 100644
> --- a/drivers/video/Makefile Thu Jan 1 00:00:00 1970
> +++ b/drivers/video/Makefile Thu Mar 10 23:44:40 2011
> @@ -141,6 +141,7 @@ obj-$(CONFIG_FB_MSM) += msm/
> obj-$(CONFIG_FB_NUC900) += nuc900fb.o
> obj-$(CONFIG_FB_JZ4740) += jz4740_fb.o
> obj-$(CONFIG_FB_PUV3_UNIGFX) += fb-puv3.o
> +obj-$(CONFIG_FB_IMPACT) += impact.o
>
> # Platform or fallback drivers go here
> obj-$(CONFIG_FB_UVESA) += uvesafb.o
The above should be a part of the driver patch, as you can't add Makefile
targets fow which no source files exist yet.
> diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c
> index 5e66213..085b612 100644
> --- a/arch/mips/sgi-ip22/ip22-setup.c Thu Jan 1 00:00:00 1970
> +++ b/arch/mips/sgi-ip22/ip22-setup.c Fri May 8 01:05:13 2009
> @@ -96,4 +96,41 @@ void __init plat_mem_setup(void)
> }
> }
> #endif
> +#if defined(CONFIG_FB_IMPACT)
> + {
> + extern void setup_impact_earlycons(void);
> + /*
> + * Get graphics info before it is overwritten...
> + * E.g. @ 9000000020f02f78: ffffffff9fc6d770,900000001f000000
> + */
> +#ifdef CONFIG_ARC64
> + ULONG * (*__vec)(void) = (typeof(__vec))
> + ((ULONG*)PROMBLOCK->pvector)[8];
> + ULONG *gfxinfo = (*__vec)();
> +#else
> + /* supposed to work on both 32/64-bit kernels. */
> + int (*__vec)(void) = (typeof(__vec))
> + (long) ((int*)PROMBLOCK->pvector)[8];
> + int *gfxinfo = (typeof(gfxinfo)) (*__vec)();
> +#endif
> + /* See note on __pa() in impact.c */
> + sgi_gfxaddr = __pa((void*)gfxinfo[1]);
> + if (sgi_gfxaddr < 0x1f000000 || 0x1fa00000 <= sgi_gfxaddr)
Immediate should generally be the right operand in comparison.
> 2) The driver
> drivers/video/impact.c | 1154 ++++++++++++++++++++++++++++++++++++++++++++++++
> include/video/impact.h | 210 +++++++++
> 2 files changed, 1364 insertions(+), 0 deletions(-)
You should have posted it in a separate mail.
> diff --git a/drivers/video/impact.c b/drivers/video/impact.c
> new file mode 100644
> index 0000000..5ffc948
> --- /dev/null Wed Dec 8 00:46:04 2004
> +++ b/drivers/video/impact.c Mon Jul 25 00:06:58 2011
> @@ -0,0 +1,1154 @@
I lack the time to review such a large driver, unfortunately...
WBR, Sergei
next prev parent reply other threads:[~2011-09-12 9:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-11 11:14 [PATCH] Impact video driver for SGI Indigo2 peter fuerst
2011-09-12 9:56 ` Sergei Shtylyov [this message]
2011-09-13 12:43 ` Joshua Kinard
2011-09-13 20:27 ` Re (early con): " peter fuerst
2011-09-13 21:32 ` Re (R8000...): " peter fuerst
2011-09-14 14:50 ` Ralf Baechle
2011-09-15 13:49 ` [PATCH 0/4] " peter fuerst
-- strict thread matches above, loose matches on Subject: below --
2011-09-13 9:39 [PATCH] " peter fuerst
2011-09-13 10:03 ` Jayachandran C.
2011-09-13 10:38 ` Sergei Shtylyov
2011-09-13 12:20 ` peter fuerst
2011-09-13 13:03 ` peter fuerst
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=4E6DD754.7000907@mvista.com \
--to=sshtylyov@mvista.com \
--cc=attilio.fiandrotti@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=post@pfrst.de \
--cc=ralf@linux-mips.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