diff options
author | Dave Airlie <airlied@redhat.com> | 2008-06-04 13:49:43 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-06-04 13:50:51 +1000 |
commit | 382aa3ceeb79165a9bdddc8f944de131c8cbf2dd (patch) | |
tree | 1c61f11da47cd9bfb7b9b34c0fa3cdcf888e3e7c /libdrm | |
parent | 9f31bd09c1e748f72a30f6a0861cd72d93258992 (diff) |
drm: introduce generation counter to interface.
Idea being if you want to add new crtc/output/encoder dynamically later,
you just increase the generation counter and userspace should re-read
all the resources
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/xf86drmMode.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libdrm/xf86drmMode.h b/libdrm/xf86drmMode.h index 56908d8f..3bd30a92 100644 --- a/libdrm/xf86drmMode.h +++ b/libdrm/xf86drmMode.h @@ -51,9 +51,16 @@ * buffer object interface. This object needs to be pinned. */ +/* + * generation - these are to be read by userspace, and if it notices + * while calling a get output or get crtc that the generation has changed + * it should re-call the mode resource functions resync its view of the + * outputs with current view. + */ typedef struct _drmModeRes { + uint32_t generation; int count_fbs; uint32_t *fbs; @@ -93,6 +100,7 @@ typedef struct _drmModeProperty { typedef struct _drmModeCrtc { unsigned int crtc_id; unsigned int buffer_id; /**< FB id to connect to 0 = disconnect*/ + uint32_t generation; uint32_t x, y; /**< Position on the frameuffer */ uint32_t width, height; @@ -110,6 +118,7 @@ typedef struct _drmModeCrtc { } drmModeCrtc, *drmModeCrtcPtr; typedef struct _drmModeEncoder { + uint32_t generation; unsigned int encoder_id; unsigned int encoder_type; uint32_t crtc; @@ -133,8 +142,8 @@ typedef enum { } drmModeSubPixel; typedef struct _drmModeConnector { + uint32_t generation; unsigned int connector_id; - unsigned int encoder; /**< Crtc currently connected to */ unsigned int connector_type; unsigned int connector_type_id; |