Searched hist:eb8eb02e (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/gpu/drm/ |
H A D | drm_property.c | eb8eb02e Mon Apr 03 03:32:55 CDT 2017 Daniel Vetter <daniel.vetter@ffwll.ch> drm: Drop modeset_lock_all from the getproperty ioctl
Properties, i.e. the struct drm_property specifying the type and value range of a property, not the instantiation on a given object, are invariant over the lifetime of a driver.
Hence no locking at all is needed, we can just remove it.
While at it give the function some love and simplify it, to get it under the 80 char limit: - Straighten the loops to reduce the nesting. - use u64_to_user_ptr casting helper - use put_user for fixed u64 copies.
Note there's a small behavioural change in that we now copy parts of the values to userspace if the arrays are a bit too small. Since userspace will immediately retry anyway, this doesn't matter.
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-7-daniel.vetter@ffwll.ch eb8eb02e Mon Apr 03 03:32:55 CDT 2017 Daniel Vetter <daniel.vetter@ffwll.ch> drm: Drop modeset_lock_all from the getproperty ioctl Properties, i.e. the struct drm_property specifying the type and value range of a property, not the instantiation on a given object, are invariant over the lifetime of a driver. Hence no locking at all is needed, we can just remove it. While at it give the function some love and simplify it, to get it under the 80 char limit: - Straighten the loops to reduce the nesting. - use u64_to_user_ptr casting helper - use put_user for fixed u64 copies. Note there's a small behavioural change in that we now copy parts of the values to userspace if the arrays are a bit too small. Since userspace will immediately retry anyway, this doesn't matter. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-7-daniel.vetter@ffwll.ch
|