/*
* Silicon Motion SM712 frame buffer device
*
* Copyright (C) 2006 Silicon Motion Technology Corp.
* Authors: Ge Wang, gewang@siliconmotion.com
* Boyod boyod.yang@siliconmotion.com.cn
*
* Copyright (C) 2009 Lemote, Inc.
* Author: Wu Zhangjin, wuzhangjin@gmail.com
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive for
* more details.
*/
#define FB_ACCEL_SMI_LYNX 88
#define SCREEN_X_RES 1024
#define SCREEN_Y_RES_PC 768
#define SCREEN_Y_RES_NETBOOK 600
#define SCREEN_BPP 16
#define dac_reg (0 x3c8)
#define dac_val (0 x3c9)
extern void __iomem *smtc_regbaseaddress;
#define smtc_mmiowb(dat, reg) writeb(dat, smtc_regbaseaddress + reg)
#define smtc_mmiorb(reg) readb(smtc_regbaseaddress + reg)
#define SIZE_SR00_SR04 (0 x04 - 0 x00 + 1 )
#define SIZE_SR10_SR24 (0 x24 - 0 x10 + 1 )
#define SIZE_SR30_SR75 (0 x75 - 0 x30 + 1 )
#define SIZE_SR80_SR93 (0 x93 - 0 x80 + 1 )
#define SIZE_SRA0_SRAF (0 xAF - 0 xA0 + 1 )
#define SIZE_GR00_GR08 (0 x08 - 0 x00 + 1 )
#define SIZE_AR00_AR14 (0 x14 - 0 x00 + 1 )
#define SIZE_CR00_CR18 (0 x18 - 0 x00 + 1 )
#define SIZE_CR30_CR4D (0 x4D - 0 x30 + 1 )
#define SIZE_CR90_CRA7 (0 xA7 - 0 x90 + 1 )
static inline void smtc_crtcw(int reg, int val)
{
smtc_mmiowb(reg, 0 x3d4);
smtc_mmiowb(val, 0 x3d5);
}
static inline void smtc_grphw(int reg, int val)
{
smtc_mmiowb(reg, 0 x3ce);
smtc_mmiowb(val, 0 x3cf);
}
static inline void smtc_attrw(int reg, int val)
{
smtc_mmiorb(0 x3da);
smtc_mmiowb(reg, 0 x3c0);
smtc_mmiorb(0 x3c1);
smtc_mmiowb(val, 0 x3c0);
}
static inline void smtc_seqw(int reg, int val)
{
smtc_mmiowb(reg, 0 x3c4);
smtc_mmiowb(val, 0 x3c5);
}
static inline unsigned int smtc_seqr(int reg)
{
smtc_mmiowb(reg, 0 x3c4);
return smtc_mmiorb(0 x3c5);
}
/* The next structure holds all information relevant for a specific video mode.
*/
struct modeinit {
int mmsizex;
int mmsizey;
int bpp;
int hz;
unsigned char init_misc;
unsigned char init_sr00_sr04[SIZE_SR00_SR04];
unsigned char init_sr10_sr24[SIZE_SR10_SR24];
unsigned char init_sr30_sr75[SIZE_SR30_SR75];
unsigned char init_sr80_sr93[SIZE_SR80_SR93];
unsigned char init_sra0_sraf[SIZE_SRA0_SRAF];
unsigned char init_gr00_gr08[SIZE_GR00_GR08];
unsigned char init_ar00_ar14[SIZE_AR00_AR14];
unsigned char init_cr00_cr18[SIZE_CR00_CR18];
unsigned char init_cr30_cr4d[SIZE_CR30_CR4D];
unsigned char init_cr90_cra7[SIZE_CR90_CRA7];
};
#ifdef __BIG_ENDIAN
#define pal_rgb(r, g, b, val) (((r & 0 xf800) >> 8 ) | \
((g & 0 xe000) >> 13 ) | \
((g & 0 x1c00) << 3 ) | \
((b & 0 xf800) >> 3 ))
#define big_addr 0 x800000
#define mmio_addr 0 x00800000
#define seqw17() smtc_seqw(0 x17, 0 x30)
#define big_pixel_depth(p, d) {if (p == 24 ) {p = 32 ; d = 32 ; } }
#define big_swap(p) ((p & 0 xff00ff00 >> 8 ) | (p & 0 x00ff00ff << 8 ))
#else
#define pal_rgb(r, g, b, val) val
#define big_addr 0
#define mmio_addr 0 x00c00000
#define seqw17() do { } while (0 )
#define big_pixel_depth(p, d) do { } while (0 )
#define big_swap(p) p
#endif
Messung V0.5 in Prozent C=95 H=91 G=92
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-06-08)
¤
*© Formatika GbR, Deutschland