From 30430df204d02982bb47ea341d449e6b012aa179 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Thu, 28 Mar 2013 23:19:27 +0000 Subject: add support for relaxed deltas --- sys/dev/pci/drm/i915/i915_dma.c | 5 ++++- sys/dev/pci/drm/i915/i915_drv.c | 8 +------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/dev/pci/drm/i915/i915_dma.c b/sys/dev/pci/drm/i915/i915_dma.c index 3f18b341984..b25576c3735 100644 --- a/sys/dev/pci/drm/i915/i915_dma.c +++ b/sys/dev/pci/drm/i915/i915_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_dma.c,v 1.5 2013/03/27 12:37:49 jsg Exp $ */ +/* $OpenBSD: i915_dma.c,v 1.6 2013/03/28 23:19:26 jsg Exp $ */ /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- */ /* @@ -112,6 +112,9 @@ i915_getparam(struct inteldrm_softc *dev_priv, void *data) case I915_PARAM_HAS_EXEC_CONSTANTS: value = INTEL_INFO(dev)->gen >= 4; break; + case I915_PARAM_HAS_RELAXED_DELTA: + value = 1; + break; case I915_PARAM_HAS_GEN7_SOL_RESET: value = 1; break; diff --git a/sys/dev/pci/drm/i915/i915_drv.c b/sys/dev/pci/drm/i915/i915_drv.c index 2b84941a775..90a26ff3f06 100644 --- a/sys/dev/pci/drm/i915/i915_drv.c +++ b/sys/dev/pci/drm/i915/i915_drv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_drv.c,v 1.11 2013/03/28 19:36:14 kettenis Exp $ */ +/* $OpenBSD: i915_drv.c,v 1.12 2013/03/28 23:19:26 jsg Exp $ */ /* * Copyright (c) 2008-2009 Owain G. Ainsworth * @@ -1653,12 +1653,6 @@ i915_gem_object_pin_and_relocate(struct drm_obj *obj, goto err; } - if (reloc->delta > target_obj->size) { - DRM_ERROR("reloc larger than target\n"); - ret = EINVAL; - goto err; - } - /* Map the page containing the relocation we're going to * perform. */ -- cgit v1.2.3