Bug 32326

Summary: [R200] DRM version check only looks at minor number.
Product: Mesa Reporter: Chris Rankin <rankincj>
Component: Drivers/DRI/r200Assignee: Default DRI bug account <dri-devel>
Status: REOPENED --- QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH] Enable microtiling for R200 if DRM >= v2.x
[PATCH] Don't even consider enabling microtiling unless DRM major version is 1.

Description Chris Rankin 2010-12-11 14:45:58 UTC
Created attachment 41021 [details] [review]
[PATCH] Enable microtiling for R200 if DRM >= v2.x

Mesa only checks the minor DRM version number when deciding whether to enable texture microtiling. This would imply that microtiling hasn't been enabled since the 2.6.30 kernel.

The HyperZ check for R200 does examine that the major DRM version number, but completely disables HyperZ for DRM v2.x. I don't know if this is intentional or not.
Comment 1 Chris Rankin 2010-12-11 14:54:08 UTC
There is a similar absence of DRM major version number checking in the radeonCreateScreen() funtion in radeon_screen.c
Comment 2 Dave Airlie 2010-12-11 15:33:59 UTC
This is correct, v2.x is a whole new interface that needs support to be added for these features.

Having v2 doesn't imply all the v1.x features since the whole kernel interface changed.
Comment 3 Chris Rankin 2010-12-11 15:38:10 UTC
(In reply to comment #2)
> Having v2 doesn't imply all the v1.x features since the whole kernel interface
> changed.

Then the current code is NOT correct, because it should examine the DRM major version number and insist that it equals 1 instead.
Comment 4 Dave Airlie 2010-12-11 20:23:28 UTC
radeonCreatescreen is only called in DRI1 system,

radeonCreateScreen2 is called on DRI2 systems. 

You can only have a version 1.x driver with a DRI1 system
and a version 2.x driver with a DRI2 system.

Short of hacking things to force some wierd codepaths you can't cross the streams.
Comment 5 Chris Rankin 2010-12-12 06:10:22 UTC
Created attachment 41039 [details] [review]
[PATCH] Don't even consider enabling microtiling unless DRM major version is 1.

If DRM v2.x doesn't support microtiling on R200 yet then the DRM version check in Mesa is no longer adequate.
Comment 6 Matt Turner 2011-09-15 12:12:36 UTC
(In reply to comment #5)
> Created an attachment (id=41039) [details]
> [PATCH] Don't even consider enabling microtiling unless DRM major version is 1.
> 
> If DRM v2.x doesn't support microtiling on R200 yet then the DRM version check
> in Mesa is no longer adequate.

Did you read/understand Dave's previous comment?

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.