Bug 4277 - via_dri.h out of sync with DDX driver.
Summary: via_dri.h out of sync with DDX driver.
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/Unichrome (show other bugs)
Version: git
Hardware: x86 (IA32) All
: high major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-28 07:07 UTC by Luc Verhaegen
Modified: 2009-08-24 12:23 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
DRI: Sync via_dri.h (2.37 KB, patch)
2005-08-28 07:10 UTC, Luc Verhaegen
Details | Splinter Review
DDX: make via_dri.h more acceptable for DRI inclusion. (4.21 KB, patch)
2005-08-28 07:12 UTC, Luc Verhaegen
Details | Splinter Review
DRI: fix 2 issue with the unichrome DRI driver. (1.36 KB, patch)
2005-08-28 07:14 UTC, Luc Verhaegen
Details | Splinter Review
Resync with DDX and fix DDX versioning. (3.31 KB, patch)
2005-10-23 11:13 UTC, Luc Verhaegen
Details | Splinter Review

Description Luc Verhaegen 2005-08-28 07:07:38 UTC
A recent fix to the DDX in Xorg HEAD broke dri. via_dri.h, shared by both the
DDX and the DRI, have historically not been kept in sync. via_dri.h will now get
a comment telling that this file should be kept synced at all times.
Comment 1 Luc Verhaegen 2005-08-28 07:10:34 UTC
Created attachment 3075 [details] [review]
DRI: Sync via_dri.h

Was diffed against X.org HEAD. Apply to Mesa/src/mesa/drivers/dri/unichrome/
directly.
Comment 2 Luc Verhaegen 2005-08-28 07:12:12 UTC
Created attachment 3076 [details] [review]
DDX: make via_dri.h more acceptable for DRI inclusion.

diffed against current Xorg HEAD. Apply locally.
Comment 3 Luc Verhaegen 2005-08-28 07:14:09 UTC
Created attachment 3077 [details] [review]
DRI: fix 2 issue with the unichrome DRI driver.

- via_screen.c: attempts to use a variable after it getting freed.
- via_screen.c: passed wrong size to drmUnMap.
- via_texcombine.c: fix dual const warning.
Comment 4 Alan Hourihane 2005-08-30 12:46:54 UTC
Thanks Luc.

Committed. 

I've changed a few other things to ease building in solo and X builds too.

Let me know if something doesn't work correctly.
Comment 5 Luc Verhaegen 2005-08-31 07:46:18 UTC
Fallout from previous commits:

grep -n "viaScreen->reg"
via_context.c:564:    vmesa->regMMIOBase = (GLuint *)((GLuint)viaScreen->reg);
via_context.c:565:    vmesa->pnGEMode = (GLuint *)((GLuint)viaScreen->reg + 0x4);
via_context.c:566:    vmesa->regEngineStatus = (GLuint *)((GLuint)viaScreen->reg
+ 0x400);
via_context.c:567:    vmesa->regTranSet = (GLuint *)((GLuint)viaScreen->reg +
0x43C);
via_context.c:568:    vmesa->regTranSpace = (GLuint *)((GLuint)viaScreen->reg +
0x440);
via_screen.c:166:           drmUnmap(viaScreen->reg, gDRIPriv->regs.size);
via_screen.c:197:    drmUnmap(viaScreen->reg, gDRIPriv->regs.size);

viaScreen->reg is never assigned anymore.

I'm not certain why the drmAddress map change was necessary, but it will have
broken something, even though i'm seeing no adverse effects in running glxgears.
 But then, i didn't see anything with Bool as char either, amazingly.
Comment 6 Alan Hourihane 2005-08-31 08:20:39 UTC
Sorry, that was an change in my local tree that made it into the Mesa 6.4
branch, but it never got to the Mesa trunk code.

I've backed that out. 
Comment 7 Luc Verhaegen 2005-10-23 11:12:10 UTC
Resync with DDX via_dri.h, and properly updating DDX version.
Comment 8 Luc Verhaegen 2005-10-23 11:13:27 UTC
Created attachment 3604 [details] [review]
Resync with DDX and fix DDX versioning.
Comment 9 Thomas Hellström 2005-10-23 12:10:21 UTC
The via Xorg DDX version is still 4.1.31, and given the proximity of the Xorg
6.9/7.0 release, I dont't expect that to change? 
Your proposed minor version bump is incompatible with that, and Mesa will return
an error when started with the Xorg DDX.

I suggest we keep the Mesa versions in sync with whatever is currently in Xorg
CVS, which means that as soon as the 4.2 bump is commited to Xorg, The Mesa
trunk can be updated.

Comment 10 Luc Verhaegen 2005-10-23 14:52:02 UTC
Wake up and smell the coffee.

http://cvs.freedesktop.org/xorg/xc/lib/GL/mesa/drivers/dri/unichrome/Imakefile.inc?rev=1.5&view=log
http://cvs.freedesktop.org/xorg/xc/programs/Xserver/hw/xfree86/drivers/via/via_dri.c?rev=1.20&view=log
http://cvs.freedesktop.org/xorg/xc/programs/Xserver/hw/xfree86/drivers/via/via_dri.h?rev=1.11&view=log

The version bump should've happened when the first commits from this bug were made.
It should've happened when Egbert strayed over via_dri.h and fixed it.
But there was nothing there to warn him. The mesa side and the DDX side were
grossly out of sync then. It just hadn't been turned into a problem yet.

And it's not as if this version has anything to do with the actual DDX version.
It is only concerned about DRI DDX interaction. If you don't succeed in
separating this, you'll end up changing versions across the whole range of
drivers all the time.

What you're saying is; "Don't update the version as this will break things,
which broke because the version wasn't properly updated".
Comment 11 Eric Anholt 2005-10-23 15:09:32 UTC
If a field was removed from the ddx struct, the major version of that interface
will need to be bumped so old released versions of the client-side driver will
fail cleanly.  This needs to get fixed quickly since Mesa's about to be released
and the newly-released Mesa driver needs to be expecting the bumped major version.
Comment 12 Luc Verhaegen 2005-10-23 15:32:28 UTC
Then, in server/via_dri.h MAJOR should be set 5, MINOR should be set 0. And
via_dri.h in the ddx should be altered to match.
Comment 13 Thomas Hellström 2005-10-24 00:30:11 UTC
Hi.

OK, sorry, I missed that. 
I've updated Mesa-6.4 branch AND Xorg DDX versions to 5.0.0.
Mesa trunk will follow later hopefully today.
Xorg Mesa is not updated due to Xorg policy, 

http://xorg.freedesktop.org/wiki/CvsPolicy

but I guess mesa 6.4 will soon be imported.

I'm closing this. Please reopen if there are remaining problems.
/Thomas

 
Comment 14 Adam Jackson 2009-08-24 12:23:23 UTC
Mass version move, cvs -> git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.