Subversion Repositories Kolibri OS

Rev

Rev 4080 | Rev 4570 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4080 Rev 4569
Line 664... Line 664...
664
	if (unlikely(!surface->scanout))
664
	if (unlikely(!surface->scanout))
665
		return -EINVAL;
665
		return -EINVAL;
Line 666... Line 666...
666
 
666
 
667
	if (unlikely(surface->mip_levels[0] != 1 ||
667
	if (unlikely(surface->mip_levels[0] != 1 ||
668
		     surface->num_sizes != 1 ||
668
		     surface->num_sizes != 1 ||
669
		     surface->sizes[0].width < mode_cmd->width ||
669
		     surface->base_size.width < mode_cmd->width ||
670
		     surface->sizes[0].height < mode_cmd->height ||
670
		     surface->base_size.height < mode_cmd->height ||
671
		     surface->sizes[0].depth != 1)) {
671
		     surface->base_size.depth != 1)) {
672
		DRM_ERROR("Incompatible surface dimensions "
672
		DRM_ERROR("Incompatible surface dimensions "
673
			  "for requested mode.\n");
673
			  "for requested mode.\n");
674
		return -EINVAL;
674
		return -EINVAL;
Line 1515... Line 1515...
1515
		return 0;
1515
		return 0;
1516
	}
1516
	}
Line 1517... Line 1517...
1517
 
1517
 
1518
	obj = drm_mode_object_find(dev, arg->crtc_id, DRM_MODE_OBJECT_CRTC);
1518
	obj = drm_mode_object_find(dev, arg->crtc_id, DRM_MODE_OBJECT_CRTC);
1519
	if (!obj) {
1519
	if (!obj) {
1520
		ret = -EINVAL;
1520
		ret = -ENOENT;
1521
		goto out;
1521
		goto out;
Line 1522... Line 1522...
1522
	}
1522
	}
1523
 
1523
 
Line 1638... Line 1638...
1638
 
1638
 
1639
bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv,
1639
bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv,
1640
				uint32_t pitch,
1640
				uint32_t pitch,
1641
				uint32_t height)
1641
				uint32_t height)
1642
{
1642
{
1643
	return ((u64) pitch * (u64) height) < (u64) dev_priv->vram_size;
1643
	return ((u64) pitch * (u64) height) < (u64) dev_priv->prim_bb_mem;
Line 1644... Line 1644...
1644
}
1644
}
1645
 
1645