91 lines · c
1/* SPDX-License-Identifier: MIT */2#ifndef __NVKM_DISP_PRIV_H__3#define __NVKM_DISP_PRIV_H__4#define nvkm_udisp(p) container_of((p), struct nvkm_disp, client.object)5#include <engine/disp.h>6#include <core/enum.h>7struct nvkm_head;8struct nvkm_outp;9struct dcb_output;10 11int r535_disp_new(const struct nvkm_disp_func *, struct nvkm_device *, enum nvkm_subdev_type, int,12 struct nvkm_disp **);13 14int nvkm_disp_ctor(const struct nvkm_disp_func *, struct nvkm_device *, enum nvkm_subdev_type, int,15 struct nvkm_disp *);16int nvkm_disp_new_(const struct nvkm_disp_func *, struct nvkm_device *, enum nvkm_subdev_type, int,17 struct nvkm_disp **);18void nvkm_disp_vblank(struct nvkm_disp *, int head);19 20struct nvkm_disp_func {21 void (*dtor)(struct nvkm_disp *);22 int (*oneinit)(struct nvkm_disp *);23 int (*init)(struct nvkm_disp *);24 void (*fini)(struct nvkm_disp *, bool suspend);25 void (*intr)(struct nvkm_disp *);26 void (*intr_error)(struct nvkm_disp *, int chid);27 28 void (*super)(struct work_struct *);29 30 const struct nvkm_event_func *uevent;31 32 struct {33 int (*cnt)(struct nvkm_disp *, unsigned long *mask);34 int (*new)(struct nvkm_disp *, int id);35 } wndw, head, dac, sor, pior;36 37 u16 ramht_size;38 39 struct nvkm_sclass root;40 41 struct nvkm_disp_user {42 struct nvkm_sclass base;43 int (*ctor)(const struct nvkm_oclass *, void *argv, u32 argc,44 struct nvkm_object **);45 const struct nvkm_disp_chan_user *chan;46 } user[];47};48 49int nv50_disp_oneinit(struct nvkm_disp *);50int nv50_disp_init(struct nvkm_disp *);51void nv50_disp_fini(struct nvkm_disp *, bool suspend);52void nv50_disp_intr(struct nvkm_disp *);53extern const struct nvkm_enum nv50_disp_intr_error_type[];54void nv50_disp_super(struct work_struct *);55void nv50_disp_super_1(struct nvkm_disp *);56void nv50_disp_super_1_0(struct nvkm_disp *, struct nvkm_head *);57void nv50_disp_super_2_0(struct nvkm_disp *, struct nvkm_head *);58void nv50_disp_super_2_1(struct nvkm_disp *, struct nvkm_head *);59void nv50_disp_super_2_2(struct nvkm_disp *, struct nvkm_head *);60void nv50_disp_super_3_0(struct nvkm_disp *, struct nvkm_head *);61 62int gf119_disp_init(struct nvkm_disp *);63void gf119_disp_fini(struct nvkm_disp *, bool suspend);64void gf119_disp_intr(struct nvkm_disp *);65void gf119_disp_super(struct work_struct *);66void gf119_disp_intr_error(struct nvkm_disp *, int);67 68void gv100_disp_fini(struct nvkm_disp *, bool suspend);69void gv100_disp_intr(struct nvkm_disp *);70void gv100_disp_super(struct work_struct *);71int gv100_disp_wndw_cnt(struct nvkm_disp *, unsigned long *);72int gv100_disp_caps_new(const struct nvkm_oclass *, void *, u32, struct nvkm_object **);73 74int tu102_disp_init(struct nvkm_disp *);75 76void nv50_disp_dptmds_war_2(struct nvkm_disp *, struct dcb_output *);77void nv50_disp_dptmds_war_3(struct nvkm_disp *, struct dcb_output *);78void nv50_disp_update_sppll1(struct nvkm_disp *);79 80extern const struct nvkm_event_func nv50_disp_chan_uevent;81void nv50_disp_chan_uevent_send(struct nvkm_disp *, int);82 83extern const struct nvkm_event_func gf119_disp_chan_uevent;84extern const struct nvkm_event_func gv100_disp_chan_uevent;85 86int nvkm_udisp_new(const struct nvkm_oclass *, void *, u32, struct nvkm_object **);87int nvkm_uconn_new(const struct nvkm_oclass *, void *, u32, struct nvkm_object **);88int nvkm_uoutp_new(const struct nvkm_oclass *, void *, u32, struct nvkm_object **);89int nvkm_uhead_new(const struct nvkm_oclass *, void *, u32, struct nvkm_object **);90#endif91