[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: but I *don't* have 12M SGRAM!



On Wed, 23 Jun 1999, Konstantinos Margaritis wrote:

>On Wed, 23 Jun 1999, Geert Uytterhoeven wrote:
>
>> If atyfb incorrectly reports the memory size, please use
>> 
>>     video=atyfb:vram:8192
>
>I'll try that and report back, thanx.
> 
>> The fact that you have to disable the virtual screen indicates that you really
>> have less than 12 MB. The question is why the ATI thinks you have 12 MB.
>> Perhaps you got the wrong kind of memory expansion? If `video=atyfb:vram:8192'
>> still gives you problems, that would be an indicator.
>
>Yes, I thought of that, but I ordered it at the same time as the ati card,
>so that would be strange. Anyway, the ati s/w tells me I have 8M which is
>the correct, unless it's built in the s/w and is bogus :-)
>
>- --
>Konstantinos Margaritis
>

If you look through the atyfb.c code you will find the following
in the middle of a function which begins its definition with
__initfunc(static int aty_init(struct fb_info_aty *info, const char *name))
(the line numbers are correct for kernel version 2.2.6. comment is mine). 
Line 2586 is causing the incorrect vram size message.

   2584     if (Gx == GI_CHIP_ID) {
   2585         if (aty_ld_le32(CONFIG_STAT1, info) & 0x40000000)
   2586           info->total_vram += 0x400000;
   2587     }

I've noticed the following, you only get the 12mb vram size report if you use
BootX. If you use bootvars, 8MB is reported but only 4MB gets allocated/used. 
BootX allocates the full 8MB and the only harm is the 12MB false message. BootX
however has the nasty effect of making my display all "snowy" about an inch
from the left edge. I find that the card must be initialized by the MacOS after
a power outage or complete shutdown, otherwise all hell breaks loose with the 
display. Not a big problem since I almost never shut the machine off.
It would be nice if this were fixed properly, and I've had several tries but 
I'm still not smart enough to manage the complete task.

It is easily worked around by using the params Geert has suggested.
You may also "hard wire" your 8mb vram size with the obvious alterations 
(very minor) to the nearby code. Here's how I do it.
   
    if (Gx == GI_CHIP_ID) {
      if (aty_ld_le32(CONFIG_STAT1, info) & 0x40000000)

/* begin cheesy hack which should only work for Rage Pro 8MB */
/* replace next line which causes extra 4MB error in vram size message */

/*     info->total_vram += 0x400000;    */
       info->total_vram = 0x800000; 

/* Right, now pretend a vram parameter was passed to kernel at boot time */
/* BootX: this part not necessary? Does not cure leftside snow problem */

       i = i & ~(gtb_memsize ? 0xF : MEM_SIZE_ALIAS);
           i |= gtb_memsize ? MEM_SIZE_8M_GTB : MEM_SIZE_8M;
       aty_st_le32(MEM_CNTL, i, info);

/* end cheesy hack */

    }

-- 
{]>===-                       {]>===-                         {]>===- 
Jeff Zahourek                            Because without beer, things
jeffzahourek@cjnetworks.com              do not seem to go as well.
http://www.cjnetworks.com/~jeffzahourek/                 -- Anonymous



Reply to: