From f589be88caf32501a734e531180d5df5d6089ef3 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sun, 22 Jul 2012 11:55:54 +1000 Subject: drm/nouveau/pageflip: kick flip handling out of engsw and into fence This is all very much a policy thing, and hence will not belong in SW after the rework. engsw now only handles receiving the event to say "can flip now" and makes a callback to perform the actual work. Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nv04_software.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'drivers/gpu/drm/nouveau/nv04_software.c') diff --git a/drivers/gpu/drm/nouveau/nv04_software.c b/drivers/gpu/drm/nouveau/nv04_software.c index 06c316b386ac..ceeb868c7c29 100644 --- a/drivers/gpu/drm/nouveau/nv04_software.c +++ b/drivers/gpu/drm/nouveau/nv04_software.c @@ -41,16 +41,8 @@ struct nv04_software_chan { static int mthd_flip(struct nouveau_channel *chan, u32 class, u32 mthd, u32 data) { - - struct nouveau_page_flip_state state; - - if (!nouveau_finish_page_flip(chan, &state)) { - nv_set_crtc_base(chan->dev, state.crtc, state.offset + - state.y * state.pitch + - state.x * state.bpp / 8); - } - - return 0; + struct nv04_software_chan *pch = chan->engctx[NVOBJ_ENGINE_SW]; + return pch->base.flip(pch->base.flip_data); } static int @@ -62,7 +54,7 @@ nv04_software_context_new(struct nouveau_channel *chan, int engine) if (!pch) return -ENOMEM; - nouveau_software_context_new(&pch->base); + nouveau_software_context_new(chan, &pch->base); chan->engctx[engine] = pch; return 0; } -- cgit v1.2.3