I'm using ati-drivers-8.10.19 on an ATI X600 with 64MB. The contained fglrx driver fails to set MTRR upon X startup. It says: >> mtrr: base(0xf0000000) is not aligned on a size(0x7ff0000) boundary. >> [fglrx:firegl_addmap] *ERROR* mtrr allocation failed (-22) I searched for details on that and found in http://developer.intel.ru/design/pentium4/manuals/253668.htm section 10.11.14: "for each range greater than 4KB, range must be of length 2**n". 0x7ff0000 is not of length 2**n. Smth is wrong in the ATI driver. Reproducible: Always Steps to Reproduce: 1. emerge ati-drivers 2. run startx 3. check result through dmesg Actual Results: It says: >> mtrr: base(0xf0000000) is not aligned on a size(0x7ff0000) boundary. >> [fglrx:firegl_addmap] *ERROR* mtrr allocation failed (-22) Expected Results: The driver should have set the MTRR correctly.
I posted a bug report to ATI customer care: Ticket #: 737-784596 Let's see how they take it. Cheers.
Could you please attach the emerge info output and your .config?
Created attachment 55130 [details] kernel .config file
Created attachment 55131 [details] emerge info output
Digging further it seems the driver tries to set 2 memory type ranges: a first one of size 128M-64K and a second of 64K. Both have type WC (write-combining), so setting one single 128M range would be enough. A possible patch is to modify file firegl_public.c and make the ff change: <code> int ATI_API_CALL __ke_mtrr_add_wc(unsigned long base, unsigned long size) { #ifdef CONFIG_MTRR + /* find the nearest 2**n value for size */ + unsigned long correct_size = 0x1000; /* start with 4KB */ + while (correct_size<size) correct_size=correct_size*2; return mtrr_add(base, correct_size, MTRR_TYPE_WRCOMB, 1); #else /* !CONFIG_MTRR */ return -EPERM; #endif /* !CONFIG_MTRR */ } </code> Cheers.
is the latest released working as should?
Is still an issue?
Closed as worksforme. Reopen if the issue is still present