Re: [XFree86] Weirdness in mga_video.c code

2003-12-18 Thread Ed Sweetman
David Dawes wrote:
[EMAIL PROTECTED] is probably a better place for this]

On Thu, Dec 18, 2003 at 12:36:25AM -0500, Ed Sweetman wrote:

I ran across a little oddity while working on the matrox driver.  In 
MGAPutImage, the ScreenInfoPtr sent to it which is then converted to a 
MGAPtr does not have drmCtx set to a non-zero value even though dri is 
enabled and working at the time the function is called.  I do not 
understand why this is and consider it to be a bug. Can anyone shed some 
light on this?  This is of course working on the cvs pull of X.


You'll have to be a little more specific/precise.  I don't see any
field called drmCtx in the current XFree86 CVS version of the
mga driver, for example.
David
Well that would be because I added it.  Getting my source trees mixed 
up.  Ok. sorry about that.  But i do have another question.

The reason why I mixed that stuff up was because a friend and I have 
been working on giving mga DMA'd XV for kicks and giggles and that code 
was added in the very beginning.  Now, we've borrowed a lot from the ati 
R128 driver in how it uses blits to do DMA.  We felt this was viable 
because the MGA and R128 driver are very similar in how the code is 
structured and functions.  However, this is the first time we've both 
worked on video cards at this level to this degree and we're having 
trouble getting the actual blit code to work correctly. I keep getting 
this error.
[drm:mga_verify_blit] *ERROR* *** bad blit: src=0x1 dst=0x300

Obviously I have no idea how to create a blit or something.  The mga 
driver's blit structure is drastically different from the R128's so i've 
used some inference to fill in the missing pieces and what not. 
Fallbacks work correctly, so does using the option method of turning it 
off and on.  Once this little hurdle of code is done then we should see 
the same type of dma benefits (if any) as the R128 card gets.  The YV12 
code is not expected to work as is for dma due to all the nasty 
multiplexing and all but there is another patch out there we're going to 
try and get a hold of that may eliminate the need for all that 
multiplexing and give us a function like the YUY2 one.

Anyway, if any developers wanna check out this blit code and tell me 
what i'm doing wrong with it... it's in mga_video.c in the MGADMA function.
just cd ./xc/programs/Xserver/hw/xfree86/drivers/mga and patch -p1 the 
attached patch.

or if the list doesn't like attached patches i'll host it on a temp 
site.  http://signal-lost.homeip.net:3001/mga_xvdma.patch.bz2

If nobody can help we still plan on continuing with the patch so anyone 
interested in the results of all this messing around need not give up. :)



mga_xvdma.patch.bz2
Description: BZip2 compressed data


Re: [XFree86] Weirdness in mga_video.c code

2003-12-18 Thread Ed Sweetman
line 967 of mga_dri.c has a typo on the comment. it has to be fixed to 
*/ so that the code below it is not commented out. sorry bout that.

Ed Sweetman wrote:
David Dawes wrote:

[EMAIL PROTECTED] is probably a better place for this]

On Thu, Dec 18, 2003 at 12:36:25AM -0500, Ed Sweetman wrote:

I ran across a little oddity while working on the matrox driver.  In 
MGAPutImage, the ScreenInfoPtr sent to it which is then converted to 
a MGAPtr does not have drmCtx set to a non-zero value even though dri 
is enabled and working at the time the function is called.  I do not 
understand why this is and consider it to be a bug. Can anyone shed 
some light on this?  This is of course working on the cvs pull of X.


You'll have to be a little more specific/precise.  I don't see any
field called drmCtx in the current XFree86 CVS version of the
mga driver, for example.
David


Well that would be because I added it.  Getting my source trees mixed 
up.  Ok. sorry about that.  But i do have another question.

The reason why I mixed that stuff up was because a friend and I have 
been working on giving mga DMA'd XV for kicks and giggles and that code 
was added in the very beginning.  Now, we've borrowed a lot from the ati 
R128 driver in how it uses blits to do DMA.  We felt this was viable 
because the MGA and R128 driver are very similar in how the code is 
structured and functions.  However, this is the first time we've both 
worked on video cards at this level to this degree and we're having 
trouble getting the actual blit code to work correctly. I keep getting 
this error.
[drm:mga_verify_blit] *ERROR* *** bad blit: src=0x1 dst=0x300

Obviously I have no idea how to create a blit or something.  The mga 
driver's blit structure is drastically different from the R128's so i've 
used some inference to fill in the missing pieces and what not. 
Fallbacks work correctly, so does using the option method of turning it 
off and on.  Once this little hurdle of code is done then we should see 
the same type of dma benefits (if any) as the R128 card gets.  The YV12 
code is not expected to work as is for dma due to all the nasty 
multiplexing and all but there is another patch out there we're going to 
try and get a hold of that may eliminate the need for all that 
multiplexing and give us a function like the YUY2 one.

Anyway, if any developers wanna check out this blit code and tell me 
what i'm doing wrong with it... it's in mga_video.c in the MGADMA function.
just cd ./xc/programs/Xserver/hw/xfree86/drivers/mga and patch -p1 the 
attached patch.

