Skip to content

Commit

Permalink
drm/nouveau/sw: fix oops if gpu has its display block disabled
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Dec 3, 2013
1 parent 2fd04c8 commit 13cd1a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/core/engine/software/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 13cd1a5

Please sign in to comment.