linux/drivers/gpu/drm/nouveau/nvkm/engine/disp/channv50.h
<<
>>
Prefs
   1#ifndef __NV50_DISP_CHAN_H__
   2#define __NV50_DISP_CHAN_H__
   3#define nv50_disp_chan(p) container_of((p), struct nv50_disp_chan, object)
   4#include "nv50.h"
   5
   6struct nv50_disp_chan {
   7        const struct nv50_disp_chan_func *func;
   8        const struct nv50_disp_chan_mthd *mthd;
   9        struct nv50_disp_root *root;
  10        int chid;
  11        int head;
  12
  13        struct nvkm_object object;
  14};
  15
  16struct nv50_disp_chan_func {
  17        void *(*dtor)(struct nv50_disp_chan *);
  18        int (*init)(struct nv50_disp_chan *);
  19        void (*fini)(struct nv50_disp_chan *);
  20        int (*child_get)(struct nv50_disp_chan *, int index,
  21                         struct nvkm_oclass *);
  22        int (*child_new)(struct nv50_disp_chan *, const struct nvkm_oclass *,
  23                         void *data, u32 size, struct nvkm_object **);
  24};
  25
  26int nv50_disp_chan_ctor(const struct nv50_disp_chan_func *,
  27                        const struct nv50_disp_chan_mthd *,
  28                        struct nv50_disp_root *, int chid, int head,
  29                        const struct nvkm_oclass *, struct nv50_disp_chan *);
  30int nv50_disp_chan_new_(const struct nv50_disp_chan_func *,
  31                        const struct nv50_disp_chan_mthd *,
  32                        struct nv50_disp_root *, int chid, int head,
  33                        const struct nvkm_oclass *, struct nvkm_object **);
  34
  35extern const struct nv50_disp_chan_func nv50_disp_pioc_func;
  36extern const struct nv50_disp_chan_func gf119_disp_pioc_func;
  37
  38extern const struct nvkm_event_func nv50_disp_chan_uevent;
  39int  nv50_disp_chan_uevent_ctor(struct nvkm_object *, void *, u32,
  40                                struct nvkm_notify *);
  41void nv50_disp_chan_uevent_send(struct nv50_disp *, int);
  42
  43extern const struct nvkm_event_func gf119_disp_chan_uevent;
  44
  45struct nv50_disp_mthd_list {
  46        u32 mthd;
  47        u32 addr;
  48        struct {
  49                u32 mthd;
  50                u32 addr;
  51                const char *name;
  52        } data[];
  53};
  54
  55struct nv50_disp_chan_mthd {
  56        const char *name;
  57        u32 addr;
  58        s32 prev;
  59        struct {
  60                const char *name;
  61                int nr;
  62                const struct nv50_disp_mthd_list *mthd;
  63        } data[];
  64};
  65
  66void nv50_disp_chan_mthd(struct nv50_disp_chan *, int debug);
  67
  68extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_base;
  69extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_sor;
  70extern const struct nv50_disp_mthd_list nv50_disp_core_mthd_pior;
  71extern const struct nv50_disp_mthd_list nv50_disp_base_mthd_image;
  72
  73extern const struct nv50_disp_chan_mthd g84_disp_core_chan_mthd;
  74extern const struct nv50_disp_mthd_list g84_disp_core_mthd_dac;
  75extern const struct nv50_disp_mthd_list g84_disp_core_mthd_head;
  76extern const struct nv50_disp_chan_mthd g84_disp_base_chan_mthd;
  77extern const struct nv50_disp_chan_mthd g84_disp_ovly_chan_mthd;
  78
  79extern const struct nv50_disp_chan_mthd g94_disp_core_chan_mthd;
  80
  81extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_base;
  82extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_dac;
  83extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_sor;
  84extern const struct nv50_disp_mthd_list gf119_disp_core_mthd_pior;
  85extern const struct nv50_disp_chan_mthd gf119_disp_base_chan_mthd;
  86
  87extern const struct nv50_disp_chan_mthd gk104_disp_core_chan_mthd;
  88extern const struct nv50_disp_chan_mthd gk104_disp_ovly_chan_mthd;
  89
  90struct nv50_disp_pioc_oclass {
  91        int (*ctor)(const struct nv50_disp_chan_func *,
  92                    const struct nv50_disp_chan_mthd *,
  93                    struct nv50_disp_root *, int chid,
  94                    const struct nvkm_oclass *, void *data, u32 size,
  95                    struct nvkm_object **);
  96        struct nvkm_sclass base;
  97        const struct nv50_disp_chan_func *func;
  98        const struct nv50_disp_chan_mthd *mthd;
  99        int chid;
 100};
 101
 102extern const struct nv50_disp_pioc_oclass nv50_disp_oimm_oclass;
 103extern const struct nv50_disp_pioc_oclass nv50_disp_curs_oclass;
 104
 105extern const struct nv50_disp_pioc_oclass g84_disp_oimm_oclass;
 106extern const struct nv50_disp_pioc_oclass g84_disp_curs_oclass;
 107
 108extern const struct nv50_disp_pioc_oclass gt215_disp_oimm_oclass;
 109extern const struct nv50_disp_pioc_oclass gt215_disp_curs_oclass;
 110
 111extern const struct nv50_disp_pioc_oclass gf119_disp_oimm_oclass;
 112extern const struct nv50_disp_pioc_oclass gf119_disp_curs_oclass;
 113
 114extern const struct nv50_disp_pioc_oclass gk104_disp_oimm_oclass;
 115extern const struct nv50_disp_pioc_oclass gk104_disp_curs_oclass;
 116
 117
 118int nv50_disp_curs_new(const struct nv50_disp_chan_func *,
 119                       const struct nv50_disp_chan_mthd *,
 120                       struct nv50_disp_root *, int chid,
 121                       const struct nvkm_oclass *, void *data, u32 size,
 122                       struct nvkm_object **);
 123int nv50_disp_oimm_new(const struct nv50_disp_chan_func *,
 124                       const struct nv50_disp_chan_mthd *,
 125                       struct nv50_disp_root *, int chid,
 126                       const struct nvkm_oclass *, void *data, u32 size,
 127                       struct nvkm_object **);
 128#endif
 129