linux/drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.h
<<
>>
Prefs
   1#ifndef __NVKM_DISP_OUTP_DP_H__
   2#define __NVKM_DISP_OUTP_DP_H__
   3#define nvkm_output_dp(p) container_of((p), struct nvkm_output_dp, base)
   4#ifndef MSG
   5#define MSG(l,f,a...)                                                          \
   6        nvkm_##l(&outp->base.disp->engine.subdev, "%02x:%04x:%04x: "f,         \
   7                 outp->base.index, outp->base.info.hasht,                      \
   8                 outp->base.info.hashm, ##a)
   9#define DBG(f,a...) MSG(debug, f, ##a)
  10#define ERR(f,a...) MSG(error, f, ##a)
  11#endif
  12#include "outp.h"
  13
  14#include <core/notify.h>
  15#include <subdev/bios.h>
  16#include <subdev/bios/dp.h>
  17
  18struct nvkm_output_dp {
  19        const struct nvkm_output_dp_func *func;
  20        struct nvkm_output base;
  21
  22        struct nvbios_dpout info;
  23        u8 version;
  24
  25        struct nvkm_i2c_aux *aux;
  26
  27        struct nvkm_notify irq;
  28        struct nvkm_notify hpd;
  29        bool present;
  30        u8 dpcd[16];
  31
  32        struct {
  33                struct work_struct work;
  34                wait_queue_head_t wait;
  35                atomic_t done;
  36        } lt;
  37};
  38
  39struct nvkm_output_dp_func {
  40        int (*pattern)(struct nvkm_output_dp *, int);
  41        int (*lnk_pwr)(struct nvkm_output_dp *, int nr);
  42        int (*lnk_ctl)(struct nvkm_output_dp *, int nr, int bw, bool ef);
  43        int (*drv_ctl)(struct nvkm_output_dp *, int ln, int vs, int pe, int pc);
  44};
  45
  46int nvkm_output_dp_train(struct nvkm_output *, u32 rate, bool wait);
  47
  48int nvkm_output_dp_ctor(const struct nvkm_output_dp_func *, struct nvkm_disp *,
  49                        int index, struct dcb_output *, struct nvkm_i2c_aux *,
  50                        struct nvkm_output_dp *);
  51int nvkm_output_dp_new_(const struct nvkm_output_dp_func *, struct nvkm_disp *,
  52                        int index, struct dcb_output *,
  53                        struct nvkm_output **);
  54
  55int nv50_pior_dp_new(struct nvkm_disp *, int, struct dcb_output *,
  56                     struct nvkm_output **);
  57
  58int g94_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
  59                   struct nvkm_output **);
  60int g94_sor_dp_lnk_pwr(struct nvkm_output_dp *, int);
  61
  62int gf119_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
  63                     struct nvkm_output **);
  64int gf119_sor_dp_lnk_ctl(struct nvkm_output_dp *, int, int, bool);
  65
  66int  gm200_sor_dp_new(struct nvkm_disp *, int, struct dcb_output *,
  67                      struct nvkm_output **);
  68#endif
  69