Skip to content

Commit

Permalink
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: GEM on PAE has problems - disable it for now.
  drm/i915: Don't return busy for buffers left on the flushing list.
  • Loading branch information
torvalds committed Dec 19, 2008
2 parents db873cf + ac5c4e7 commit f3485c8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
10 changes: 9 additions & 1 deletion drivers/gpu/drm/i915/i915_dma.c
Expand Up @@ -717,7 +717,7 @@ static int i915_getparam(struct drm_device *dev, void *data,
value = dev->pci_device;
break;
case I915_PARAM_HAS_GEM:
value = 1;
value = dev_priv->has_gem;
break;
default:
DRM_ERROR("Unknown parameter %d\n", param->param);
Expand Down Expand Up @@ -830,6 +830,14 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)

dev_priv->regs = ioremap(base, size);

#ifdef CONFIG_HIGHMEM64G
/* don't enable GEM on PAE - needs agp + set_memory_* interface fixes */
dev_priv->has_gem = 0;
#else
/* enable GEM by default */
dev_priv->has_gem = 1;
#endif

i915_gem_load(dev);

/* Init HWS */
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/i915_drv.h
Expand Up @@ -106,6 +106,8 @@ struct intel_opregion {
typedef struct drm_i915_private {
struct drm_device *dev;

int has_gem;

void __iomem *regs;
drm_local_map_t *sarea;

Expand Down
9 changes: 8 additions & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Expand Up @@ -2309,7 +2309,14 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
}

obj_priv = obj->driver_private;
args->busy = obj_priv->active;
/* Don't count being on the flushing list against the object being
* done. Otherwise, a buffer left on the flushing list but not getting
* flushed (because nobody's flushing that domain) won't ever return
* unbusy and get reused by libdrm's bo cache. The other expected
* consumer of this interface, OpenGL's occlusion queries, also specs
* that the objects get unbusy "eventually" without any interference.
*/
args->busy = obj_priv->active && obj_priv->last_rendering_seqno != 0;

drm_gem_object_unreference(obj);
mutex_unlock(&dev->struct_mutex);
Expand Down

0 comments on commit f3485c8

Please sign in to comment.