Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e26c73a authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes

* 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6:
  drm/nv86/fifo: suspend fix
  drm/nouveau: disable copy engine on NVAF
  nouveau: fixup scanout enable in nvc0_pm
  drm/nouveau/aux: mask off higher bits of auxch index in i2c table entry
  drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate
  drm/nve0/fifo: add support for the flip completion swmthd
parents a389b6a1 2064db72
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ nouveau_i2c_init(struct drm_device *dev)
			}
			break;
		case 6: /* NV50- DP AUX */
			port->drive = entry[0];
			port->drive = entry[0] & 0x0f;
			port->sense = port->drive;
			port->adapter.algo = &nouveau_dp_i2c_algo;
			break;
+0 −1
Original line number Diff line number Diff line
@@ -731,7 +731,6 @@ nouveau_card_init(struct drm_device *dev)
			case 0xa3:
			case 0xa5:
			case 0xa8:
			case 0xaf:
				nva3_copy_create(dev);
				break;
			}
+9 −0
Original line number Diff line number Diff line
@@ -117,17 +117,22 @@ nv84_fifo_context_del(struct nouveau_channel *chan, int engine)
	struct drm_device *dev = chan->dev;
	struct drm_nouveau_private *dev_priv = dev->dev_private;
	unsigned long flags;
	u32 save;

	/* remove channel from playlist, will context switch if active */
	spin_lock_irqsave(&dev_priv->context_switch_lock, flags);
	nv_mask(dev, 0x002600 + (chan->id * 4), 0x80000000, 0x00000000);
	nv50_fifo_playlist_update(dev);

	save = nv_mask(dev, 0x002520, 0x0000003f, 0x15);

	/* tell any engines on this channel to unload their contexts */
	nv_wr32(dev, 0x0032fc, chan->ramin->vinst >> 12);
	if (!nv_wait_ne(dev, 0x0032fc, 0xffffffff, 0xffffffff))
		NV_INFO(dev, "PFIFO: channel %d unload timeout\n", chan->id);

	nv_wr32(dev, 0x002520, save);

	nv_wr32(dev, 0x002600 + (chan->id * 4), 0x00000000);
	spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags);

@@ -184,10 +189,13 @@ nv84_fifo_fini(struct drm_device *dev, int engine, bool suspend)
	struct drm_nouveau_private *dev_priv = dev->dev_private;
	struct nv84_fifo_priv *priv = nv_engine(dev, engine);
	int i;
	u32 save;

	/* set playlist length to zero, fifo will unload context */
	nv_wr32(dev, 0x0032ec, 0);

	save = nv_mask(dev, 0x002520, 0x0000003f, 0x15);

	/* tell all connected engines to unload their contexts */
	for (i = 0; i < priv->base.channels; i++) {
		struct nouveau_channel *chan = dev_priv->channels.ptr[i];
@@ -199,6 +207,7 @@ nv84_fifo_fini(struct drm_device *dev, int engine, bool suspend)
		}
	}

	nv_wr32(dev, 0x002520, save);
	nv_wr32(dev, 0x002140, 0);
	return 0;
}
+1 −1
Original line number Diff line number Diff line
@@ -557,7 +557,7 @@ prog_mem(struct drm_device *dev, struct nvc0_pm_state *info)
	nouveau_mem_exec(&exec, info->perflvl);

	if (dev_priv->chipset < 0xd0)
		nv_wr32(dev, 0x611200, 0x00003300);
		nv_wr32(dev, 0x611200, 0x00003330);
	else
		nv_wr32(dev, 0x62c000, 0x03030300);
}
+1 −1
Original line number Diff line number Diff line
@@ -790,7 +790,7 @@ nvd0_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
	struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
	int ch = EVO_CURS(nv_crtc->index);

	evo_piow(crtc->dev, ch, 0x0084, (y << 16) | x);
	evo_piow(crtc->dev, ch, 0x0084, (y << 16) | (x & 0xffff));
	evo_piow(crtc->dev, ch, 0x0080, 0x00000000);
	return 0;
}
Loading