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

Commit 94bc70a8 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'drm-nouveau-fixes' of...

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

Regression fixes since rework mostly.

* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nvc0/fb: fix crash when different mutex is used to protect same list
  drm/nouveau/clock: fix support for more than 2 monitors on nve0
  drm/nv50/disp: fix selection of bios script for analog outputs
  drm/nv17-50: restore fence buffer on resume
  drm/nouveau: fix blank LVDS screen regression on pre-nv50 cards
  drm/nouveau: fix nouveau_client allocation failure path
  drm/nouveau: don't return freed object from nouveau_handle_create
  drm/nouveau/vm: fix memory corruption when pgt allocation fails
  drm/nouveau: add locking around instobj list operations
  drm/nouveau: do not forcibly power on lvds panels
  drm/nouveau/devinit: ensure legacy vga control is enabled during post
parents 82ba789f 43f78979
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -66,10 +66,8 @@ nouveau_client_create_(const char *name, u64 devname, const char *cfg,

	ret = nouveau_handle_create(nv_object(client), ~0, ~0,
				    nv_object(client), &client->root);
	if (ret) {
		nouveau_namedb_destroy(&client->base);
	if (ret)
		return ret;
	}

	/* prevent init/fini being called, os in in charge of this */
	atomic_set(&nv_object(client)->usecount, 2);
+4 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ nouveau_handle_create(struct nouveau_object *parent, u32 _parent, u32 _handle,
	while (!nv_iclass(namedb, NV_NAMEDB_CLASS))
		namedb = namedb->parent;

	handle = *phandle = kzalloc(sizeof(*handle), GFP_KERNEL);
	handle = kzalloc(sizeof(*handle), GFP_KERNEL);
	if (!handle)
		return -ENOMEM;

@@ -146,6 +146,9 @@ nouveau_handle_create(struct nouveau_object *parent, u32 _parent, u32 _handle,
	}

	hprintk(handle, TRACE, "created\n");

	*phandle = handle;

	return 0;
}

+26 −20
Original line number Diff line number Diff line
@@ -851,20 +851,23 @@ exec_script(struct nv50_disp_priv *priv, int head, int id)
	for (i = 0; !(ctrl & (1 << head)) && i < 3; i++)
		ctrl = nv_rd32(priv, 0x610b5c + (i * 8));

	if (!(ctrl & (1 << head))) {
		if (nv_device(priv)->chipset  < 0x90 ||
		    nv_device(priv)->chipset == 0x92 ||
		    nv_device(priv)->chipset == 0xa0) {
			for (i = 0; !(ctrl & (1 << head)) && i < 2; i++)
				ctrl = nv_rd32(priv, 0x610b74 + (i * 8));
		i += 3;
			i += 4;
		} else {
			for (i = 0; !(ctrl & (1 << head)) && i < 4; i++)
				ctrl = nv_rd32(priv, 0x610798 + (i * 8));
		i += 3;
			i += 4;
		}
	}

	if (!(ctrl & (1 << head)))
		return false;
	i--;

	data = exec_lookup(priv, head, i, ctrl, &dcb, &ver, &hdr, &cnt, &len, &info);
	if (data) {
@@ -898,20 +901,23 @@ exec_clkcmp(struct nv50_disp_priv *priv, int head, int id, u32 pclk,
	for (i = 0; !(ctrl & (1 << head)) && i < 3; i++)
		ctrl = nv_rd32(priv, 0x610b58 + (i * 8));

	if (!(ctrl & (1 << head))) {
		if (nv_device(priv)->chipset  < 0x90 ||
		    nv_device(priv)->chipset == 0x92 ||
		    nv_device(priv)->chipset == 0xa0) {
			for (i = 0; !(ctrl & (1 << head)) && i < 2; i++)
				ctrl = nv_rd32(priv, 0x610b70 + (i * 8));
		i += 3;
			i += 4;
		} else {
			for (i = 0; !(ctrl & (1 << head)) && i < 4; i++)
				ctrl = nv_rd32(priv, 0x610794 + (i * 8));
		i += 3;
			i += 4;
		}
	}

	if (!(ctrl & (1 << head)))
		return 0x0000;
	i--;

	data = exec_lookup(priv, head, i, ctrl, outp, &ver, &hdr, &cnt, &len, &info1);
	if (!data)
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ nouveau_client(void *obj)

int  nouveau_client_create_(const char *name, u64 device, const char *cfg,
			    const char *dbg, int, void **);
#define nouveau_client_destroy(p)                                              \
	nouveau_namedb_destroy(&(p)->base)

int  nouveau_client_init(struct nouveau_client *);
int  nouveau_client_fini(struct nouveau_client *, bool suspend);

+2 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ enum nvbios_pll_type {
	PLL_UNK42  = 0x42,
	PLL_VPLL0  = 0x80,
	PLL_VPLL1  = 0x81,
	PLL_VPLL2  = 0x82,
	PLL_VPLL3  = 0x83,
	PLL_MAX    = 0xff
};

Loading