Board.KolibriOS.org

Official KolibriOS board
It is currently Thu Apr 25, 2019 7:58 am

All times are UTC+03:00




Post new topic  Reply to topic  [ 17 posts ]  Go to page 1 2 Next
Author Message
 Post subject: AGP
PostPosted: Tue Jul 31, 2012 1:25 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
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?)

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: AGP
PostPosted: Wed Aug 01, 2012 1:47 am 
Offline
Kernel Developer
User avatar

Joined: Fri Aug 14, 2009 1:46 am
Posts: 1304
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.


Top
   
 Post subject: Re: AGP
PostPosted: Wed Aug 01, 2012 10:09 am 
Offline
User avatar

Joined: Tue Aug 25, 2009 4:45 pm
Posts: 794
Also it is hard to find AGP based mainboard


Top
   
 Post subject: Re: AGP
PostPosted: Wed Aug 01, 2012 11:02 am 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
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.

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: AGP
PostPosted: Thu Aug 02, 2012 11:52 am 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
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: Show
Code:
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)

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: AGP
PostPosted: Thu Aug 02, 2012 12:31 pm 
Offline
Kernel Developer

Joined: Wed Mar 08, 2006 6:25 pm
Posts: 3952
I think performance boost will be only for DMA transfers, not for CPU


Top
   
 Post subject: Re: AGP
PostPosted: Thu Aug 02, 2012 12:33 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
Serge wrote:
I think performance boost will be only for DMA transfers, not for CPU


Oh, then I wrongly assumed KolibriOS used DMA already!

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: AGP
PostPosted: Thu Aug 02, 2012 10:22 pm 
Offline
Kernel Developer

Joined: Wed Mar 08, 2006 6:25 pm
Posts: 3952
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


Top
   
 Post subject: Re: AGP
PostPosted: Thu Aug 02, 2012 11:11 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
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?

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: AGP
PostPosted: Mon Aug 06, 2012 3:24 pm 
Offline
Kernel Developer

Joined: Wed Mar 08, 2006 6:25 pm
Posts: 3952
No, I mean Radeons. RageII is too old


Top
   
 Post subject: Re: AGP
PostPosted: Mon Aug 06, 2012 5:12 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
Ok, I have an ATI radeon HD 3650 on AGP I could use to test when I find the time.

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: AGP
PostPosted: Mon Aug 06, 2012 8:15 pm 
Offline
Mentor
User avatar

Joined: Tue Jan 15, 2008 11:27 am
Posts: 752
Hi! I have ATI Radeon 9600 on AGP. Can I help you with testing?


Top
   
 Post subject: Re: AGP
PostPosted: Mon Aug 06, 2012 8:31 pm 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
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

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
 Post subject: Re: AGP
PostPosted: Mon Aug 06, 2012 9:49 pm 
Offline
Mentor
User avatar

Joined: Tue Jan 15, 2008 11:27 am
Posts: 752
I've tested the driver with the last nightbuild. Quote from the boardlog.txt:
Quote:
AGP driver loaded.
Searching for AGP card...
AGP3 device found
8x speed
Side band addressing
AGP device enabled


Upd. Results of MGB:
Spoiler: Show
Attachment:
BEFORE.png
BEFORE.png [ 6.02 KiB | Viewed 4448 times ]

Attachment:
AFTER.png
AFTER.png [ 6.13 KiB | Viewed 4448 times ]


Top
   
 Post subject: Re: AGP
PostPosted: Tue Aug 07, 2012 1:46 am 
Offline
Mentor/Kernel Developer
User avatar

Joined: Fri Jun 30, 2006 9:01 am
Posts: 1247
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.

_________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 17 posts ]  Go to page 1 2 Next

All times are UTC+03:00


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited