mode

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DisplayModeLen = 32

Variables

This section is empty.

Functions

func AddFB

func AddFB(f *os.File, fb *SysFBCmd) error

func CreateFB

func CreateFB(f *os.File, fb *SysCreateDumb) error

func DestroyDumb

func DestroyDumb(f *os.File, fb *SysDestroyDumb) error

func GetConnector

func GetConnector(f *os.File, conn *SysGetConnector) error

func GetCrtc

func GetCrtc(f *os.File, crtc *SysCrtc) error

func GetEncoder

func GetEncoder(f *os.File, en *SysGetEncoder) error

func GetResources

func GetResources(f *os.File, res *SysResources) error

func MapDumb

func MapDumb(f *os.File, fb *SysMapDumb) error

func RmFB

func RmFB(f *os.File, fb *SysRmFB) error

func SetCrtc

func SetCrtc(f *os.File, crtc *SysCrtc) error

Types

type SysCreateDumb

type SysCreateDumb struct {
	Height uint32
	Width  uint32
	BPP    uint32
	Flags  uint32

	// returned values
	Handle uint32
	Pitch  uint32
	Size   uint64
}

type SysCrtc

type SysCrtc struct {
	SetConnectorsPtr uint64
	CountConnectors  uint32

	ID   uint32
	FBID uint32 // Id of framebuffer

	// Position on the frameuffer
	X uint32
	Y uint32

	GammaSize uint32
	ModeValid uint32
	Mode      SysInfo
}

type SysDestroyDumb

type SysDestroyDumb struct {
	Handle uint32
}

type SysFBCmd

type SysFBCmd struct {
	FBID   uint32
	Width  uint32
	Height uint32
	Pitch  uint32
	BPP    uint32
	Depth  uint32

	/* driver specific handle */
	Handle uint32
}

type SysGetConnector

type SysGetConnector struct {
	EncodersPtr   uint64
	ModesPtr      uint64
	PropsPtr      uint64
	PropValuesPtr uint64

	CountModes    uint32
	CountProps    uint32
	CountEncoders uint32

	EncoderID       uint32 // current encoder
	ID              uint32
	ConnectorType   uint32
	ConnectorTypeID uint32

	Connection uint32

	// HxW in millimeters
	MMWidth  uint32
	MMHeight uint32
	Subpixel uint32
}

type SysGetEncoder

type SysGetEncoder struct {
	ID   uint32
	Type uint32

	CrtcID uint32

	PossibleCrtcs  uint32
	PossibleClones uint32
}

type SysInfo

type SysInfo struct {
	Clock uint32

	Hdisplay   uint16
	HsyncStart uint16
	HsyncEnd   uint16
	Htotal     uint16
	Hskew      uint16

	Vdisplay   uint16
	VsyncStart uint16
	VsyncEnd   uint16
	Vtotal     uint16
	Vscan      uint16

	Vrefresh uint32

	Flags uint32
	Type  uint32
	Name  [DisplayModeLen]uint8
}

type SysMapDumb

type SysMapDumb struct {
	Handle uint32 // Handle for the object being mapped
	Pad    uint32

	// Fake offset to use for subsequent mmap call
	// This is a fixed-size type for 32/64 compatibility.
	Offset uint64
}

type SysResources

type SysResources struct {
	FBIDPtr         uint64
	CrtcIDPtr       uint64
	ConnectorIDPtr  uint64
	EncoderIDPtr    uint64
	CountFBs        uint32
	CountCrtcs      uint32
	CountConnectors uint32
	CountEncoders   uint32
	MinWidth        uint32
	MaxWidth        uint32
	MinHeight       uint32
	MaxHeight       uint32
}

type SysRmFB

type SysRmFB struct {
	Handle uint32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL