mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-04 23:38:02 +02:00
i915: Reinstate check that drawable has valid information in i915_vblank_swap.
This commit is contained in:
parent
78d111fa96
commit
e349b58b4a
1 changed files with 15 additions and 0 deletions
|
|
@ -612,6 +612,21 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
DRM_SPINLOCK_IRQSAVE(&dev->drw_lock, irqflags);
|
||||
|
||||
/* It makes no sense to schedule a swap for a drawable that doesn't have
|
||||
* valid information at this point. E.g. this could mean that the X
|
||||
* server is too old to push drawable information to the DRM, in which
|
||||
* case all such swaps would become ineffective.
|
||||
*/
|
||||
if (!drm_get_drawable_info(dev, swap->drawable)) {
|
||||
DRM_SPINUNLOCK_IRQRESTORE(&dev->drw_lock, irqflags);
|
||||
DRM_DEBUG("Invalid drawable ID %d\n", swap->drawable);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
DRM_SPINUNLOCK_IRQRESTORE(&dev->drw_lock, irqflags);
|
||||
|
||||
curseq = atomic_read(pipe ? &dev->vbl_received2 : &dev->vbl_received);
|
||||
|
||||
if (seqtype == _DRM_VBLANK_RELATIVE)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue