diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-15 16:08:23 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-15 16:08:23 +0000 |
commit | fc046aabde76142fce130773d78d797d7d750ab7 (patch) | |
tree | f262bf7241e5268c894075d9babb8476077abe26 | |
parent | 66cc9c69657ac2703f2c7fc3c2c50f06bf5daa99 (diff) |
sna/dri: Don't attempt to change tiling if it is a no-op
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/intel_module.c | 6 | ||||
-rw-r--r-- | src/sna/sna_dri.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/intel_module.c b/src/intel_module.c index 6e2af570..2c0e5cc6 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -280,10 +280,8 @@ static Bool has_kernel_mode_setting(struct pci_device *dev) dev->domain, dev->bus, dev->dev, dev->func); ret = drmCheckModesettingSupported(id); - if (ret) { - if (xf86LoadKernelModule("i915")) - ret = drmCheckModesettingSupported(id); - } + if (ret && xf86LoadKernelModule("i915")) + ret = drmCheckModesettingSupported(id); /* Be nice to the user and load fbcon too */ if (!ret) (void)xf86LoadKernelModule("fbcon"); diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index d0e19cf3..c83d5809 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -157,7 +157,7 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna, PixmapPtr pixmap) { struct sna_pixmap *priv; - uint32_t tiling; + int tiling; priv = sna_pixmap_force_to_gpu(pixmap, MOVE_READ | MOVE_WRITE); if (priv == NULL) @@ -167,6 +167,8 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna, return ref(priv->gpu_bo); tiling = color_tiling(sna, &pixmap->drawable); + if (tiling < 0) + tiling = -tiling; if (priv->gpu_bo->tiling != tiling) sna_pixmap_change_tiling(pixmap, tiling); |