Rev 4075 | Rev 4560 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4075 | Rev 4104 | ||
---|---|---|---|
Line 592... | Line 592... | ||
592 | interlaced ? "i" : ""); |
592 | interlaced ? "i" : ""); |
593 | } |
593 | } |
594 | EXPORT_SYMBOL(drm_mode_set_name); |
594 | EXPORT_SYMBOL(drm_mode_set_name); |
Line 595... | Line 595... | ||
595 | 595 | ||
596 | /** |
- | |
597 | * drm_mode_list_concat - move modes from one list to another |
- | |
598 | * @head: source list |
- | |
599 | * @new: dst list |
- | |
600 | * |
- | |
601 | * LOCKING: |
- | |
602 | * Caller must ensure both lists are locked. |
- | |
603 | * |
- | |
604 | * Move all the modes from @head to @new. |
- | |
605 | */ |
- | |
606 | void drm_mode_list_concat(struct list_head *head, struct list_head *new) |
- | |
607 | { |
- | |
608 | - | ||
609 | struct list_head *entry, *tmp; |
- | |
610 | - | ||
611 | list_for_each_safe(entry, tmp, head) { |
- | |
612 | list_move_tail(entry, new); |
- | |
613 | } |
- | |
614 | } |
- | |
615 | EXPORT_SYMBOL(drm_mode_list_concat); |
- | |
616 | - | ||
617 | /** |
596 | /** |
618 | * drm_mode_width - get the width of a mode |
597 | * drm_mode_width - get the width of a mode |
619 | * @mode: mode |
598 | * @mode: mode |
620 | * |
599 | * |
621 | * LOCKING: |
600 | * LOCKING: |
Line 919... | Line 898... | ||
919 | } |
898 | } |
920 | } |
899 | } |
921 | EXPORT_SYMBOL(drm_mode_validate_size); |
900 | EXPORT_SYMBOL(drm_mode_validate_size); |
Line 922... | Line 901... | ||
922 | 901 | ||
923 | /** |
- | |
924 | * drm_mode_validate_clocks - validate modes against clock limits |
- | |
925 | * @dev: DRM device |
- | |
926 | * @mode_list: list of modes to check |
- | |
927 | * @min: minimum clock rate array |
- | |
928 | * @max: maximum clock rate array |
- | |
929 | * @n_ranges: number of clock ranges (size of arrays) |
- | |
930 | * |
- | |
931 | * LOCKING: |
- | |
932 | * Caller must hold a lock protecting @mode_list. |
- | |
933 | * |
- | |
934 | * Some code may need to check a mode list against the clock limits of the |
- | |
935 | * device in question. This function walks the mode list, testing to make |
- | |
936 | * sure each mode falls within a given range (defined by @min and @max |
- | |
937 | * arrays) and sets @mode->status as needed. |
- | |
938 | */ |
- | |
939 | void drm_mode_validate_clocks(struct drm_device *dev, |
- | |
940 | struct list_head *mode_list, |
- | |
941 | int *min, int *max, int n_ranges) |
- | |
942 | { |
- | |
943 | struct drm_display_mode *mode; |
- | |
944 | int i; |
- | |
945 | - | ||
946 | list_for_each_entry(mode, mode_list, head) { |
- | |
947 | bool good = false; |
- | |
948 | for (i = 0; i < n_ranges; i++) { |
- | |
949 | if (mode->clock >= min[i] && mode->clock <= max[i]) { |
- | |
950 | good = true; |
- | |
951 | break; |
- | |
952 | } |
- | |
953 | } |
- | |
954 | if (!good) |
- | |
955 | mode->status = MODE_CLOCK_RANGE; |
- | |
956 | } |
- | |
957 | } |
- | |
958 | EXPORT_SYMBOL(drm_mode_validate_clocks); |
- | |
959 | - | ||
960 | /** |
902 | /** |
961 | * drm_mode_prune_invalid - remove invalid modes from mode list |
903 | * drm_mode_prune_invalid - remove invalid modes from mode list |
962 | * @dev: DRM device |
904 | * @dev: DRM device |
963 | * @mode_list: list of modes to check |
905 | * @mode_list: list of modes to check |
964 | * @verbose: be verbose about it |
906 | * @verbose: be verbose about it |