@@ -402,12 +402,13 @@ int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data,
402
402
{
403
403
struct drm_mode_obj_get_properties * arg = data ;
404
404
struct drm_mode_object * obj ;
405
+ struct drm_modeset_acquire_ctx ctx ;
405
406
int ret = 0 ;
406
407
407
408
if (!drm_core_check_feature (dev , DRIVER_MODESET ))
408
409
return - EOPNOTSUPP ;
409
410
410
- drm_modeset_lock_all (dev );
411
+ DRM_MODESET_LOCK_ALL_BEGIN (dev , ctx , 0 , ret );
411
412
412
413
obj = drm_mode_object_find (dev , file_priv , arg -> obj_id , arg -> obj_type );
413
414
if (!obj ) {
@@ -427,7 +428,7 @@ int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data,
427
428
out_unref :
428
429
drm_mode_object_put (obj );
429
430
out :
430
- drm_modeset_unlock_all ( dev );
431
+ DRM_MODESET_LOCK_ALL_END ( ctx , ret );
431
432
return ret ;
432
433
}
433
434
@@ -449,12 +450,13 @@ static int set_property_legacy(struct drm_mode_object *obj,
449
450
{
450
451
struct drm_device * dev = prop -> dev ;
451
452
struct drm_mode_object * ref ;
453
+ struct drm_modeset_acquire_ctx ctx ;
452
454
int ret = - EINVAL ;
453
455
454
456
if (!drm_property_change_valid_get (prop , prop_value , & ref ))
455
457
return - EINVAL ;
456
458
457
- drm_modeset_lock_all (dev );
459
+ DRM_MODESET_LOCK_ALL_BEGIN (dev , ctx , 0 , ret );
458
460
switch (obj -> type ) {
459
461
case DRM_MODE_OBJECT_CONNECTOR :
460
462
ret = drm_connector_set_obj_prop (obj , prop , prop_value );
@@ -468,7 +470,7 @@ static int set_property_legacy(struct drm_mode_object *obj,
468
470
break ;
469
471
}
470
472
drm_property_change_valid_put (prop , ref );
471
- drm_modeset_unlock_all ( dev );
473
+ DRM_MODESET_LOCK_ALL_END ( ctx , ret );
472
474
473
475
return ret ;
474
476
}
0 commit comments