haskus-system-0.7.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.System.Linux.Internals.Graphics

Contents

Description

DRM/KMS Internals

Bindings with C structures and IOCTLs

Synopsis

Mode

data ScalingMode Source #

Scaling mode

Constructors

ScaleNone

Unmodified timing (display or software can still scale)

ScaleFullScreen

Full screen, ignore aspect

ScaleCenter

Centered, no scaling

ScaleAspect

Full screen, preserve aspect

data StructMode Source #

drm_mode_modeinfo

Instances

Generic StructMode Source # 

Associated Types

type Rep StructMode :: * -> * #

Storable StructMode Source # 
type Rep StructMode Source # 
type Rep StructMode = D1 (MetaData "StructMode" "Haskus.System.Linux.Internals.Graphics" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "StructMode" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "miClock") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) ((:*:) (S1 (MetaSel (Just Symbol "miHDisplay") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16)) (S1 (MetaSel (Just Symbol "miHSyncStart") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "miHSyncEnd") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16)) (S1 (MetaSel (Just Symbol "miHTotal") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16))) ((:*:) (S1 (MetaSel (Just Symbol "miHSkew") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16)) (S1 (MetaSel (Just Symbol "miVDisplay") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "miVSyncStart") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16)) (S1 (MetaSel (Just Symbol "miVSyncEnd") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16))) ((:*:) (S1 (MetaSel (Just Symbol "miVTotal") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16)) (S1 (MetaSel (Just Symbol "miVScan") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word16)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "miVRefresh") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "miFlags") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 ModeFlagsStereo3D))) ((:*:) (S1 (MetaSel (Just Symbol "miType") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 ModeTypes)) (S1 (MetaSel (Just Symbol "miName") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 (CStringBuffer 32))))))))

Resources

data StructCardRes Source #

drm_mode_card_res

Instances

Generic StructCardRes Source # 

Associated Types

type Rep StructCardRes :: * -> * #

Storable StructCardRes Source # 
type Rep StructCardRes Source # 
type Rep StructCardRes = D1 (MetaData "StructCardRes" "Haskus.System.Linux.Internals.Graphics" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "StructCardRes" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "csFbIdPtr") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64)) ((:*:) (S1 (MetaSel (Just Symbol "csCrtcIdPtr") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64)) (S1 (MetaSel (Just Symbol "csConnIdPtr") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64)))) ((:*:) (S1 (MetaSel (Just Symbol "csEncIdPtr") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64)) ((:*:) (S1 (MetaSel (Just Symbol "csCountFbs") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "csCountCrtcs") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "csCountConns") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) ((:*:) (S1 (MetaSel (Just Symbol "csCountEncs") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "csMinWidth") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)))) ((:*:) (S1 (MetaSel (Just Symbol "csMaxWidth") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) ((:*:) (S1 (MetaSel (Just Symbol "csMinHeight") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "csMaxHeight") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)))))))

Controller

data StructController Source #

drm_mode_crtc

Instances

Generic StructController Source # 
Storable StructController Source # 
type Rep StructController Source # 

Plane

data StructSetPlane Source #

drm_mode_set_plane

Planes blend with or override other bits on the CRTC

Constructors

StructSetPlane 

Fields

Instances

Generic StructSetPlane Source # 

Associated Types

type Rep StructSetPlane :: * -> * #

Storable StructSetPlane Source # 
type Rep StructSetPlane Source # 
type Rep StructSetPlane = D1 (MetaData "StructSetPlane" "Haskus.System.Linux.Internals.Graphics" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "StructSetPlane" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "spPlaneId") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) ((:*:) (S1 (MetaSel (Just Symbol "spCrtcId") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "spFbId") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)))) ((:*:) (S1 (MetaSel (Just Symbol "spFlags") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 ModeFieldPresents)) ((:*:) (S1 (MetaSel (Just Symbol "spCrtcX") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int32)) (S1 (MetaSel (Just Symbol "spCrtcY") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int32))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "spCrtcW") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) ((:*:) (S1 (MetaSel (Just Symbol "spCrtcH") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "spSrcX") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 (FixedPoint Word32 16 16))))) ((:*:) (S1 (MetaSel (Just Symbol "spSrcY") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 (FixedPoint Word32 16 16))) ((:*:) (S1 (MetaSel (Just Symbol "spSrcH") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 (FixedPoint Word32 16 16))) (S1 (MetaSel (Just Symbol "spSrcW") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 (FixedPoint Word32 16 16))))))))

data StructGetPlane Source #

drm_mode_get_plane

data StructGetPlaneRes Source #

