OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [arch/] [or32/] [console/] [crtfb.c] - Diff between revs 764 and 798

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 764 Rev 798
Line 99... Line 99...
 
 
 
 
#define CRT_CTL_REG (CRT_BASE_ADD + 0)
#define CRT_CTL_REG (CRT_BASE_ADD + 0)
#define CRT_FB_BASE_REG (CRT_BASE_ADD + 4)
#define CRT_FB_BASE_REG (CRT_BASE_ADD + 4)
#define CRT_PAL_PTR  ((unsigned long *)(CRT_BASE_ADD + 0x400))
#define CRT_PAL_PTR  ((unsigned long *)(CRT_BASE_ADD + 0x400))
/*
 
#define setpal(i,r,g,b) *(CRT_PAL_PTR + (i)) = (((unsigned long)(r) & 0xff) << 22) | \
 
                                               (((unsigned long)(g) & 0xff) << 14) | \
 
                                               (((unsigned long)(b) & 0xff) << 6)
 
*/
 
 
 
#define setpal(i,r,g,b) *(CRT_PAL_PTR + (i)) = ((((unsigned long)(r) & 0xff)) << 11) | \
#define setpal(i,r,g,b) *(CRT_PAL_PTR + (i)) = ((((unsigned long)(r) & 0xff)) << 11) | \
                                               ((((unsigned long)(g) & 0xff)) << 5)  | \
                                               ((((unsigned long)(g) & 0xff)) << 5)  | \
                                               ((((unsigned long)(b) & 0xff)) << 0)
                                               ((((unsigned long)(b) & 0xff)) << 0)
 
 
/*
 
#define setpal(idx,r,g,b)  *(CRT_PAL_PTR + (idx)) = (((r) >> 3) << 11) | (((g) >> 2) << 5) | (((b) >> 3) << 0)
 
*/
 
#define CRT_WIDTH 640
#define CRT_WIDTH 640
#define CRT_HEIGHT 480
#define CRT_HEIGHT 480
 
 
 
 
static int crtKey = 0;
static int crtKey = 0;
Line 394... Line 386...
   int i;
   int i;
 
 
   var->xres = par->xres;
   var->xres = par->xres;
   var->yres = par->yres;
   var->yres = par->yres;
   var->xres_virtual = par->xres;
   var->xres_virtual = par->xres;
   var->yres_virtual = par->yres;
//   var->yres_virtual = par->yres;
 
   var->yres_virtual = 512*1024;
   var->xoffset = 0;
   var->xoffset = 0;
   var->yoffset = 0;
   var->yoffset = 0;
 
 
   var->bits_per_pixel = par->bpp;
   var->bits_per_pixel = par->bpp;
   var->grayscale = 0;
   var->grayscale = 0;
Line 1097... Line 1090...
    *    Since it's called by a kernel driver, no range checking is done.
    *    Since it's called by a kernel driver, no range checking is done.
    */
    */
 
 
static int crtfb_updatevar(int con)
static int crtfb_updatevar(int con)
{
{
 
   struct display *d;
 
 
 
   d = &disp[con];
 
 
 
   REG32(CRT_FB_BASE_REG) = crtMem + d->var.yoffset;
 
 
   return(0);
   return(0);
}
}
 
 
 
 
   /*
   /*

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.