Page 1 of 2
AGP
Posted: Tue Jul 31, 2012 1:25 pm
by hidnplayr
After reading
this osdev page, I believe KolibriOS would benefit from a simple AGP 'driver'.
Summary of the page: AGP cards always run in 1x speed mode on startup, by setting some bits we can enable the true speed the card supports. (x2, x4 or x8)
Anybody here knows more about the subject? (Eg if this is benefiteable with simple VESA drivers?)
Re: AGP
Posted: Wed Aug 01, 2012 1:47 am
by art_zh
I know almost nothing about AGP, but imho it stays in the last century, forever.
PCIe is faster, cheaper, better standardized, not that much copper-dependant, and has no limit reached yet.
Re: AGP
Posted: Wed Aug 01, 2012 10:09 am
by XVilka
Also it is hard to find AGP based mainboard
Re: AGP
Posted: Wed Aug 01, 2012 11:02 am
by hidnplayr
I have a lot of AGP based mainboards and AGP cards at home, I already wrote half of the code so I'll test it when I get home.
AGP is indeed old (pre 2004) but the effort required to simply enable the card is nihil to the possible speed gain (x2, x4 or even x8) on this older hardware.
Re: AGP
Posted: Thu Aug 02, 2012 11:52 am
by hidnplayr
Driver seems to be working (detection of card and its properties is correct) but i have zero increased FPS on all demos
I feel like I should focus on my main project again, so if somebody else feels like investigating, here is the code to load the driver:
Spoiler:
Code: Select all
format binary as ""
use32
db 'MENUET01'
dd 1
dd start
dd i_end
dd mem
dd mem
dd 0, 0
start:
mov eax, 68
mov ebx, 16
mov ecx, drvname
int 0x40
test eax, eax
jz .fail
mov [control], eax
mov eax, 68
mov ebx, 17
mov ecx, control
int 0x40
.fail:
mov eax, -1
int 0x40
drvname db 'AGP', 0
control dd ?
dd 1
dd 0
dd 0
dd 0
i_end:
align 16
rb 16
mem:
AGP3 spec is here:
http://download.intel.com/support/mothe ... /agp30.pdf
(see page 43-49 or appendix B for starters)
Re: AGP
Posted: Thu Aug 02, 2012 12:31 pm
by Serge
I think performance boost will be only for DMA transfers, not for CPU
Re: AGP
Posted: Thu Aug 02, 2012 12:33 pm
by hidnplayr
Serge wrote:I think performance boost will be only for DMA transfers, not for CPU
Oh, then I wrongly assumed KolibriOS used DMA already!
Re: AGP
Posted: Thu Aug 02, 2012 10:22 pm
by Serge
hidnplayr wrote:
Oh, then I wrongly assumed KolibriOS used DMA already!
It's can works on old ATI cards, but no acceleration is used now
Re: AGP
Posted: Thu Aug 02, 2012 11:11 pm
by hidnplayr
Serge wrote:hidnplayr wrote:
Oh, then I wrongly assumed KolibriOS used DMA already!
It's can works on old ATI cards, but no acceleration is used now
I have some ATI rage II d, would it benefit from this, and how?
Re: AGP
Posted: Mon Aug 06, 2012 3:24 pm
by Serge
No, I mean Radeons. RageII is too old
Re: AGP
Posted: Mon Aug 06, 2012 5:12 pm
by hidnplayr
Ok, I have an ATI radeon HD 3650 on AGP I could use to test when I find the time.
Re: AGP
Posted: Mon Aug 06, 2012 8:15 pm
by Albom
Hi! I have ATI Radeon 9600 on AGP. Can I help you with testing?
Re: AGP
Posted: Mon Aug 06, 2012 8:31 pm
by hidnplayr
Albom wrote:Hi! I have ATI Radeon 9600 on AGP. Can I help you with testing?
1. compile the code posted above and save it somewhere on your kolibrios image (for example: /rd/1/agp)
2. compile the driver code from SVN and save it in /rd/1/drivers/agp.obj
3. In kolibriOS, run the program you compiled in step 1, the driver will output some information on the debug board
4. now see if you notice any improvements in graphics speed
Re: AGP
Posted: Mon Aug 06, 2012 9:49 pm
by Albom
I've tested the driver with the last nightbuild. Quote from the boardlog.txt:
AGP driver loaded.
Searching for AGP card...
AGP3 device found
8x speed
Side band addressing
AGP device enabled
Upd. Results of MGB:
Spoiler:
-
BEFORE.png (6.02 KiB)
Viewed 11298 times
-
AFTER.png (6.13 KiB)
Viewed 11298 times
Re: AGP
Posted: Tue Aug 07, 2012 1:46 am
by hidnplayr
Well, it seems to be working but gained result isnt as large as expected. It's because most graphical operations are performed by the CPU I think.
But hey, it works, it could be usefull in the future.