File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,11 @@ unsigned int init_pci(unsigned char bus, const unsigned char forcemem) {
158
158
159
159
ret = getvram ();
160
160
if (ret == 0 ) {
161
+ if (strcmp (drm_name , "amdgpu" ) == 0 ) {
162
+ #ifndef ENABLE_AMDGPU
163
+ printf (_ ("amdgpu DRM driver is used, but amdgpu VRAM usage reporting is not enabled\n" ));
164
+ #endif
165
+ }
161
166
printf (_ ("Failed to get VRAM usage, kernel likely too old\n" ));
162
167
goto out ;
163
168
}
@@ -193,8 +198,6 @@ unsigned long long getvram() {
193
198
request .query = AMDGPU_INFO_VRAM_USAGE ;
194
199
195
200
ret = drmCommandWrite (drm_fd , DRM_AMDGPU_INFO , & request , sizeof (request ));
196
- #else
197
- printf (_ ("amdgpu DRM driver is used, but amdgpu VRAM usage reporting is not enabled\n" ));
198
201
#endif
199
202
}
200
203
if (ret ) return 0 ;
You can’t perform that action at this time.
0 commit comments