|
@@ -1125,7 +1125,7 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
|
|
|
{
|
|
|
union drm_wait_vblank *vblwait = data;
|
|
|
int ret = 0;
|
|
|
- unsigned int flags, seq, crtc;
|
|
|
+ unsigned int flags, seq, crtc, high_crtc;
|
|
|
|
|
|
if ((!drm_dev_to_irq(dev)) || (!dev->irq_enabled))
|
|
|
return -EINVAL;
|
|
@@ -1134,16 +1134,21 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
|
|
|
return -EINVAL;
|
|
|
|
|
|
if (vblwait->request.type &
|
|
|
- ~(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK)) {
|
|
|
+ ~(_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
|
|
|
+ _DRM_VBLANK_HIGH_CRTC_MASK)) {
|
|
|
DRM_ERROR("Unsupported type value 0x%x, supported mask 0x%x\n",
|
|
|
vblwait->request.type,
|
|
|
- (_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK));
|
|
|
+ (_DRM_VBLANK_TYPES_MASK | _DRM_VBLANK_FLAGS_MASK |
|
|
|
+ _DRM_VBLANK_HIGH_CRTC_MASK));
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
flags = vblwait->request.type & _DRM_VBLANK_FLAGS_MASK;
|
|
|
- crtc = flags & _DRM_VBLANK_SECONDARY ? 1 : 0;
|
|
|
-
|
|
|
+ high_crtc = (vblwait->request.type & _DRM_VBLANK_HIGH_CRTC_MASK);
|
|
|
+ if (high_crtc)
|
|
|
+ crtc = high_crtc >> _DRM_VBLANK_HIGH_CRTC_SHIFT;
|
|
|
+ else
|
|
|
+ crtc = flags & _DRM_VBLANK_SECONDARY ? 1 : 0;
|
|
|
if (crtc >= dev->num_crtcs)
|
|
|
return -EINVAL;
|
|
|
|