Bug 8819 - make DRM_MODULES="radeon" fails on ppc; typo + x86-specific call [with patch]
make DRM_MODULES="radeon" fails on ppc; typo + x86-specific call [with patch]
Status: RESOLVED FIXED
Product: DRI
Classification: Unclassified
Component: DRM/other
DRI git
PowerPC Linux (All)
: high enhancement
Assigned To: Default DRI bug account
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-29 14:15 UTC by Katerina Barone-Adesi
Modified: 2006-10-30 02:21 UTC (History)
1 user (show)

See Also:


Attachments
Fix to the compile and undefined function errors mentioned in the bug report (814 bytes, patch)
2006-10-29 14:16 UTC, Katerina Barone-Adesi
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katerina Barone-Adesi 2006-10-29 14:15:29 UTC
Trying to run make DRM_MODULES="radeon" on ppc linux, there are two problems:
/home/me/x11/clean/drm/linux-core/drm_vm.c: In function ‘drm_io_prot’:
/home/me/x11/clean/drm/linux-core/drm_vm.c:60: error: ‘map’ undeclared (first
use in this function)
/home/me/x11/clean/drm/linux-core/drm_vm.c:60: error: (Each undeclared
identifier is reported only once
/home/me/x11/clean/drm/linux-core/drm_vm.c:60: error: for each function it
appears in.)

This is just a typo; -> needs to be changed to _.  Once this is fixed, the
module compiles, but does not load, as it refers to wbinvd (in 
drm_ttm_ipi_handler in drm_ttm.c), which doesn't exist on ppc.  
ati_pcigart.c contains the following code:
#if defined(__i386__) || defined(__x86_64__)
    wbinvd();
#else
    mb();
#endif
When this replaces the unconditional use of wbinvd in drm_ttm.c, the module
loads and direct rendering works (I'm using a ATI Technologies Inc RV350
[Mobility Radeon 9600 M10] in a Powerbook).

This code probably shouldn't be duplicated, but I'm not aware of what coding
standards are used by this project, sorry.
Comment 1 Katerina Barone-Adesi 2006-10-29 14:16:13 UTC
Created attachment 7576 [details] [review]
Fix to the compile and undefined function errors mentioned in the bug report
Comment 2 Thomas Hellström 2006-10-30 02:21:39 UTC
Thanks,
This is fixed in git now.

I've used the more generic flush_agp_cache() instead of wbinvd() / mb().
It should perform the correct operation on each supported arch.

/Thomas