Documentation
¶
Overview ¶
Port of modeset.c example to Go Source: https://github.com/dvdhrm/docs/blob/master/drm-howto/modeset.c
Index ¶
- Constants
- Variables
- func AddFB(file *os.File, width, height uint16, depth, bpp uint8, pitch, boHandle uint32) (uint32, error)
- func DestroyDumb(file *os.File, handle uint32) error
- func MapDumb(file *os.File, boHandle uint32) (uint64, error)
- func RmFB(file *os.File, bufferid uint32) error
- func SetCrtc(file *os.File, crtcid, bufferid, x, y uint32, connectors *uint32, count int, ...) error
- type Connector
- type Crtc
- type Encoder
- type FB
- type Info
- type Modeset
- type Resources
- type SimpleModeset
Constants ¶
View Source
const ( DisplayInfoLen = 32 ConnectorNameLen = 32 DisplayModeLen = 32 PropNameLen = 32 Connected = 1 Disconnected = 2 UnknownConnection = 3 )
Variables ¶
View Source
var ( // DRM_IOWR(0xA0, struct drm_mode_card_res) IOCTLModeResources = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(sysResources{})), drm.IOCTLBase, 0xA0) // DRM_IOWR(0xA1, struct drm_mode_crtc) IOCTLModeGetCrtc = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(sysCrtc{})), drm.IOCTLBase, 0xA1) // DRM_IOWR(0xA2, struct drm_mode_crtc) IOCTLModeSetCrtc = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(sysCrtc{})), drm.IOCTLBase, 0xA2) // DRM_IOWR(0xA6, struct drm_mode_get_encoder) IOCTLModeGetEncoder = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(sysGetEncoder{})), drm.IOCTLBase, 0xA6) // DRM_IOWR(0xA7, struct drm_mode_get_connector) IOCTLModeGetConnector = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(sysGetConnector{})), drm.IOCTLBase, 0xA7) // DRM_IOWR(0xAE, struct drm_mode_fb_cmd) IOCTLModeAddFB = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(sysFBCmd{})), drm.IOCTLBase, 0xAE) // DRM_IOWR(0xAF, unsigned int) IOCTLModeRmFB = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(uint32(0))), drm.IOCTLBase, 0xAF) // DRM_IOWR(0xB2, struct drm_mode_create_dumb) IOCTLModeCreateDumb = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(sysCreateDumb{})), drm.IOCTLBase, 0xB2) // DRM_IOWR(0xB3, struct drm_mode_map_dumb) IOCTLModeMapDumb = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(sysMapDumb{})), drm.IOCTLBase, 0xB3) // DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) IOCTLModeDestroyDumb = ioctl.NewCode(ioctl.Read|ioctl.Write, uint16(unsafe.Sizeof(sysDestroyDumb{})), drm.IOCTLBase, 0xB4) )
Functions ¶
Types ¶
type Connector ¶
type Crtc ¶
type Encoder ¶
type Resources ¶
type SimpleModeset ¶
type SimpleModeset struct { Modesets []Modeset // contains filtered or unexported fields }
func NewSimpleModeset ¶
func NewSimpleModeset(file *os.File) (*SimpleModeset, error)
Click to show internal directories.
Click to hide internal directories.