Commit 7568b106 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/nvif: split out display interface definitions

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 538b269b
#ifndef __NVIF_CL0046_H__
#define __NVIF_CL0046_H__
#define NV04_DISP_NTFY_VBLANK 0x00
#define NV04_DISP_NTFY_CONN 0x01
struct nv04_disp_mthd_v0 {
__u8 version;
#define NV04_DISP_SCANOUTPOS 0x00
__u8 method;
__u8 head;
__u8 pad03[5];
};
struct nv04_disp_scanoutpos_v0 {
__u8 version;
__u8 pad01[7];
__s64 time[2];
__u16 vblanks;
__u16 vblanke;
__u16 vtotal;
__u16 vline;
__u16 hblanks;
__u16 hblanke;
__u16 htotal;
__u16 hline;
};
#endif
#ifndef __NVIF_CL5070_H__
#define __NVIF_CL5070_H__
#define NV50_DISP_MTHD 0x00
struct nv50_disp_mthd_v0 {
__u8 version;
#define NV50_DISP_SCANOUTPOS 0x00
__u8 method;
__u8 head;
__u8 pad03[5];
};
struct nv50_disp_scanoutpos_v0 {
__u8 version;
__u8 pad01[7];
__s64 time[2];
__u16 vblanks;
__u16 vblanke;
__u16 vtotal;
__u16 vline;
__u16 hblanks;
__u16 hblanke;
__u16 htotal;
__u16 hline;
};
struct nv50_disp_mthd_v1 {
__u8 version;
#define NV50_DISP_MTHD_V1_DAC_PWR 0x10
#define NV50_DISP_MTHD_V1_DAC_LOAD 0x11
#define NV50_DISP_MTHD_V1_SOR_PWR 0x20
#define NV50_DISP_MTHD_V1_SOR_HDA_ELD 0x21
#define NV50_DISP_MTHD_V1_SOR_HDMI_PWR 0x22
#define NV50_DISP_MTHD_V1_SOR_LVDS_SCRIPT 0x23
#define NV50_DISP_MTHD_V1_SOR_DP_PWR 0x24
#define NV50_DISP_MTHD_V1_PIOR_PWR 0x30
__u8 method;
__u16 hasht;
__u16 hashm;
__u8 pad06[2];
};
struct nv50_disp_dac_pwr_v0 {
__u8 version;
__u8 state;
__u8 data;
__u8 vsync;
__u8 hsync;
__u8 pad05[3];
};
struct nv50_disp_dac_load_v0 {
__u8 version;
__u8 load;
__u8 pad02[2];
__u32 data;
};
struct nv50_disp_sor_pwr_v0 {
__u8 version;
__u8 state;
__u8 pad02[6];
};
struct nv50_disp_sor_hda_eld_v0 {
__u8 version;
__u8 pad01[7];
__u8 data[];
};
struct nv50_disp_sor_hdmi_pwr_v0 {
__u8 version;
__u8 state;
__u8 max_ac_packet;
__u8 rekey;
__u8 pad04[4];
};
struct nv50_disp_sor_lvds_script_v0 {
__u8 version;
__u8 pad01[1];
__u16 script;
__u8 pad04[4];
};
struct nv50_disp_sor_dp_pwr_v0 {
__u8 version;
__u8 state;
__u8 pad02[6];
};
struct nv50_disp_pior_pwr_v0 {
__u8 version;
__u8 state;
__u8 type;
__u8 pad03[5];
};
#endif
#ifndef __NVIF_CL507A_H__
#define __NVIF_CL507A_H__
struct nv50_disp_cursor_v0 {
__u8 version;
__u8 head;
__u8 pad02[6];
};
#define NV50_DISP_CURSOR_V0_NTFY_UEVENT 0x00
#endif
#ifndef __NVIF_CL507B_H__
#define __NVIF_CL507B_H__
struct nv50_disp_overlay_v0 {
__u8 version;
__u8 head;
__u8 pad02[6];
};
#define NV50_DISP_OVERLAY_V0_NTFY_UEVENT 0x00
#endif
#ifndef __NVIF_CL507C_H__
#define __NVIF_CL507C_H__
struct nv50_disp_base_channel_dma_v0 {
__u8 version;
__u8 head;
__u8 pad02[6];
__u64 pushbuf;
};
#define NV50_DISP_BASE_CHANNEL_DMA_V0_NTFY_UEVENT 0x00
#endif
#ifndef __NVIF_CL507D_H__
#define __NVIF_CL507D_H__
struct nv50_disp_core_channel_dma_v0 {
__u8 version;
__u8 pad01[7];
__u64 pushbuf;
};
#define NV50_DISP_CORE_CHANNEL_DMA_V0_NTFY_UEVENT 0x00
#endif
#ifndef __NVIF_CL507E_H__
#define __NVIF_CL507E_H__
struct nv50_disp_overlay_channel_dma_v0 {
__u8 version;
__u8 head;
__u8 pad02[6];
__u64 pushbuf;
};
#define NV50_DISP_OVERLAY_CHANNEL_DMA_V0_NTFY_UEVENT 0x00
#endif
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "nouveau_encoder.h" #include "nouveau_encoder.h"
#include "nouveau_crtc.h" #include "nouveau_crtc.h"
#include <nvif/cl0046.h>
#include <nvif/event.h> #include <nvif/event.h>
MODULE_PARM_DESC(tv_disable, "Disable TV-out detection"); MODULE_PARM_DESC(tv_disable, "Disable TV-out detection");
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include "nouveau_fence.h" #include "nouveau_fence.h"
#include <nvif/cl0046.h>
#include <nvif/event.h> #include <nvif/event.h>
static int static int
......
...@@ -31,6 +31,12 @@ ...@@ -31,6 +31,12 @@
#include <drm/drm_fb_helper.h> #include <drm/drm_fb_helper.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl5070.h>
#include <nvif/cl507a.h>
#include <nvif/cl507b.h>
#include <nvif/cl507c.h>
#include <nvif/cl507d.h>
#include <nvif/cl507e.h>
#include "nouveau_drm.h" #include "nouveau_drm.h"
#include "nouveau_dma.h" #include "nouveau_dma.h"
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <subdev/bios/dcb.h> #include <subdev/bios/dcb.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl0046.h>
#include <nvif/event.h> #include <nvif/event.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <core/client.h> #include <core/client.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl507c.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <core/ramht.h> #include <core/ramht.h>
#include <engine/dma.h> #include <engine/dma.h>
#include <nvif/class.h> #include <nvif/cl507d.h>
#include <nvif/event.h> #include <nvif/event.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <subdev/timer.h> #include <subdev/timer.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl507d.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <core/client.h> #include <core/client.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl507a.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <core/client.h> #include <core/client.h>
#include <subdev/timer.h> #include <subdev/timer.h>
#include <nvif/class.h> #include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <subdev/bios/dcb.h> #include <subdev/bios/dcb.h>
#include <subdev/timer.h> #include <subdev/timer.h>
#include <nvif/class.h> #include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <core/client.h> #include <core/client.h>
#include <subdev/timer.h> #include <subdev/timer.h>
#include <nvif/class.h> #include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <core/client.h> #include <core/client.h>
#include <nvif/class.h> #include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <core/client.h> #include <core/client.h>
#include <nvif/class.h> #include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <core/client.h> #include <core/client.h>
#include <nvif/class.h> #include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <core/client.h> #include <core/client.h>
#include <nvif/class.h> #include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <core/client.h> #include <core/client.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl507b.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <core/client.h> #include <core/client.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl507e.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include <subdev/i2c.h> #include <subdev/i2c.h>
#include <subdev/timer.h> #include <subdev/timer.h>
#include <nvif/class.h> #include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <subdev/timer.h> #include <subdev/timer.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
...@@ -39,7 +40,7 @@ gf119_disp_root_scanoutpos(NV50_DISP_MTHD_V0) ...@@ -39,7 +40,7 @@ gf119_disp_root_scanoutpos(NV50_DISP_MTHD_V0)
const u32 blanke = nvkm_rd32(device, 0x64041c + (head * 0x300)); const u32 blanke = nvkm_rd32(device, 0x64041c + (head * 0x300));
const u32 blanks = nvkm_rd32(device, 0x640420 + (head * 0x300)); const u32 blanks = nvkm_rd32(device, 0x640420 + (head * 0x300));
union { union {
struct nv04_disp_scanoutpos_v0 v0; struct nv50_disp_scanoutpos_v0 v0;
} *args = data; } *args = data;
int ret; int ret;
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <core/client.h> #include <core/client.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl0046.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
struct nv04_disp_root { struct nv04_disp_root {
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <subdev/timer.h> #include <subdev/timer.h>
#include <nvif/class.h> #include <nvif/class.h>
#include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
...@@ -39,7 +40,7 @@ nv50_disp_root_scanoutpos(NV50_DISP_MTHD_V0) ...@@ -39,7 +40,7 @@ nv50_disp_root_scanoutpos(NV50_DISP_MTHD_V0)
const u32 blanks = nvkm_rd32(device, 0x610af4 + (head * 0x540)); const u32 blanks = nvkm_rd32(device, 0x610af4 + (head * 0x540));
const u32 total = nvkm_rd32(device, 0x610afc + (head * 0x540)); const u32 total = nvkm_rd32(device, 0x610afc + (head * 0x540));
union { union {
struct nv04_disp_scanoutpos_v0 v0; struct nv50_disp_scanoutpos_v0 v0;
} *args = data; } *args = data;
int ret; int ret;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <core/client.h> #include <core/client.h>
#include <subdev/timer.h> #include <subdev/timer.h>
#include <nvif/class.h> #include <nvif/cl5070.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
int int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment