drm: Partially sync drm_ioctl() with Linux 4.7.10