drm_mode_get_plane_res

Encoder

data EncoderType Source #

Type of the encoder

Constructors

EncoderTypeNone 
EncoderTypeDAC

for VGA and analog on DVI-I/DVI-A

EncoderTypeTMDS

for DVI, HDMI and (embedded) DisplayPort

EncoderTypeLVDS

for display panels

EncoderTypeTVDAC

for TV output (Composite, S-Video, Component, SCART)

EncoderTypeVirtual

for virtual machine display

EncoderTypeDSI 
EncoderTypeDPMST 

data StructGetEncoder Source #

drm_mode_get_encoder

Constructors

StructGetEncoder 

Fields

Connector

data ConnectorType Source #

Connector type

data StructGetConnector Source #

drm_mode_get_connector

Instances

Generic StructGetConnector Source # 
Storable StructGetConnector Source # 
type Rep StructGetConnector Source # 
type Rep StructGetConnector = D1 (MetaData "StructGetConnector" "Haskus.System.Linux.Internals.Graphics" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "StructGetConnector" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "connEncodersPtr") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64)) ((:*:) (S1 (MetaSel (Just Symbol "connModesPtr") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64)) (S1 (MetaSel (Just Symbol "connPropsPtr") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "connPropValuesPtr") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64)) (S1 (MetaSel (Just Symbol "connModesCount") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32))) ((:*:) (S1 (MetaSel (Just Symbol "connPropsCount") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "connEncodersCount") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32))))) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "connEncoderID_") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "connConnectorID_") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32))) ((:*:) (S1 (MetaSel (Just Symbol "connConnectorType_") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (EnumField Word32 ConnectorType))) (S1 (MetaSel (Just Symbol "connConnectorTypeID_") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "connConnection_") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "connWidth_") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32))) ((:*:) (S1 (MetaSel (Just Symbol "connHeight_") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "connSubPixel_") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (EnumField Word32 SubPixel))))))))

Properties

data StructGetProperty Source #

drm_mode_get_property

Constructors

StructGetProperty 

Fields

data StructGetObjectProperties Source #

drm_mode_obj_get_properties

data StructGetBlob Source #

drm_mode_get_blob

Constructors

StructGetBlob 

Fields

Framebuffer

data StructFrameBufferCommand Source #

Data matching the C structure drm_mode_fb_cmd2

Constructors

StructFrameBufferCommand 

Fields

Instances

Generic StructFrameBufferCommand Source # 
Storable StructFrameBufferCommand Source # 
type Rep StructFrameBufferCommand Source # 

data DirtyAnnotation Source #

Mark a region of a framebuffer as dirty.

Some hardware does not automatically update display contents as a hardware or software draw to a framebuffer. This ioctl allows userspace to tell the kernel and the hardware what regions of the framebuffer have changed.

The kernel or hardware is free to update more then just the region specified by the clip rects. The kernel or hardware may also delay and/or coalesce several calls to dirty into a single update.

Userspace may annotate the updates, the annotates are a promise made by the caller that the change is either a copy of pixels or a fill of a single color in the region specified.

If the DirtyCopy mode is used then the clip rects are paired as (src,dst). The width and height of each one of the pairs must match.

If the DirtyFill mode is used the caller promises that the region specified of the clip rects is filled completely with a single color as given in the color argument.

Constructors

Dirty [Clip] 
DirtyCopy [(Clip, Clip)] 
DirtyFill Word32 [Clip] 

data StructFrameBufferDirty Source #

drm_mode_fb_dirty_cmd

Cursor

data CursorFlag Source #

Depending on the value in flags different members are used.

CursorFlagBO uses crtcId width height handle - if 0 turns the cursor off

CursorFlagMove uses crtcId x y

data StructCursor Source #

drm_mode_cursor

data StructCursor2 Source #

drm_mode_cursor2

Instances

Generic StructCursor2 Source # 

Associated Types

type Rep StructCursor2 :: * -> * #

Storable StructCursor2 Source # 
type Rep StructCursor2 Source # 

Gamma look-up table

Page flipping

data StructPageFlipTarget Source #

Generic (dumb) buffer

data StructCreateDumb Source #

drm_mode_create_dumb

Constructors

StructCreateDumb 

Fields

Instances

Show StructCreateDumb Source # 
Generic StructCreateDumb Source # 
Storable StructCreateDumb Source # 
type Rep StructCreateDumb Source # 

data StructMapDumb Source #

drm_mode_map_dumb

Constructors

StructMapDumb 

Fields

newtype StructDestroyDumb Source #

drm_mode_destroy_dumb

