drm: Break out ioctl permission check to a separate function v2