Commit 93260d3c authored by Marcin Slusarz's avatar Marcin Slusarz Committed by Ben Skeggs
Browse files

drm/nouveau: report channel owner in error messages

parent a2896ced
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
 * Authors: Ben Skeggs
 */

#include <core/client.h>
#include <core/falcon.h>
#include <core/class.h>
#include <core/enum.h>
@@ -100,8 +101,9 @@ nva3_copy_intr(struct nouveau_subdev *subdev)
	if (stat & 0x00000040) {
		nv_error(falcon, "DISPATCH_ERROR [");
		nouveau_enum_print(nva3_copy_isr_error_name, ssta);
		pr_cont("] ch %d [0x%010llx] subc %d mthd 0x%04x data 0x%08x\n",
		       chid, inst << 12, subc, mthd, data);
		pr_cont("] ch %d [0x%010llx %s] subc %d mthd 0x%04x data 0x%08x\n",
		       chid, inst << 12, nouveau_client_name(engctx), subc,
		       mthd, data);
		nv_wo32(falcon, 0x004, 0x00000040);
		stat &= ~0x00000040;
	}
+4 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
 * Authors: Ben Skeggs
 */

#include <core/client.h>
#include <core/os.h>
#include <core/enum.h>
#include <core/class.h>
@@ -128,8 +129,9 @@ nv84_crypt_intr(struct nouveau_subdev *subdev)
	if (stat) {
		nv_error(priv, "");
		nouveau_bitfield_print(nv84_crypt_intr_mask, stat);
		pr_cont(" ch %d [0x%010llx] mthd 0x%04x data 0x%08x\n",
		       chid, (u64)inst << 12, mthd, data);
		pr_cont(" ch %d [0x%010llx %s] mthd 0x%04x data 0x%08x\n",
		       chid, (u64)inst << 12, nouveau_client_name(engctx),
		       mthd, data);
	}

	nv_wr32(priv, 0x102130, stat);
+4 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
 * Authors: Ben Skeggs
 */

#include <core/client.h>
#include <core/os.h>
#include <core/enum.h>
#include <core/class.h>
@@ -102,8 +103,9 @@ nv98_crypt_intr(struct nouveau_subdev *subdev)
	if (stat & 0x00000040) {
		nv_error(priv, "DISPATCH_ERROR [");
		nouveau_enum_print(nv98_crypt_isr_error_name, ssta);
		pr_cont("] ch %d [0x%010llx] subc %d mthd 0x%04x data 0x%08x\n",
		       chid, (u64)inst << 12, subc, mthd, data);
		pr_cont("] ch %d [0x%010llx %s] subc %d mthd 0x%04x data 0x%08x\n",
		       chid, (u64)inst << 12, nouveau_client_name(engctx),
		       subc, mthd, data);
		nv_wr32(priv, 0x087004, 0x00000040);
		stat &= ~0x00000040;
	}
+14 −8
Original line number Diff line number Diff line
@@ -421,9 +421,12 @@ nv04_fifo_cache_error(struct nouveau_device *device,
	}

	if (!nv04_fifo_swmthd(priv, chid, mthd, data)) {
		const char *client_name =
			nouveau_client_name_for_fifo_chid(&priv->base, chid);
		nv_error(priv,
			 "CACHE_ERROR - Ch %d/%d Mthd 0x%04x Data 0x%08x\n",
			 chid, (mthd >> 13) & 7, mthd & 0x1ffc, data);
			 "CACHE_ERROR - ch %d [%s] subc %d mthd 0x%04x data 0x%08x\n",
			 chid, client_name, (mthd >> 13) & 7, mthd & 0x1ffc,
			 data);
	}

	nv_wr32(priv, NV04_PFIFO_CACHE1_DMA_PUSH, 0);
@@ -445,11 +448,14 @@ static void
nv04_fifo_dma_pusher(struct nouveau_device *device, struct nv04_fifo_priv *priv,
		u32 chid)
{
	const char *client_name;
	u32 dma_get = nv_rd32(priv, 0x003244);
	u32 dma_put = nv_rd32(priv, 0x003240);
	u32 push = nv_rd32(priv, 0x003220);
	u32 state = nv_rd32(priv, 0x003228);

	client_name = nouveau_client_name_for_fifo_chid(&priv->base, chid);

	if (device->card_type == NV_50) {
		u32 ho_get = nv_rd32(priv, 0x003328);
		u32 ho_put = nv_rd32(priv, 0x003320);
@@ -457,9 +463,9 @@ nv04_fifo_dma_pusher(struct nouveau_device *device, struct nv04_fifo_priv *priv,
		u32 ib_put = nv_rd32(priv, 0x003330);

		nv_error(priv,
			 "DMA_PUSHER - Ch %d Get 0x%02x%08x Put 0x%02x%08x IbGet 0x%08x IbPut 0x%08x State 0x%08x (err: %s) Push 0x%08x\n",
			 chid, ho_get, dma_get, ho_put, dma_put, ib_get, ib_put,
			 state, nv_dma_state_err(state), push);
			 "DMA_PUSHER - ch %d [%s] get 0x%02x%08x put 0x%02x%08x ib_get 0x%08x ib_put 0x%08x state 0x%08x (err: %s) push 0x%08x\n",
			 chid, client_name, ho_get, dma_get, ho_put, dma_put,
			 ib_get, ib_put, state, nv_dma_state_err(state), push);

		/* METHOD_COUNT, in DMA_STATE on earlier chipsets */
		nv_wr32(priv, 0x003364, 0x00000000);
@@ -471,9 +477,9 @@ nv04_fifo_dma_pusher(struct nouveau_device *device, struct nv04_fifo_priv *priv,
			nv_wr32(priv, 0x003334, ib_put);
	} else {
		nv_error(priv,
			 "DMA_PUSHER - Ch %d Get 0x%08x Put 0x%08x State 0x%08x (err: %s) Push 0x%08x\n",
			 chid, dma_get, dma_put, state, nv_dma_state_err(state),
			 push);
			 "DMA_PUSHER - ch %d [%s] get 0x%08x put 0x%08x state 0x%08x (err: %s) push 0x%08x\n",
			 chid, client_name, dma_get, dma_put, state,
			 nv_dma_state_err(state), push);

		if (dma_get != dma_put)
			nv_wr32(priv, 0x003244, dma_put);
+2 −1
Original line number Diff line number Diff line
@@ -129,7 +129,8 @@ nv50_fifo_context_detach(struct nouveau_object *parent, bool suspend,
	/* do the kickoff... */
	nv_wr32(priv, 0x0032fc, nv_gpuobj(base)->addr >> 12);
	if (!nv_wait_ne(priv, 0x0032fc, 0xffffffff, 0xffffffff)) {
		nv_error(priv, "channel %d unload timeout\n", chan->base.chid);
		nv_error(priv, "channel %d [%s] unload timeout\n",
			 chan->base.chid, nouveau_client_name(chan));
		if (suspend)
			ret = -EBUSY;
	}
Loading