diff options
| -rw-r--r-- | drivers/gpu/drm/drm_atomic.c | 54 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_crtc_internal.h | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/drm_ioctl.c | 1 | ||||
| -rw-r--r-- | include/drm/drm_atomic.h | 12 |
4 files changed, 14 insertions, 59 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 67f64bd1058f..1e38dfc8e462 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c | |||
| @@ -247,21 +247,11 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, | |||
| 247 | } | 247 | } |
| 248 | EXPORT_SYMBOL(drm_atomic_crtc_set_property); | 248 | EXPORT_SYMBOL(drm_atomic_crtc_set_property); |
| 249 | 249 | ||
| 250 | /** | 250 | /* |
| 251 | * drm_atomic_crtc_get_property - get property on CRTC | ||
| 252 | * @crtc: the drm CRTC to get a property on | ||
| 253 | * @state: the state object with the property value to read | ||
| 254 | * @property: the property to get | ||
| 255 | * @val: the property value (returned by reference) | ||
| 256 | * | ||
| 257 | * Use this instead of calling crtc->atomic_get_property directly. | ||
| 258 | * This function handles generic/core properties and calls out to | 251 | * This function handles generic/core properties and calls out to |
| 259 | * driver's ->atomic_get_property() for driver properties. To ensure | 252 | * driver's ->atomic_get_property() for driver properties. To ensure |
| 260 | * consistent behavior you must call this function rather than the | 253 | * consistent behavior you must call this function rather than the |
| 261 | * driver hook directly. | 254 | * driver hook directly. |
| 262 | * | ||
| 263 | * RETURNS: | ||
| 264 | * Zero on success, error code on failure | ||
| 265 | */ | 255 | */ |
| 266 | int drm_atomic_crtc_get_property(struct drm_crtc *crtc, | 256 | int drm_atomic_crtc_get_property(struct drm_crtc *crtc, |
| 267 | const struct drm_crtc_state *state, | 257 | const struct drm_crtc_state *state, |
| @@ -271,7 +261,6 @@ int drm_atomic_crtc_get_property(struct drm_crtc *crtc, | |||
| 271 | return crtc->funcs->atomic_get_property(crtc, state, property, val); | 261 | return crtc->funcs->atomic_get_property(crtc, state, property, val); |
| 272 | return -EINVAL; | 262 | return -EINVAL; |
| 273 | } | 263 | } |
| 274 | EXPORT_SYMBOL(drm_atomic_crtc_get_property); | ||
| 275 | 264 | ||
| 276 | /** | 265 | /** |
| 277 | * drm_atomic_crtc_check - check crtc state | 266 | * drm_atomic_crtc_check - check crtc state |
| @@ -409,23 +398,14 @@ int drm_atomic_plane_set_property(struct drm_plane *plane, | |||
| 409 | } | 398 | } |
| 410 | EXPORT_SYMBOL(drm_atomic_plane_set_property); | 399 | EXPORT_SYMBOL(drm_atomic_plane_set_property); |
| 411 | 400 | ||
| 412 | /** | 401 | /* |
| 413 | * drm_atomic_plane_get_property - get property on plane | ||
| 414 | * @plane: the drm plane to get a property on | ||
| 415 | * @state: the state object with the property value to read | ||
| 416 | * @property: the property to get | ||
| 417 | * @val: the property value (returned by reference) | ||
| 418 | * | ||
| 419 | * Use this instead of calling plane->atomic_get_property directly. | ||
| 420 | * This function handles generic/core properties and calls out to | 402 | * This function handles generic/core properties and calls out to |
| 421 | * driver's ->atomic_get_property() for driver properties. To ensure | 403 | * driver's ->atomic_get_property() for driver properties. To ensure |
| 422 | * consistent behavior you must call this function rather than the | 404 | * consistent behavior you must call this function rather than the |
| 423 | * driver hook directly. | 405 | * driver hook directly. |
| 424 | * | ||
| 425 | * RETURNS: | ||
| 426 | * Zero on success, error code on failure | ||
| 427 | */ | 406 | */ |
| 428 | int drm_atomic_plane_get_property(struct drm_plane *plane, | 407 | static int |
| 408 | drm_atomic_plane_get_property(struct drm_plane *plane, | ||
| 429 | const struct drm_plane_state *state, | 409 | const struct drm_plane_state *state, |
| 430 | struct drm_property *property, uint64_t *val) | 410 | struct drm_property *property, uint64_t *val) |
| 431 | { | 411 | { |
| @@ -460,7 +440,6 @@ int drm_atomic_plane_get_property(struct drm_plane *plane, | |||
| 460 | 440 | ||
| 461 | return 0; | 441 | return 0; |
| 462 | } | 442 | } |
| 463 | EXPORT_SYMBOL(drm_atomic_plane_get_property); | ||
| 464 | 443 | ||
| 465 | /** | 444 | /** |
| 466 | * drm_atomic_plane_check - check plane state | 445 | * drm_atomic_plane_check - check plane state |
| @@ -650,23 +629,14 @@ int drm_atomic_connector_set_property(struct drm_connector *connector, | |||
| 650 | } | 629 | } |
| 651 | EXPORT_SYMBOL(drm_atomic_connector_set_property); | 630 | EXPORT_SYMBOL(drm_atomic_connector_set_property); |
| 652 | 631 | ||
| 653 | /** | 632 | /* |
| 654 | * drm_atomic_connector_get_property - get property on connector | ||
| 655 | * @connector: the drm connector to get a property on | ||
| 656 | * @state: the state object with the property value to read | ||
| 657 | * @property: the property to get | ||
| 658 | * @val: the property value (returned by reference) | ||
| 659 | * | ||
| 660 | * Use this instead of calling connector->atomic_get_property directly. | ||
| 661 | * This function handles generic/core properties and calls out to | 633 | * This function handles generic/core properties and calls out to |
| 662 | * driver's ->atomic_get_property() for driver properties. To ensure | 634 | * driver's ->atomic_get_property() for driver properties. To ensure |
| 663 | * consistent behavior you must call this function rather than the | 635 | * consistent behavior you must call this function rather than the |
| 664 | * driver hook directly. | 636 | * driver hook directly. |
| 665 | * | ||
| 666 | * RETURNS: | ||
| 667 | * Zero on success, error code on failure | ||
| 668 | */ | 637 | */ |
| 669 | int drm_atomic_connector_get_property(struct drm_connector *connector, | 638 | static int |
| 639 | drm_atomic_connector_get_property(struct drm_connector *connector, | ||
| 670 | const struct drm_connector_state *state, | 640 | const struct drm_connector_state *state, |
| 671 | struct drm_property *property, uint64_t *val) | 641 | struct drm_property *property, uint64_t *val) |
| 672 | { | 642 | { |
| @@ -686,17 +656,7 @@ int drm_atomic_connector_get_property(struct drm_connector *connector, | |||
| 686 | 656 | ||
| 687 | return 0; | 657 | return 0; |
| 688 | } | 658 | } |
| 689 | EXPORT_SYMBOL(drm_atomic_connector_get_property); | ||
| 690 | 659 | ||
| 691 | /** | ||
| 692 | * drm_atomic_get_property - helper to read atomic property | ||
| 693 | * @obj: drm mode object whose property to read | ||
| 694 | * @property: the property to read | ||
| 695 | * @val: the read value, returned by reference | ||
| 696 | * | ||
| 697 | * RETURNS: | ||
| 698 | * Zero on success, error code on failure | ||
| 699 | */ | ||
| 700 | int drm_atomic_get_property(struct drm_mode_object *obj, | 660 | int drm_atomic_get_property(struct drm_mode_object *obj, |
| 701 | struct drm_property *property, uint64_t *val) | 661 | struct drm_property *property, uint64_t *val) |
| 702 | { | 662 | { |
diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h index a2945ee6d675..247dc8b62564 100644 --- a/drivers/gpu/drm/drm_crtc_internal.h +++ b/drivers/gpu/drm/drm_crtc_internal.h | |||
| @@ -36,3 +36,9 @@ int drm_mode_object_get(struct drm_device *dev, | |||
| 36 | void drm_mode_object_put(struct drm_device *dev, | 36 | void drm_mode_object_put(struct drm_device *dev, |
| 37 | struct drm_mode_object *object); | 37 | struct drm_mode_object *object); |
| 38 | 38 | ||
| 39 | /* drm_atomic.c */ | ||
| 40 | int drm_atomic_get_property(struct drm_mode_object *obj, | ||
| 41 | struct drm_property *property, uint64_t *val); | ||
| 42 | int drm_mode_atomic_ioctl(struct drm_device *dev, | ||
| 43 | void *data, struct drm_file *file_priv); | ||
| 44 | |||
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index a28c0abd1a38..5cb405812245 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <drm/drm_core.h> | 32 | #include <drm/drm_core.h> |
| 33 | #include "drm_legacy.h" | 33 | #include "drm_legacy.h" |
| 34 | #include "drm_internal.h" | 34 | #include "drm_internal.h" |
| 35 | #include "drm_crtc_internal.h" | ||
| 35 | 36 | ||
| 36 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
| 37 | #include <linux/export.h> | 38 | #include <linux/export.h> |
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 231fb485abb3..51168a8b723a 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h | |||
| @@ -41,30 +41,18 @@ drm_atomic_get_crtc_state(struct drm_atomic_state *state, | |||
| 41 | int drm_atomic_crtc_set_property(struct drm_crtc *crtc, | 41 | int drm_atomic_crtc_set_property(struct drm_crtc *crtc, |
| 42 | struct drm_crtc_state *state, struct drm_property *property, | 42 | struct drm_crtc_state *state, struct drm_property *property, |
| 43 | uint64_t val); | 43 | uint64_t val); |
| 44 | int drm_atomic_crtc_get_property(struct drm_crtc *crtc, | ||
| 45 | const struct drm_crtc_state *state, | ||
| 46 | struct drm_property *property, uint64_t *val); | ||
| 47 | struct drm_plane_state * __must_check | 44 | struct drm_plane_state * __must_check |
| 48 | drm_atomic_get_plane_state(struct drm_atomic_state *state, | 45 | drm_atomic_get_plane_state(struct drm_atomic_state *state, |
| 49 | struct drm_plane *plane); | 46 | struct drm_plane *plane); |
| 50 | int drm_atomic_plane_set_property(struct drm_plane *plane, | 47 | int drm_atomic_plane_set_property(struct drm_plane *plane, |
| 51 | struct drm_plane_state *state, struct drm_property *property, | 48 | struct drm_plane_state *state, struct drm_property *property, |
| 52 | uint64_t val); | 49 | uint64_t val); |
| 53 | int drm_atomic_plane_get_property(struct drm_plane *plane, | ||
| 54 | const struct drm_plane_state *state, | ||
| 55 | struct drm_property *property, uint64_t *val); | ||
| 56 | struct drm_connector_state * __must_check | 50 | struct drm_connector_state * __must_check |
| 57 | drm_atomic_get_connector_state(struct drm_atomic_state *state, | 51 | drm_atomic_get_connector_state(struct drm_atomic_state *state, |
| 58 | struct drm_connector *connector); | 52 | struct drm_connector *connector); |
| 59 | int drm_atomic_connector_set_property(struct drm_connector *connector, | 53 | int drm_atomic_connector_set_property(struct drm_connector *connector, |
| 60 | struct drm_connector_state *state, struct drm_property *property, | 54 | struct drm_connector_state *state, struct drm_property *property, |
| 61 | uint64_t val); | 55 | uint64_t val); |
| 62 | int drm_atomic_connector_get_property(struct drm_connector *connector, | ||
| 63 | const struct drm_connector_state *state, | ||
| 64 | struct drm_property *property, uint64_t *val); | ||
| 65 | |||
| 66 | int drm_atomic_get_property(struct drm_mode_object *obj, | ||
| 67 | struct drm_property *property, uint64_t *val); | ||
| 68 | 56 | ||
| 69 | int __must_check | 57 | int __must_check |
| 70 | drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state, | 58 | drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state, |
