Commit 13cd1a55 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/sw: fix oops if gpu has its display block disabled

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 2fd04c81
......@@ -176,7 +176,7 @@ nv50_software_context_ctor(struct nouveau_object *parent,
if (ret)
return ret;
chan->vblank.nr_event = pdisp->vblank->index_nr;
chan->vblank.nr_event = pdisp ? pdisp->vblank->index_nr : 0;
chan->vblank.event = kzalloc(chan->vblank.nr_event *
sizeof(*chan->vblank.event), GFP_KERNEL);
if (!chan->vblank.event)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment