mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 14:05:19 +08:00
Merge branch 'drm-misc-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
- Mask mode type garbage from userspace (Ville) Something went wrong on the misc tree side, but I'll pull the patch directly. * 'drm-misc-next-fixes' of git://anongit.freedesktop.org/drm/drm-misc: drm: Fix uabi regression by allowing garbage mode->type from userspace
This commit is contained in:
commit
694f54f680
@ -1611,7 +1611,13 @@ int drm_mode_convert_umode(struct drm_device *dev,
|
||||
out->vscan = in->vscan;
|
||||
out->vrefresh = in->vrefresh;
|
||||
out->flags = in->flags;
|
||||
out->type = in->type;
|
||||
/*
|
||||
* Old xf86-video-vmware (possibly others too) used to
|
||||
* leave 'type' unititialized. Just ignore any bits we
|
||||
* don't like. It's a just hint after all, and more
|
||||
* useful for the kernel->userspace direction anyway.
|
||||
*/
|
||||
out->type = in->type & DRM_MODE_TYPE_ALL;
|
||||
strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN);
|
||||
out->name[DRM_DISPLAY_MODE_LEN-1] = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user