From: David Vrabel <dvrabel@arcom.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: Jordan Crouse <jordan.crouse@amd.com>
Subject: gxfb: Get the frambuffer size from the BIOS
Date: Tue, 30 May 2006 16:42:13 +0100 [thread overview]
Message-ID: <447C67D5.8030308@arcom.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 296 bytes --]
This works for me but the board I have can only have 16 MiB available
for the framebuffer so I've not tested any other sizes.
David Vrabel
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
[-- Attachment #2: drivers-video-geode-gx-fb-size --]
[-- Type: text/plain, Size: 1544 bytes --]
gxfb: Get the frambuffer size from the BIOS
From: Jordan Crouse <jordan.crouse@amd.com>
Use the Geode GX BIOS virtual registers to get the actual size of the
framebuffer.
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: David Vrabel <dvrabel@arcom.com>
---
drivers/video/geode/display_gx.c | 15 ++++++++++++---
drivers/video/geode/display_gx.h | 2 +-
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/video/geode/display_gx.c b/drivers/video/geode/display_gx.c
index 825c340..7c39925 100644
--- a/drivers/video/geode/display_gx.c
+++ b/drivers/video/geode/display_gx.c
@@ -21,10 +21,19 @@
#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;
reply other threads:[~2006-05-30 15:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=447C67D5.8030308@arcom.com \
--to=dvrabel@arcom.com \
--cc=jordan.crouse@amd.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.