linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jordan Crouse" <jordan.crouse@amd.com>
To: Ben Gardner <gardner.ben@gmail.com>
Cc: linux-fbdev-devel@lists.sourceforge.net,
	James Simmons <jsimmons@infradead.org>
Subject: Re: 2.6.19-rc5: Geode GX frame buffer takes 13 seconds to initialize
Date: Mon, 20 Nov 2006 17:34:47 -0700	[thread overview]
Message-ID: <20061121003447.GD5160@cosmic.amd.com> (raw)
In-Reply-To: <808c8e9d0611201447y6e053e89m9a5333af91a235aa@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

On 20/11/06 16:47 -0600, Ben Gardner wrote:
> I tracked it down to the memset_io() call in gxfb_core.c that clears
> all the video memory.
> 
> It take 12.5 seconds to memset() a mere 16,384 Kibyte of memory.
> That seems a bit strange to me.
> 
> What's stranger is the time it takes to clear the fb memory:
> The first 4 MB clear in 0.01 s each.
> The last 12MB are SLOW.
 
Hmmm - thats interesting.  One thing about the current gxfb driver is that
it assumes a 16Mb framebuffer, which may or may not be what you have, since 
the amount of memory that is assigned to the graphics engine is configurable.

Its possible that you only have 4Mb of memory assigned to the graphics
engine, and that memsetting further is out being subtractively decoded on
the PCI bus and going nowhere slowly.

The attached patch queries the BIOS for the true amount of memory that
is configured.  The patch has been kicking around in the Geode git tree and 
-mm for a while so it should be sane.  Give it a try and see if it helps.

Jordan

[-- Attachment #2: patch_011 --]
[-- Type: text/plain, Size: 1434 bytes --]

Author: Jordan Crouse <jordan.crouse@amd.com>
Date:   Mon May 15 20:54:51 2006 -0600

    FB: Get the Geode GX frambuffer size from the BIOS
    
    Use the Geode GX BIOS virtual registers to get the actual size of the
    framebuffer.
    
    Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>

diff --git a/drivers/video/geode/display_gx.c b/drivers/video/geode/display_gx.c
index 825c340..0245169 100644
--- a/drivers/video/geode/display_gx.c
+++ b/drivers/video/geode/display_gx.c
@@ -21,10 +21,19 @@ #include <asm/delay.h>
 #include "geodefb.h"
 #include "display_gx.h"
 
-int gx_frame_buffer_size(void)
+unsigned int gx_frame_buffer_size(void)
 {
-	/* Assuming 16 MiB. */
-	return 16*1024*1024;
+	unsigned int val;
+
+	/* FB size is reported by a virtual register */
+	/* Virtual register class = 0x02 */
+	/* VG_MEM_SIZE(512Kb units) = 0x00 */
+
+	outw(0xFC53, 0xAC1C);
+	outw(0x0200, 0xAC1C);
+
+	val = (unsigned int)(inw(0xAC1E)) & 0xFFl;
+	return (val << 19);
 }
 
 int gx_line_delta(int xres, int bpp)
diff --git a/drivers/video/geode/display_gx.h b/drivers/video/geode/display_gx.h
index 86c6233..41e79f4 100644
--- a/drivers/video/geode/display_gx.h
+++ b/drivers/video/geode/display_gx.h
@@ -11,7 +11,7 @@
 #ifndef __DISPLAY_GX_H__
 #define __DISPLAY_GX_H__
 
-int gx_frame_buffer_size(void);
+unsigned int gx_frame_buffer_size(void);
 int gx_line_delta(int xres, int bpp);
 
 extern struct geode_dc_ops gx_dc_ops;


[-- Attachment #3: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #4: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

  reply	other threads:[~2006-11-21  0:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 16:29 2.6.19-rc5: Geode GX frame buffer takes 13 seconds to initialize Ben Gardner
2006-11-20 16:34 ` James Simmons
2006-11-20 22:47   ` Ben Gardner
2006-11-21  0:34     ` Jordan Crouse [this message]
2006-11-21 14:18       ` Ben Gardner
2006-11-27 16:28         ` Ben Gardner
2006-11-27 18:21           ` James Simmons
2006-11-27 18:39             ` Jordan Crouse
2006-11-27 19:54               ` Andrew Morton
2006-11-27 20:35                 ` Andrew Morton
2006-11-27 21:07                   ` Jordan Crouse
2006-11-27 18:36           ` Jordan Crouse
2006-11-21 15:07       ` James Simmons
2006-11-20 17:06 ` Jordan Crouse

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=20061121003447.GD5160@cosmic.amd.com \
    --to=jordan.crouse@amd.com \
    --cc=gardner.ben@gmail.com \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).