File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -237,8 +237,6 @@ static bool nv0_register_fd(const int nv0_fd, int nvctl_fd) {
237
237
}
238
238
239
239
static bool get_device_info (const int fd , NVDriverContext * context ) {
240
- //NVIDIA driver v545.29.02 changed the devInfo struct, and partly broke it in the process
241
- //...who adds a field to the middle of an existing struct....
242
240
if (context -> driverMajorVersion >= 575 ) {
243
241
struct drm_nvidia_get_dev_info_params_575 devInfo575 ;
244
242
const int ret = ioctl (fd , DRM_IOCTL_NVIDIA_GET_DEV_INFO_575 , & devInfo575 );
@@ -252,7 +250,9 @@ static bool get_device_info(const int fd, NVDriverContext *context) {
252
250
context -> sector_layout = devInfo575 .sector_layout ;
253
251
context -> page_kind_generation = devInfo575 .page_kind_generation ;
254
252
context -> generic_page_kind = devInfo575 .generic_page_kind ;
255
- } else if (context -> driverMajorVersion >= 545 && context -> driverMinorVersion >= 29 ) {
253
+ } else if (context -> driverMajorVersion > 545 || (context -> driverMajorVersion == 545 && context -> driverMinorVersion >= 29 )) {
254
+ //NVIDIA driver v545.29.02 changed the devInfo struct, and partly broke it in the process
255
+ //...who adds a field to the middle of an existing struct....
256
256
struct drm_nvidia_get_dev_info_params_545 devInfo545 ;
257
257
const int ret = ioctl (fd , DRM_IOCTL_NVIDIA_GET_DEV_INFO_545 , & devInfo545 );
258
258
You can’t perform that action at this time.
0 commit comments