diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-07-22 05:55:54 +0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-10-03 07:12:55 +0400 |
commit | f589be88caf32501a734e531180d5df5d6089ef3 (patch) | |
tree | c6653b5d6aa47aade8abc79c0bb73462f82eef01 /drivers/gpu/drm/nouveau/nv04_software.c | |
parent | bc9e7b9a61e9e92ddb58920cb2cb5c2e2825ca8a (diff) | |
download | linux-f589be88caf32501a734e531180d5df5d6089ef3.tar.xz |
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 <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv04_software.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_software.c | 14 |
1 files changed, 3 insertions, 11 deletions
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; } |