sna/dri: Don't attempt to change tiling if it is a no-op
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
66cc9c6965
commit
fc046aabde
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue