diff options
-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); |