Loading drivers/gpu/drm/nouveau/core/engine/software/nv50.c +8 −8 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ nv50_software_mthd_dma_vblsem(struct nouveau_object *object, u32 mthd, if (nv_iclass(handle->object, NV_GPUOBJ_CLASS)) { if (nv_iclass(handle->object, NV_GPUOBJ_CLASS)) { struct nouveau_gpuobj *gpuobj = nv_gpuobj(handle->object); struct nouveau_gpuobj *gpuobj = nv_gpuobj(handle->object); chan->base.vblank.ctxdma = gpuobj->node->offset >> 4; chan->vblank.ctxdma = gpuobj->node->offset >> 4; ret = 0; ret = 0; } } nouveau_namedb_put(handle); nouveau_namedb_put(handle); Loading @@ -67,7 +67,7 @@ nv50_software_mthd_vblsem_offset(struct nouveau_object *object, u32 mthd, void *args, u32 size) void *args, u32 size) { { struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); chan->base.vblank.offset = *(u32 *)args; chan->vblank.offset = *(u32 *)args; return 0; return 0; } } Loading @@ -76,7 +76,7 @@ nv50_software_mthd_vblsem_value(struct nouveau_object *object, u32 mthd, void *args, u32 size) void *args, u32 size) { { struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); chan->base.vblank.value = *(u32 *)args; chan->vblank.value = *(u32 *)args; return 0; return 0; } } Loading @@ -90,7 +90,7 @@ nv50_software_mthd_vblsem_release(struct nouveau_object *object, u32 mthd, if (crtc > 1) if (crtc > 1) return -EINVAL; return -EINVAL; nouveau_event_get(disp->vblank, crtc, &chan->base.vblank.event); nouveau_event_get(disp->vblank, crtc, &chan->vblank.event); return 0; return 0; } } Loading Loading @@ -127,8 +127,8 @@ nv50_software_sclass[] = { static int static int nv50_software_vblsem_release(struct nouveau_eventh *event, int head) nv50_software_vblsem_release(struct nouveau_eventh *event, int head) { { struct nouveau_software_chan *chan = struct nv50_software_chan *chan = container_of(event, struct nouveau_software_chan, vblank.event); container_of(event, typeof(*chan), vblank.event); struct nv50_software_priv *priv = (void *)nv_object(chan)->engine; struct nv50_software_priv *priv = (void *)nv_object(chan)->engine; struct nouveau_bar *bar = nouveau_bar(priv); struct nouveau_bar *bar = nouveau_bar(priv); Loading Loading @@ -161,8 +161,8 @@ nv50_software_context_ctor(struct nouveau_object *parent, if (ret) if (ret) return ret; return ret; chan->base.vblank.channel = nv_gpuobj(parent->parent)->addr >> 12; chan->vblank.channel = nv_gpuobj(parent->parent)->addr >> 12; chan->base.vblank.event.func = nv50_software_vblsem_release; chan->vblank.event.func = nv50_software_vblsem_release; return 0; return 0; } } Loading drivers/gpu/drm/nouveau/core/engine/software/nv50.h +7 −0 Original line number Original line Diff line number Diff line Loading @@ -9,6 +9,13 @@ struct nv50_software_priv { struct nv50_software_chan { struct nv50_software_chan { struct nouveau_software_chan base; struct nouveau_software_chan base; struct { struct nouveau_eventh event; u32 channel; u32 ctxdma; u64 offset; u32 value; } vblank; }; }; #endif #endif drivers/gpu/drm/nouveau/core/engine/software/nvc0.c +10 −10 Original line number Original line Diff line number Diff line Loading @@ -45,11 +45,11 @@ nvc0_software_mthd_vblsem_offset(struct nouveau_object *object, u32 mthd, struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); u64 data = *(u32 *)args; u64 data = *(u32 *)args; if (mthd == 0x0400) { if (mthd == 0x0400) { chan->base.vblank.offset &= 0x00ffffffffULL; chan->vblank.offset &= 0x00ffffffffULL; chan->base.vblank.offset |= data << 32; chan->vblank.offset |= data << 32; } else { } else { chan->base.vblank.offset &= 0xff00000000ULL; chan->vblank.offset &= 0xff00000000ULL; chan->base.vblank.offset |= data; chan->vblank.offset |= data; } } return 0; return 0; } } Loading @@ -59,7 +59,7 @@ nvc0_software_mthd_vblsem_value(struct nouveau_object *object, u32 mthd, void *args, u32 size) void *args, u32 size) { { struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); chan->base.vblank.value = *(u32 *)args; chan->vblank.value = *(u32 *)args; return 0; return 0; } } Loading @@ -74,7 +74,7 @@ nvc0_software_mthd_vblsem_release(struct nouveau_object *object, u32 mthd, if ((nv_device(object)->card_type < NV_E0 && crtc > 1) || crtc > 3) if ((nv_device(object)->card_type < NV_E0 && crtc > 1) || crtc > 3) return -EINVAL; return -EINVAL; nouveau_event_get(disp->vblank, crtc, &chan->base.vblank.event); nouveau_event_get(disp->vblank, crtc, &chan->vblank.event); return 0; return 0; } } Loading Loading @@ -140,8 +140,8 @@ nvc0_software_sclass[] = { static int static int nvc0_software_vblsem_release(struct nouveau_eventh *event, int head) nvc0_software_vblsem_release(struct nouveau_eventh *event, int head) { { struct nouveau_software_chan *chan = struct nv50_software_chan *chan = container_of(event, struct nouveau_software_chan, vblank.event); container_of(event, typeof(*chan), vblank.event); struct nv50_software_priv *priv = (void *)nv_object(chan)->engine; struct nv50_software_priv *priv = (void *)nv_object(chan)->engine; struct nouveau_bar *bar = nouveau_bar(priv); struct nouveau_bar *bar = nouveau_bar(priv); Loading @@ -168,8 +168,8 @@ nvc0_software_context_ctor(struct nouveau_object *parent, if (ret) if (ret) return ret; return ret; chan->base.vblank.channel = nv_gpuobj(parent->parent)->addr >> 12; chan->vblank.channel = nv_gpuobj(parent->parent)->addr >> 12; chan->base.vblank.event.func = nvc0_software_vblsem_release; chan->vblank.event.func = nvc0_software_vblsem_release; return 0; return 0; } } Loading drivers/gpu/drm/nouveau/core/include/engine/software.h +0 −9 Original line number Original line Diff line number Diff line Loading @@ -3,19 +3,10 @@ #include <core/engine.h> #include <core/engine.h> #include <core/engctx.h> #include <core/engctx.h> #include <core/event.h> struct nouveau_software_chan { struct nouveau_software_chan { struct nouveau_engctx base; struct nouveau_engctx base; struct { struct nouveau_eventh event; u32 channel; u32 ctxdma; u64 offset; u32 value; } vblank; int (*flip)(void *); int (*flip)(void *); void *flip_data; void *flip_data; }; }; Loading Loading
drivers/gpu/drm/nouveau/core/engine/software/nv50.c +8 −8 Original line number Original line Diff line number Diff line Loading @@ -55,7 +55,7 @@ nv50_software_mthd_dma_vblsem(struct nouveau_object *object, u32 mthd, if (nv_iclass(handle->object, NV_GPUOBJ_CLASS)) { if (nv_iclass(handle->object, NV_GPUOBJ_CLASS)) { struct nouveau_gpuobj *gpuobj = nv_gpuobj(handle->object); struct nouveau_gpuobj *gpuobj = nv_gpuobj(handle->object); chan->base.vblank.ctxdma = gpuobj->node->offset >> 4; chan->vblank.ctxdma = gpuobj->node->offset >> 4; ret = 0; ret = 0; } } nouveau_namedb_put(handle); nouveau_namedb_put(handle); Loading @@ -67,7 +67,7 @@ nv50_software_mthd_vblsem_offset(struct nouveau_object *object, u32 mthd, void *args, u32 size) void *args, u32 size) { { struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); chan->base.vblank.offset = *(u32 *)args; chan->vblank.offset = *(u32 *)args; return 0; return 0; } } Loading @@ -76,7 +76,7 @@ nv50_software_mthd_vblsem_value(struct nouveau_object *object, u32 mthd, void *args, u32 size) void *args, u32 size) { { struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); chan->base.vblank.value = *(u32 *)args; chan->vblank.value = *(u32 *)args; return 0; return 0; } } Loading @@ -90,7 +90,7 @@ nv50_software_mthd_vblsem_release(struct nouveau_object *object, u32 mthd, if (crtc > 1) if (crtc > 1) return -EINVAL; return -EINVAL; nouveau_event_get(disp->vblank, crtc, &chan->base.vblank.event); nouveau_event_get(disp->vblank, crtc, &chan->vblank.event); return 0; return 0; } } Loading Loading @@ -127,8 +127,8 @@ nv50_software_sclass[] = { static int static int nv50_software_vblsem_release(struct nouveau_eventh *event, int head) nv50_software_vblsem_release(struct nouveau_eventh *event, int head) { { struct nouveau_software_chan *chan = struct nv50_software_chan *chan = container_of(event, struct nouveau_software_chan, vblank.event); container_of(event, typeof(*chan), vblank.event); struct nv50_software_priv *priv = (void *)nv_object(chan)->engine; struct nv50_software_priv *priv = (void *)nv_object(chan)->engine; struct nouveau_bar *bar = nouveau_bar(priv); struct nouveau_bar *bar = nouveau_bar(priv); Loading Loading @@ -161,8 +161,8 @@ nv50_software_context_ctor(struct nouveau_object *parent, if (ret) if (ret) return ret; return ret; chan->base.vblank.channel = nv_gpuobj(parent->parent)->addr >> 12; chan->vblank.channel = nv_gpuobj(parent->parent)->addr >> 12; chan->base.vblank.event.func = nv50_software_vblsem_release; chan->vblank.event.func = nv50_software_vblsem_release; return 0; return 0; } } Loading
drivers/gpu/drm/nouveau/core/engine/software/nv50.h +7 −0 Original line number Original line Diff line number Diff line Loading @@ -9,6 +9,13 @@ struct nv50_software_priv { struct nv50_software_chan { struct nv50_software_chan { struct nouveau_software_chan base; struct nouveau_software_chan base; struct { struct nouveau_eventh event; u32 channel; u32 ctxdma; u64 offset; u32 value; } vblank; }; }; #endif #endif
drivers/gpu/drm/nouveau/core/engine/software/nvc0.c +10 −10 Original line number Original line Diff line number Diff line Loading @@ -45,11 +45,11 @@ nvc0_software_mthd_vblsem_offset(struct nouveau_object *object, u32 mthd, struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); u64 data = *(u32 *)args; u64 data = *(u32 *)args; if (mthd == 0x0400) { if (mthd == 0x0400) { chan->base.vblank.offset &= 0x00ffffffffULL; chan->vblank.offset &= 0x00ffffffffULL; chan->base.vblank.offset |= data << 32; chan->vblank.offset |= data << 32; } else { } else { chan->base.vblank.offset &= 0xff00000000ULL; chan->vblank.offset &= 0xff00000000ULL; chan->base.vblank.offset |= data; chan->vblank.offset |= data; } } return 0; return 0; } } Loading @@ -59,7 +59,7 @@ nvc0_software_mthd_vblsem_value(struct nouveau_object *object, u32 mthd, void *args, u32 size) void *args, u32 size) { { struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); struct nv50_software_chan *chan = (void *)nv_engctx(object->parent); chan->base.vblank.value = *(u32 *)args; chan->vblank.value = *(u32 *)args; return 0; return 0; } } Loading @@ -74,7 +74,7 @@ nvc0_software_mthd_vblsem_release(struct nouveau_object *object, u32 mthd, if ((nv_device(object)->card_type < NV_E0 && crtc > 1) || crtc > 3) if ((nv_device(object)->card_type < NV_E0 && crtc > 1) || crtc > 3) return -EINVAL; return -EINVAL; nouveau_event_get(disp->vblank, crtc, &chan->base.vblank.event); nouveau_event_get(disp->vblank, crtc, &chan->vblank.event); return 0; return 0; } } Loading Loading @@ -140,8 +140,8 @@ nvc0_software_sclass[] = { static int static int nvc0_software_vblsem_release(struct nouveau_eventh *event, int head) nvc0_software_vblsem_release(struct nouveau_eventh *event, int head) { { struct nouveau_software_chan *chan = struct nv50_software_chan *chan = container_of(event, struct nouveau_software_chan, vblank.event); container_of(event, typeof(*chan), vblank.event); struct nv50_software_priv *priv = (void *)nv_object(chan)->engine; struct nv50_software_priv *priv = (void *)nv_object(chan)->engine; struct nouveau_bar *bar = nouveau_bar(priv); struct nouveau_bar *bar = nouveau_bar(priv); Loading @@ -168,8 +168,8 @@ nvc0_software_context_ctor(struct nouveau_object *parent, if (ret) if (ret) return ret; return ret; chan->base.vblank.channel = nv_gpuobj(parent->parent)->addr >> 12; chan->vblank.channel = nv_gpuobj(parent->parent)->addr >> 12; chan->base.vblank.event.func = nvc0_software_vblsem_release; chan->vblank.event.func = nvc0_software_vblsem_release; return 0; return 0; } } Loading
drivers/gpu/drm/nouveau/core/include/engine/software.h +0 −9 Original line number Original line Diff line number Diff line Loading @@ -3,19 +3,10 @@ #include <core/engine.h> #include <core/engine.h> #include <core/engctx.h> #include <core/engctx.h> #include <core/event.h> struct nouveau_software_chan { struct nouveau_software_chan { struct nouveau_engctx base; struct nouveau_engctx base; struct { struct nouveau_eventh event; u32 channel; u32 ctxdma; u64 offset; u32 value; } vblank; int (*flip)(void *); int (*flip)(void *); void *flip_data; void *flip_data; }; }; Loading