0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #ifndef __NOUVEAU_CRTC_H__
0028 #define __NOUVEAU_CRTC_H__
0029
0030 #include <drm/drm_crtc.h>
0031
0032 #include <nvif/notify.h>
0033
0034 struct nouveau_crtc {
0035 struct drm_crtc base;
0036
0037 int index;
0038 struct nvif_notify vblank;
0039
0040 uint32_t dpms_saved_fp_control;
0041 uint32_t fp_users;
0042 int saturation;
0043 int sharpness;
0044 int last_dpms;
0045
0046 int cursor_saved_x, cursor_saved_y;
0047
0048 struct {
0049 int cpp;
0050 bool blanked;
0051 uint32_t offset;
0052 uint32_t handle;
0053 } fb;
0054
0055 struct {
0056 struct nouveau_bo *nvbo;
0057 uint32_t offset;
0058 void (*set_offset)(struct nouveau_crtc *, uint32_t offset);
0059 void (*set_pos)(struct nouveau_crtc *, int x, int y);
0060 void (*hide)(struct nouveau_crtc *, bool update);
0061 void (*show)(struct nouveau_crtc *, bool update);
0062 } cursor;
0063
0064 struct {
0065 int depth;
0066 } lut;
0067
0068 void (*save)(struct drm_crtc *crtc);
0069 void (*restore)(struct drm_crtc *crtc);
0070 };
0071
0072 static inline struct nouveau_crtc *nouveau_crtc(struct drm_crtc *crtc)
0073 {
0074 return crtc ? container_of(crtc, struct nouveau_crtc, base) : NULL;
0075 }
0076
0077 static inline struct drm_crtc *to_drm_crtc(struct nouveau_crtc *crtc)
0078 {
0079 return &crtc->base;
0080 }
0081
0082 int nv04_cursor_init(struct nouveau_crtc *);
0083
0084 #endif