aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-10-20 02:17:17 -0400
committerDave Airlie <airlied@redhat.com>2014-12-08 18:56:46 -0500
commit138f9ebb9755a8cf09fd6a9ff8d011aaf5fb478f (patch)
tree167bcb1d1c10d7ea77ac084399698c7ad7c616ac /include/drm
parentb49b55bd4fba6aa9bb25459e0ac3991c60c4aba4 (diff)
drm: add tile_group support. (v3)
A tile group is an identifier shared by a single monitor, DisplayID topology has 8 bytes we can use for this, just use those for now until something else comes up in the future. We assign these to an idr and use the idr to tell userspace what connectors are in the same tile group. DisplayID v1.3 says the serial number must be unique for displays from the same manufacturer. v2: destroy idr (dvdhrm) add docbook (danvet) airlied:- not sure how to make docbook add fns to tile group section. v3: fix missing unlock. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_crtc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index dd2c16e43333..8f760a2373f9 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -137,6 +137,14 @@ struct drm_display_info {
137 u8 cea_rev; 137 u8 cea_rev;
138}; 138};
139 139
140/* data corresponds to displayid vend/prod/serial */
141struct drm_tile_group {
142 struct kref refcount;
143 struct drm_device *dev;
144 int id;
145 u8 group_data[8];
146};
147
140struct drm_framebuffer_funcs { 148struct drm_framebuffer_funcs {
141 /* note: use drm_framebuffer_remove() */ 149 /* note: use drm_framebuffer_remove() */
142 void (*destroy)(struct drm_framebuffer *framebuffer); 150 void (*destroy)(struct drm_framebuffer *framebuffer);
@@ -978,6 +986,7 @@ struct drm_mode_config {
978 struct drm_modeset_acquire_ctx *acquire_ctx; /* for legacy _lock_all() / _unlock_all() */ 986 struct drm_modeset_acquire_ctx *acquire_ctx; /* for legacy _lock_all() / _unlock_all() */
979 struct mutex idr_mutex; /* for IDR management */ 987 struct mutex idr_mutex; /* for IDR management */
980 struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */ 988 struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */
989 struct idr tile_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */
981 /* this is limited to one for now */ 990 /* this is limited to one for now */
982 991
983 struct mutex fb_lock; /* proctects global and per-file fb lists */ 992 struct mutex fb_lock; /* proctects global and per-file fb lists */
@@ -1326,6 +1335,13 @@ extern void drm_set_preferred_mode(struct drm_connector *connector,
1326extern int drm_edid_header_is_valid(const u8 *raw_edid); 1335extern int drm_edid_header_is_valid(const u8 *raw_edid);
1327extern bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid); 1336extern bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid);
1328extern bool drm_edid_is_valid(struct edid *edid); 1337extern bool drm_edid_is_valid(struct edid *edid);
1338
1339extern struct drm_tile_group *drm_mode_create_tile_group(struct drm_device *dev,
1340 char topology[8]);
1341extern struct drm_tile_group *drm_mode_get_tile_group(struct drm_device *dev,
1342 char topology[8]);
1343extern void drm_mode_put_tile_group(struct drm_device *dev,
1344 struct drm_tile_group *tg);
1329struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, 1345struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev,
1330 int hsize, int vsize, int fresh, 1346 int hsize, int vsize, int fresh,
1331 bool rb); 1347 bool rb);