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

Commit e9e3c8a2 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6

nouveau fixes a number of regressions and a few user triggerable oops
since -rc1. Along with a few mpeg engine fixes.

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: fix semaphore dmabuf obj
  drm/nouveau/vm: make vm refcount into a kref
  drm/nv31/mpeg: don't recognize nv3x cards as having nv44 graph class
  drm/nv40/mpeg: write magic value to channel object to make it work
  drm/nouveau: fix size check for cards without vm
  drm/nv50-/disp: remove dcb_outp_match call, and related variables
  drm/nva3-/disp: fix hda eld writing, needs to be padded
  drm/nv31/mpeg: fix mpeg engine initialization
  drm/nv50/mc: include vp in the fb error reporting mask
  drm/nouveau: fix null pointer dereference in poll_changed
  drm/nv50/gpio: post-nv92 cards have 32 interrupt lines
  drm/nvc0/fb: take lock in nvc0_ram_put()
  drm/nouveau/core: xtensa firmware size needs to be 0x40000 no matter what
parents ca089b72 7a7da592
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ nva3_hda_eld(struct nv50_disp_priv *priv, int or, u8 *data, u32 size)
	if (data && data[0]) {
		for (i = 0; i < size; i++)
			nv_wr32(priv, 0x61c440 + soff, (i << 8) | data[i]);
		for (; i < 0x60; i++)
			nv_wr32(priv, 0x61c440 + soff, (i << 8));
		nv_mask(priv, 0x61c448 + soff, 0x80000003, 0x80000003);
	} else
	if (data) {
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ nvd0_hda_eld(struct nv50_disp_priv *priv, int or, u8 *data, u32 size)
	if (data && data[0]) {
		for (i = 0; i < size; i++)
			nv_wr32(priv, 0x10ec00 + soff, (i << 8) | data[i]);
		for (; i < 0x60; i++)
			nv_wr32(priv, 0x10ec00 + soff, (i << 8));
		nv_mask(priv, 0x10ec10 + soff, 0x80000003, 0x80000003);
	} else
	if (data) {
+0 −8
Original line number Diff line number Diff line
@@ -47,14 +47,8 @@ int
nv50_sor_mthd(struct nouveau_object *object, u32 mthd, void *args, u32 size)
{
	struct nv50_disp_priv *priv = (void *)object->engine;
	struct nouveau_bios *bios = nouveau_bios(priv);
	const u16 type = (mthd & NV50_DISP_SOR_MTHD_TYPE) >> 12;
	const u8  head = (mthd & NV50_DISP_SOR_MTHD_HEAD) >> 3;
	const u8  link = (mthd & NV50_DISP_SOR_MTHD_LINK) >> 2;
	const u8    or = (mthd & NV50_DISP_SOR_MTHD_OR);
	const u16 mask = (0x0100 << head) | (0x0040 << link) | (0x0001 << or);
	struct dcb_output outp;
	u8  ver, hdr;
	u32 data;
	int ret = -EINVAL;

@@ -62,8 +56,6 @@ nv50_sor_mthd(struct nouveau_object *object, u32 mthd, void *args, u32 size)
		return -EINVAL;
	data = *(u32 *)args;

	if (type && !dcb_outp_match(bios, type, mask, &ver, &hdr, &outp))
		return -ENODEV;

	switch (mthd & ~0x3f) {
	case NV50_DISP_SOR_PWR:
+6 −3
Original line number Diff line number Diff line
@@ -265,8 +265,8 @@ nv31_mpeg_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
int
nv31_mpeg_init(struct nouveau_object *object)
{
	struct nouveau_engine *engine = nv_engine(object->engine);
	struct nv31_mpeg_priv *priv = (void *)engine;
	struct nouveau_engine *engine = nv_engine(object);
	struct nv31_mpeg_priv *priv = (void *)object;
	struct nouveau_fb *pfb = nouveau_fb(object);
	int ret, i;

@@ -284,7 +284,10 @@ nv31_mpeg_init(struct nouveau_object *object)
	/* PMPEG init */
	nv_wr32(priv, 0x00b32c, 0x00000000);
	nv_wr32(priv, 0x00b314, 0x00000100);
	nv_wr32(priv, 0x00b220, nv44_graph_class(priv) ? 0x00000044 : 0x00000031);
	if (nv_device(priv)->chipset >= 0x40 && nv44_graph_class(priv))
		nv_wr32(priv, 0x00b220, 0x00000044);
	else
		nv_wr32(priv, 0x00b220, 0x00000031);
	nv_wr32(priv, 0x00b300, 0x02001ec1);
	nv_mask(priv, 0x00b32c, 0x00000001, 0x00000001);

+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ nv40_mpeg_context_ctor(struct nouveau_object *parent,
	if (ret)
		return ret;

	nv_wo32(&chan->base.base, 0x78, 0x02001ec1);
	return 0;
}

Loading