From: Francisco Jerez Date: Tue, 21 Sep 2010 17:03:19 +0000 (+0200) Subject: drm/nv10: Don't oops if the card wants to switch to a channel with no grctx. X-Git-Tag: firefly_0821_release~7613^2~3600^2~28^2~32 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bb338bb6f230aa70e70dc0d27af1b7a8efc34cdd;p=firefly-linux-kernel-4.4.55.git drm/nv10: Don't oops if the card wants to switch to a channel with no grctx. Signed-off-by: Francisco Jerez Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nv10_graph.c b/drivers/gpu/drm/nouveau/nv10_graph.c index b2f6a57c0cc5..8e68c9731159 100644 --- a/drivers/gpu/drm/nouveau/nv10_graph.c +++ b/drivers/gpu/drm/nouveau/nv10_graph.c @@ -803,7 +803,7 @@ nv10_graph_context_switch(struct drm_device *dev) /* Load context for next channel */ chid = (nv_rd32(dev, NV04_PGRAPH_TRAPPED_ADDR) >> 20) & 0x1f; chan = dev_priv->fifos[chid]; - if (chan) + if (chan && chan->pgraph_ctx) nv10_graph_load_context(chan); pgraph->fifo_access(dev, true);