diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h index 07727198d7ce..146d101d4891 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h @@ -5,47 +5,46 @@ #include <subdev/bios.h> #include <subdev/bios/dcb.h> -struct nvkm_output { - const struct nvkm_output_func *func; +struct nvkm_outp { + const struct nvkm_outp_func *func; struct nvkm_disp *disp; int index; struct dcb_output info; - // whatever (if anything) is pointed at by the dcb device entry struct nvkm_i2c_bus *i2c; int or; struct list_head head; - struct nvkm_connector *conn; -}; + struct nvkm_conn *conn; -struct nvkm_output_func { - void *(*dtor)(struct nvkm_output *); - void (*init)(struct nvkm_output *); - void (*fini)(struct nvkm_output *); + /* Assembly state. */ +#define NVKM_OUTP_PRIV 1 +#define NVKM_OUTP_USER 2 + u8 acquired:2; + struct nvkm_ior *ior; }; -void nvkm_output_ctor(const struct nvkm_output_func *, struct nvkm_disp *, - int index, struct dcb_output *, struct nvkm_output *); -int nvkm_output_new_(const struct nvkm_output_func *, struct nvkm_disp *, - int index, struct dcb_output *, struct nvkm_output **); -void nvkm_output_del(struct nvkm_output **); -void nvkm_output_init(struct nvkm_output *); -void nvkm_output_fini(struct nvkm_output *); - -int nv50_dac_output_new(struct nvkm_disp *, int, struct dcb_output *, - struct nvkm_output **); -int nv50_sor_output_new(struct nvkm_disp *, int, struct dcb_output *, - struct nvkm_output **); -int nv50_pior_output_new(struct nvkm_disp *, int, struct dcb_output *, - struct nvkm_output **); - -u32 g94_sor_dp_lane_map(struct nvkm_device *, u8 lane); - -void gm200_sor_magic(struct nvkm_output *outp); +int nvkm_outp_ctor(const struct nvkm_outp_func *, struct nvkm_disp *, + int index, struct dcb_output *, struct nvkm_outp *); +int nvkm_outp_new(struct nvkm_disp *, int index, struct dcb_output *, + struct nvkm_outp **); +void nvkm_outp_del(struct nvkm_outp **); +void nvkm_outp_init(struct nvkm_outp *); +void nvkm_outp_fini(struct nvkm_outp *); +int nvkm_outp_acquire(struct nvkm_outp *, u8 user); +void nvkm_outp_release(struct nvkm_outp *, u8 user); +void nvkm_outp_route(struct nvkm_disp *); + +struct nvkm_outp_func { + void *(*dtor)(struct nvkm_outp *); + void (*init)(struct nvkm_outp *); + void (*fini)(struct nvkm_outp *); + int (*acquire)(struct nvkm_outp *); + void (*release)(struct nvkm_outp *, struct nvkm_ior *); +}; #define OUTP_MSG(o,l,f,a...) do { \ - struct nvkm_output *_outp = (o); \ + struct nvkm_outp *_outp = (o); \ nvkm_##l(&_outp->disp->engine.subdev, "outp %02x:%04x:%04x: "f"\n", \ _outp->index, _outp->info.hasht, _outp->info.hashm, ##a); \ } while(0) |