Constructors

StructDestroyDumb 

Fields

Instances

Atomic

data AtomicFlag Source #

Flags for the atomic state change

Constructors

AtomicFlagPageFlipEvent

Generates a page-flip event

AtomicFlagPageFlipAsync

Asynchronous page-flip, i.e. don't wait for v-blank (may not be supported)

AtomicFlagTestOnly

Only test the config, don't commit it

AtomicFlagNonBlock

Schedule an asynchronous commit (may not be supported)

AtomicFlagAllowModeset

Allow full mode-setting. This flag is useful for devices such as tablets whose screen is often shutdown: we can use a degraded mode (scaled, etc.) for a while to save power and only perform the full modeset when the screen is reactivated.

type AtomicFlags = BitSet Word32 AtomicFlag Source #

Set of atomic flags

data StructAtomic Source #

drm_mode_atomic

Instances

Generic StructAtomic Source # 

Associated Types

type Rep StructAtomic :: * -> * #

Storable StructAtomic Source # 
type Rep StructAtomic Source # 

Blob

data StructCreateBlob Source #

Create a new blob data property, copying length bytes from data pointer, and returning new blob ID.

Constructors

StructCreateBlob 

Fields

newtype StructDestroyBlob Source #

Destroy a user-created blob property.

Constructors

StructDestroyBlob 

Fields

Instances

Generic

data Clip Source #

Constructors

Clip 

Fields

Instances

Eq Clip Source # 

Methods

(==) :: Clip -> Clip -> Bool #

(/=) :: Clip -> Clip -> Bool #

Show Clip Source # 

Methods

showsPrec :: Int -> Clip -> ShowS #

show :: Clip -> String #

showList :: [Clip] -> ShowS #

Generic Clip Source # 

Associated Types

type Rep Clip :: * -> * #

Methods

from :: Clip -> Rep Clip x #

to :: Rep Clip x -> Clip #

Storable Clip Source # 

Methods

peekIO :: Ptr Clip -> IO Clip #

pokeIO :: Ptr Clip -> Clip -> IO () #

alignment :: Clip -> Word #

sizeOf :: Clip -> Word #

type Rep Clip Source # 

Capabilities

data StructGetCap Source #

drm_get_cap

The CURSOR_WIDTH and CURSOR_HEIGHT capabilities return a valid widthxheight combination for the hardware cursor. The intention is that a hardware agnostic userspace can query a cursor plane size to use.

Note that the cross-driver contract is to merely return a valid size; drivers are free to attach another meaning on top, eg. i915 returns the maximum plane size.

Instances

Generic StructGetCap Source # 

Associated Types

type Rep StructGetCap :: * -> * #

Storable StructGetCap Source # 
type Rep StructGetCap Source # 
type Rep StructGetCap = D1 (MetaData "StructGetCap" "Haskus.System.Linux.Internals.Graphics" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "StructGetCap" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "gcCapability") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (EnumField Word64 Capability))) (S1 (MetaSel (Just Symbol "gcValue") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word64))))

data ClientCapability Source #

Client capabilities

Constructors

ClientCapStereo3D

if set, the DRM core will expose the stereo 3D capabilities of the monitor by advertising the supported 3D layouts in the flags of struct drm_mode_modeinfo (cf Stereo3D)

ClientCapUniversalPlanes

If set, the DRM core will expose all planes (overlay, primary, and cursor) to userspace.

ClientCapAtomic

If set, the DRM core will expose atomic properties to userspace

Prime

data StructPrimeHandle Source #

struct drm_prime_handle

Constructors

StructPrimeHandle 

Fields

IOCTLs

Events

data DRMEventHeader Source #

drm_event

Constructors

DRMEventHeader 

Instances

Generic DRMEventHeader Source # 

Associated Types

type Rep DRMEventHeader :: * -> * #

Storable DRMEventHeader Source # 
type Rep DRMEventHeader Source # 
type Rep DRMEventHeader = D1 (MetaData "DRMEventHeader" "Haskus.System.Linux.Internals.Graphics" "haskus-system-0.7.0.0-FRxqghdHeI3NpHOm98r9a" False) (C1 (MetaCons "DRMEventHeader" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "eventType") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32)) (S1 (MetaSel (Just Symbol "eventLength") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Word32))))

data EventType Source #

Event type

Constructors

VBlank

Beginning of the VBlank period

PageFlipComplete

Page flipping complete

toEventType :: Word32 -> Maybe EventType Source #

Try to recognize the event type

data DRMEvent Source #

drm_event_vblank

Rotation/reflection

SubPixel order