linux/drivers/gpu/drm/nouveau/nvkm/engine/disp/outp.h
<<
>>
Prefs
   1#ifndef __NVKM_DISP_OUTP_H__
   2#define __NVKM_DISP_OUTP_H__
   3#include <engine/disp.h>
   4
   5#include <subdev/bios.h>
   6#include <subdev/bios/dcb.h>
   7
   8struct nvkm_output {
   9        const struct nvkm_output_func *func;
  10        struct nvkm_disp *disp;
  11        int index;
  12        struct dcb_output info;
  13
  14        // whatever (if anything) is pointed at by the dcb device entry
  15        struct nvkm_i2c_bus *i2c;
  16        int or;
  17
  18        struct list_head head;
  19        struct nvkm_connector *conn;
  20};
  21
  22struct nvkm_output_func {
  23        void *(*dtor)(struct nvkm_output *);
  24        void (*init)(struct nvkm_output *);
  25        void (*fini)(struct nvkm_output *);
  26};
  27
  28void nvkm_output_ctor(const struct nvkm_output_func *, struct nvkm_disp *,
  29                      int index, struct dcb_output *, struct nvkm_output *);
  30int nvkm_output_new_(const struct nvkm_output_func *, struct nvkm_disp *,
  31                     int index, struct dcb_output *, struct nvkm_output **);
  32void nvkm_output_del(struct nvkm_output **);
  33void nvkm_output_init(struct nvkm_output *);
  34void nvkm_output_fini(struct nvkm_output *);
  35
  36int nv50_dac_output_new(struct nvkm_disp *, int, struct dcb_output *,
  37                        struct nvkm_output **);
  38int nv50_sor_output_new(struct nvkm_disp *, int, struct dcb_output *,
  39                        struct nvkm_output **);
  40int nv50_pior_output_new(struct nvkm_disp *, int, struct dcb_output *,
  41                         struct nvkm_output **);
  42
  43u32 g94_sor_dp_lane_map(struct nvkm_device *, u8 lane);
  44
  45void gm200_sor_magic(struct nvkm_output *outp);
  46
  47#define OUTP_MSG(o,l,f,a...) do {                                              \
  48        struct nvkm_output *_outp = (o);                                       \
  49        nvkm_##l(&_outp->disp->engine.subdev, "outp %02x:%04x:%04x: "f"\n",    \
  50                 _outp->index, _outp->info.hasht, _outp->info.hashm, ##a);     \
  51} while(0)
  52#define OUTP_ERR(o,f,a...) OUTP_MSG((o), error, f, ##a)
  53#define OUTP_DBG(o,f,a...) OUTP_MSG((o), debug, f, ##a)
  54#define OUTP_TRACE(o,f,a...) OUTP_MSG((o), trace, f, ##a)
  55#endif
  56