aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-08-25 19:04:03 -0400
committerDave Airlie <airlied@redhat.com>2014-08-25 19:04:03 -0400
commitc0ee755fc57319a623e0d9ef839cf8fb26ce8d60 (patch)
tree727fe78a158757f75b54d7e037b383ad6a39843c /include/drm
parent52addcf9d6669fa439387610bc65c92fa0980cef (diff)
parent14f476fa24e81d0beea1aa14d763102958518d60 (diff)
Merge tag 'topic/core-stuff-2014-08-15' of git://anongit.freedesktop.org/drm-intel into drm-next
So small drm stuff all over for 3.18. Biggest one is the cmdline parsing from Chris with a few fixes from me to make it work for stupid kernel configs. Plus the atomic prep series. Tested for more than a week in -nightly and Ville/Imre indeed discovered some fun which is now fixed (and i915 vblank patches postponed since the fixups need this branch plus drm-intel-next merged together). * tag 'topic/core-stuff-2014-08-15' of git://anongit.freedesktop.org/drm-intel: drm: Use the type of the array element when reallocating drm: Don't return 0 for a value used as a denominator drm: Docbook fixes drm/irq: Implement a generic vblank_wait function drm: Add a plane->reset hook drm: trylock modest locking for fbdev panics drm: Move ->old_fb from crtc to plane drm: Handle legacy per-crtc locking with full acquire ctx drm: Move modeset_lock_all helpers to drm_modeset_lock.[hc] drm: Add drm_plane/connector_index drm: idiot-proof vblank drm: Warn when leaking flip events on close drm: Perform cmdline mode parsing during connector initialisation video/fbdev: Always built-in video= cmdline parsing drm: Don't grab an fb reference for the idr
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drmP.h2
-rw-r--r--include/drm/drm_crtc.h22
-rw-r--r--include/drm/drm_fb_helper.h1
-rw-r--r--include/drm/drm_modeset_lock.h16
4 files changed, 32 insertions, 9 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 196890735367..d2f64b9ccefd 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1294,6 +1294,8 @@ extern int drm_vblank_get(struct drm_device *dev, int crtc);
1294extern void drm_vblank_put(struct drm_device *dev, int crtc); 1294extern void drm_vblank_put(struct drm_device *dev, int crtc);
1295extern int drm_crtc_vblank_get(struct drm_crtc *crtc); 1295extern int drm_crtc_vblank_get(struct drm_crtc *crtc);
1296extern void drm_crtc_vblank_put(struct drm_crtc *crtc); 1296extern void drm_crtc_vblank_put(struct drm_crtc *crtc);
1297extern void drm_wait_one_vblank(struct drm_device *dev, int crtc);
1298extern void drm_crtc_wait_one_vblank(struct drm_crtc *crtc);
1297extern void drm_vblank_off(struct drm_device *dev, int crtc); 1299extern void drm_vblank_off(struct drm_device *dev, int crtc);
1298extern void drm_vblank_on(struct drm_device *dev, int crtc); 1300extern void drm_vblank_on(struct drm_device *dev, int crtc);
1299extern void drm_crtc_vblank_off(struct drm_crtc *crtc); 1301extern void drm_crtc_vblank_off(struct drm_crtc *crtc);
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index f1105d0da059..2c1f58d6957a 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -218,10 +218,6 @@ struct drm_property {
218 struct list_head enum_blob_list; 218 struct list_head enum_blob_list;
219}; 219};
220 220
221void drm_modeset_lock_all(struct drm_device *dev);
222void drm_modeset_unlock_all(struct drm_device *dev);
223void drm_warn_on_modeset_not_all_locked(struct drm_device *dev);
224
225struct drm_crtc; 221struct drm_crtc;
226struct drm_connector; 222struct drm_connector;
227struct drm_encoder; 223struct drm_encoder;
@@ -345,10 +341,6 @@ struct drm_crtc {
345 int cursor_x; 341 int cursor_x;
346 int cursor_y; 342 int cursor_y;
347 343
348 /* Temporary tracking of the old fb while a modeset is ongoing. Used
349 * by drm_mode_set_config_internal to implement correct refcounting. */
350 struct drm_framebuffer *old_fb;
351
352 bool enabled; 344 bool enabled;
353 345
354 /* Requested mode from modesetting. */ 346 /* Requested mode from modesetting. */
@@ -375,6 +367,12 @@ struct drm_crtc {
375 void *helper_private; 367 void *helper_private;
376 368
377 struct drm_object_properties properties; 369 struct drm_object_properties properties;
370
371 /*
372 * For legacy crtc ioctls so that atomic drivers can get at the locking
373 * acquire context.
374 */
375 struct drm_modeset_acquire_ctx *acquire_ctx;
378}; 376};
379 377
380 378
@@ -548,6 +546,7 @@ struct drm_connector {
548 void *helper_private; 546 void *helper_private;
549 547
550 /* forced on connector */ 548 /* forced on connector */
549 struct drm_cmdline_mode cmdline_mode;
551 enum drm_connector_force force; 550 enum drm_connector_force force;
552 bool override_edid; 551 bool override_edid;
553 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER]; 552 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER];
@@ -582,6 +581,7 @@ struct drm_plane_funcs {
582 uint32_t src_w, uint32_t src_h); 581 uint32_t src_w, uint32_t src_h);
583 int (*disable_plane)(struct drm_plane *plane); 582 int (*disable_plane)(struct drm_plane *plane);
584 void (*destroy)(struct drm_plane *plane); 583 void (*destroy)(struct drm_plane *plane);
584 void (*reset)(struct drm_plane *plane);
585 585
586 int (*set_property)(struct drm_plane *plane, 586 int (*set_property)(struct drm_plane *plane,
587 struct drm_property *property, uint64_t val); 587 struct drm_property *property, uint64_t val);
@@ -620,6 +620,10 @@ struct drm_plane {
620 struct drm_crtc *crtc; 620 struct drm_crtc *crtc;
621 struct drm_framebuffer *fb; 621 struct drm_framebuffer *fb;
622 622
623 /* Temporary tracking of the old fb while a modeset is ongoing. Used
624 * by drm_mode_set_config_internal to implement correct refcounting. */
625 struct drm_framebuffer *old_fb;
626
623 const struct drm_plane_funcs *funcs; 627 const struct drm_plane_funcs *funcs;
624 628
625 struct drm_object_properties properties; 629 struct drm_object_properties properties;
@@ -903,6 +907,7 @@ int drm_connector_register(struct drm_connector *connector);
903void drm_connector_unregister(struct drm_connector *connector); 907void drm_connector_unregister(struct drm_connector *connector);
904 908
905extern void drm_connector_cleanup(struct drm_connector *connector); 909extern void drm_connector_cleanup(struct drm_connector *connector);
910extern unsigned int drm_connector_index(struct drm_connector *connector);
906/* helper to unplug all connectors from sysfs for device */ 911/* helper to unplug all connectors from sysfs for device */
907extern void drm_connector_unplug_all(struct drm_device *dev); 912extern void drm_connector_unplug_all(struct drm_device *dev);
908 913
@@ -942,6 +947,7 @@ extern int drm_plane_init(struct drm_device *dev,
942 const uint32_t *formats, uint32_t format_count, 947 const uint32_t *formats, uint32_t format_count,
943 bool is_primary); 948 bool is_primary);
944extern void drm_plane_cleanup(struct drm_plane *plane); 949extern void drm_plane_cleanup(struct drm_plane *plane);
950extern unsigned int drm_plane_index(struct drm_plane *plane);
945extern void drm_plane_force_disable(struct drm_plane *plane); 951extern void drm_plane_force_disable(struct drm_plane *plane);
946extern int drm_crtc_check_viewport(const struct drm_crtc *crtc, 952extern int drm_crtc_check_viewport(const struct drm_crtc *crtc,
947 int x, int y, 953 int x, int y,
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index bfd329d613c4..f4ad254e3488 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -77,7 +77,6 @@ struct drm_fb_helper_funcs {
77 77
78struct drm_fb_helper_connector { 78struct drm_fb_helper_connector {
79 struct drm_connector *connector; 79 struct drm_connector *connector;
80 struct drm_cmdline_mode cmdline_mode;
81}; 80};
82 81
83struct drm_fb_helper { 82struct drm_fb_helper {
diff --git a/include/drm/drm_modeset_lock.h b/include/drm/drm_modeset_lock.h
index 402aa7a6a058..a3f736d24382 100644
--- a/include/drm/drm_modeset_lock.h
+++ b/include/drm/drm_modeset_lock.h
@@ -53,6 +53,11 @@ struct drm_modeset_acquire_ctx {
53 * list of held locks (drm_modeset_lock) 53 * list of held locks (drm_modeset_lock)
54 */ 54 */
55 struct list_head locked; 55 struct list_head locked;
56
57 /**
58 * Trylock mode, use only for panic handlers!
59 */
60 bool trylock_only;
56}; 61};
57 62
58/** 63/**
@@ -120,6 +125,17 @@ int drm_modeset_lock_interruptible(struct drm_modeset_lock *lock,
120void drm_modeset_unlock(struct drm_modeset_lock *lock); 125void drm_modeset_unlock(struct drm_modeset_lock *lock);
121 126
122struct drm_device; 127struct drm_device;
128struct drm_crtc;
129
130void drm_modeset_lock_all(struct drm_device *dev);
131int __drm_modeset_lock_all(struct drm_device *dev, bool trylock);
132void drm_modeset_unlock_all(struct drm_device *dev);
133void drm_modeset_lock_crtc(struct drm_crtc *crtc);
134void drm_modeset_unlock_crtc(struct drm_crtc *crtc);
135void drm_warn_on_modeset_not_all_locked(struct drm_device *dev);
136struct drm_modeset_acquire_ctx *
137drm_modeset_legacy_acquire_ctx(struct drm_crtc *crtc);
138
123int drm_modeset_lock_all_crtcs(struct drm_device *dev, 139int drm_modeset_lock_all_crtcs(struct drm_device *dev,
124 struct drm_modeset_acquire_ctx *ctx); 140 struct drm_modeset_acquire_ctx *ctx);
125 141