This source file includes following definitions.
- gv100_disp_wimm_intr
- gv100_disp_wimm_new_
- gv100_disp_wimm_new
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 #include "channv50.h"
  23 
  24 #include <core/client.h>
  25 
  26 #include <nvif/clc37b.h>
  27 #include <nvif/unpack.h>
  28 
  29 static void
  30 gv100_disp_wimm_intr(struct nv50_disp_chan *chan, bool en)
  31 {
  32         struct nvkm_device *device = chan->disp->base.engine.subdev.device;
  33         const u32 mask = 0x00000001 << chan->head;
  34         const u32 data = en ? mask : 0;
  35         nvkm_mask(device, 0x611da8, mask, data);
  36 }
  37 
  38 const struct nv50_disp_chan_func
  39 gv100_disp_wimm = {
  40         .init = gv100_disp_dmac_init,
  41         .fini = gv100_disp_dmac_fini,
  42         .intr = gv100_disp_wimm_intr,
  43         .user = gv100_disp_chan_user,
  44 };
  45 
  46 static int
  47 gv100_disp_wimm_new_(const struct nv50_disp_chan_func *func,
  48                      const struct nv50_disp_chan_mthd *mthd,
  49                      struct nv50_disp *disp, int chid,
  50                      const struct nvkm_oclass *oclass, void *argv, u32 argc,
  51                      struct nvkm_object **pobject)
  52 {
  53         union {
  54                 struct nvc37b_window_imm_channel_dma_v0 v0;
  55         } *args = argv;
  56         struct nvkm_object *parent = oclass->parent;
  57         int wndw, ret = -ENOSYS;
  58         u64 push;
  59 
  60         nvif_ioctl(parent, "create window imm channel dma size %d\n", argc);
  61         if (!(ret = nvif_unpack(ret, &argv, &argc, args->v0, 0, 0, false))) {
  62                 nvif_ioctl(parent, "create window imm channel dma vers %d "
  63                                    "pushbuf %016llx index %d\n",
  64                            args->v0.version, args->v0.pushbuf, args->v0.index);
  65                 if (!(disp->wndw.mask & BIT(args->v0.index)))
  66                         return -EINVAL;
  67                 push = args->v0.pushbuf;
  68                 wndw = args->v0.index;
  69         } else
  70                 return ret;
  71 
  72         return nv50_disp_dmac_new_(func, mthd, disp, chid + wndw,
  73                                    wndw, push, oclass, pobject);
  74 }
  75 
  76 int
  77 gv100_disp_wimm_new(const struct nvkm_oclass *oclass, void *argv, u32 argc,
  78                     struct nv50_disp *disp, struct nvkm_object **pobject)
  79 {
  80         return gv100_disp_wimm_new_(&gv100_disp_wimm, NULL, disp, 33,
  81                                     oclass, argv, argc, pobject);
  82 }