or if the list doesn't like attached patches i'll host it on a temp 
site.  http://signal-lost.homeip.net:3001/mga_xvdma.patch.bz2

If nobody can help we still plan on continuing with the patch so anyone 
interested in the results of all this messing around need not give up. :)



___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] Weirdness in mga_video.c code

2003-12-18 Thread Ed Sweetman
David Dawes wrote:
[EMAIL PROTECTED] is probably a better place for this]

On Thu, Dec 18, 2003 at 12:36:25AM -0500, Ed Sweetman wrote:

I ran across a little oddity while working on the matrox driver.  In 
MGAPutImage, the ScreenInfoPtr sent to it which is then converted to a 
MGAPtr does not have drmCtx set to a non-zero value even though dri is 
enabled and working at the time the function is called.  I do not 
understand why this is and consider it to be a bug. Can anyone shed some 
light on this?  This is of course working on the cvs pull of X.


You'll have to be a little more specific/precise.  I don't see any
field called drmCtx in the current XFree86 CVS version of the
mga driver, for example.
David
Well that would be because I added it.  Getting my source trees mixed 
up.  Ok. sorry about that.  But i do have another question.

The reason why I mixed that stuff up was because a friend and I have 
been working on giving mga DMA'd XV for kicks and giggles and that code 
was added in the very beginning.  Now, we've borrowed a lot from the ati 
R128 driver in how it uses blits to do DMA.  We felt this was viable 
because the MGA and R128 driver are very similar in how the code is 
structured and functions.  However, this is the first time we've both 
worked on video cards at this level to this degree and we're having 
trouble getting the actual blit code to work correctly. I keep getting 
this error.
[drm:mga_verify_blit] *ERROR* *** bad blit: src=0x1 dst=0x300

Obviously I have no idea how to create a blit or something.  The mga 
driver's blit structure is drastically different from the R128's so i've 
used some inference to fill in the missing pieces and what not. 
Fallbacks work correctly, so does using the option method of turning it 
off and on.  Once this little hurdle of code is done then we should see 
the same type of dma benefits (if any) as the R128 card gets.  The YV12 
code is not expected to work as is for dma due to all the nasty 
multiplexing and all but there is another patch out there we're going to 
try and get a hold of that may eliminate the need for all that 
multiplexing and give us a function like the YUY2 one.

Anyway, if any developers wanna check out this blit code and tell me 
what i'm doing wrong with it... it's in mga_video.c in the MGADMA function.
just cd ./xc/programs/Xserver/hw/xfree86/drivers/mga and patch -p1 the 
attached patch.

or if the list doesn't like attached patches i'll host it on a temp 
site.  http://signal-lost.homeip.net:3001/mga_xvdma.patch.bz2

If nobody can help we still plan on continuing with the patch so anyone 
interested in the results of all this messing around need not give up. :)



mga_xvdma.patch.bz2
Description: BZip2 compressed data


Re: [XFree86] Weirdness in mga_video.c code

2003-12-17 Thread David Dawes
[EMAIL PROTECTED] is probably a better place for this]

On Thu, Dec 18, 2003 at 12:36:25AM -0500, Ed Sweetman wrote:
I ran across a little oddity while working on the matrox driver.  In 
MGAPutImage, the ScreenInfoPtr sent to it which is then converted to a 
MGAPtr does not have drmCtx set to a non-zero value even though dri is 
enabled and working at the time the function is called.  I do not 
understand why this is and consider it to be a bug. Can anyone shed some 
light on this?  This is of course working on the cvs pull of X.

You'll have to be a little more specific/precise.  I don't see any
field called drmCtx in the current XFree86 CVS version of the
mga driver, for example.

David
-- 
David Dawes
developer/release engineer  The XFree86 Project
www.XFree86.org/~dawes
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


[XFree86] Weirdness in mga_video.c code

2003-12-17 Thread Ed Sweetman
I ran across a little oddity while working on the matrox driver.  In 
MGAPutImage, the ScreenInfoPtr sent to it which is then converted to a 
MGAPtr does not have drmCtx set to a non-zero value even though dri is 
enabled and working at the time the function is called.  I do not 
understand why this is and consider it to be a bug. Can anyone shed some 
light on this?  This is of course working on the cvs pull of X.

___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] Weirdness in mga_video.c code

2003-12-17 Thread David Dawes
[EMAIL PROTECTED] is probably a better place for this]

On Thu, Dec 18, 2003 at 12:36:25AM -0500, Ed Sweetman wrote:
I ran across a little oddity while working on the matrox driver.  In 
MGAPutImage, the ScreenInfoPtr sent to it which is then converted to a 
MGAPtr does not have drmCtx set to a non-zero value even though dri is 
enabled and working at the time the function is called.  I do not 
understand why this is and consider it to be a bug. Can anyone shed some 
light on this?  This is of course working on the cvs pull of X.

You'll have to be a little more specific/precise.  I don't see any
field called drmCtx in the current XFree86 CVS version of the
mga driver, for example.

David
-- 
David Dawes
developer/release engineer  The XFree86 Project
www.XFree86.org/~dawes
___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86