diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/drm/radeon_drm.h | 6 | ||||
| -rw-r--r-- | include/linux/bitmap.h | 18 | ||||
| -rw-r--r-- | include/linux/cpumask.h | 20 |
3 files changed, 23 insertions, 21 deletions
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index af4b4826997e..2ba61e18fc8b 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
| @@ -508,6 +508,7 @@ typedef struct { | |||
| 508 | #define DRM_RADEON_INFO 0x27 | 508 | #define DRM_RADEON_INFO 0x27 |
| 509 | #define DRM_RADEON_GEM_SET_TILING 0x28 | 509 | #define DRM_RADEON_GEM_SET_TILING 0x28 |
| 510 | #define DRM_RADEON_GEM_GET_TILING 0x29 | 510 | #define DRM_RADEON_GEM_GET_TILING 0x29 |
| 511 | #define DRM_RADEON_GEM_BUSY 0x2a | ||
| 511 | 512 | ||
| 512 | #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) | 513 | #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) |
| 513 | #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) | 514 | #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) |
| @@ -548,6 +549,7 @@ typedef struct { | |||
| 548 | #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) | 549 | #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) |
| 549 | #define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) | 550 | #define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) |
| 550 | #define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) | 551 | #define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) |
| 552 | #define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) | ||
| 551 | 553 | ||
| 552 | typedef struct drm_radeon_init { | 554 | typedef struct drm_radeon_init { |
| 553 | enum { | 555 | enum { |
| @@ -707,6 +709,7 @@ typedef struct drm_radeon_indirect { | |||
| 707 | #define RADEON_PARAM_FB_LOCATION 14 /* FB location */ | 709 | #define RADEON_PARAM_FB_LOCATION 14 /* FB location */ |
| 708 | #define RADEON_PARAM_NUM_GB_PIPES 15 /* num GB pipes */ | 710 | #define RADEON_PARAM_NUM_GB_PIPES 15 /* num GB pipes */ |
| 709 | #define RADEON_PARAM_DEVICE_ID 16 | 711 | #define RADEON_PARAM_DEVICE_ID 16 |
| 712 | #define RADEON_PARAM_NUM_Z_PIPES 17 /* num Z pipes */ | ||
| 710 | 713 | ||
| 711 | typedef struct drm_radeon_getparam { | 714 | typedef struct drm_radeon_getparam { |
| 712 | int param; | 715 | int param; |
| @@ -838,7 +841,7 @@ struct drm_radeon_gem_wait_idle { | |||
| 838 | 841 | ||
| 839 | struct drm_radeon_gem_busy { | 842 | struct drm_radeon_gem_busy { |
| 840 | uint32_t handle; | 843 | uint32_t handle; |
| 841 | uint32_t busy; | 844 | uint32_t domain; |
| 842 | }; | 845 | }; |
| 843 | 846 | ||
| 844 | struct drm_radeon_gem_pread { | 847 | struct drm_radeon_gem_pread { |
| @@ -895,6 +898,7 @@ struct drm_radeon_cs { | |||
| 895 | 898 | ||
| 896 | #define RADEON_INFO_DEVICE_ID 0x00 | 899 | #define RADEON_INFO_DEVICE_ID 0x00 |
| 897 | #define RADEON_INFO_NUM_GB_PIPES 0x01 | 900 | #define RADEON_INFO_NUM_GB_PIPES 0x01 |
| 901 | #define RADEON_INFO_NUM_Z_PIPES 0x02 | ||
| 898 | 902 | ||
| 899 | struct drm_radeon_info { | 903 | struct drm_radeon_info { |
| 900 | uint32_t request; | 904 | uint32_t request; |
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index 2878811c6134..756d78b8c1c5 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
| @@ -94,13 +94,13 @@ extern void __bitmap_shift_right(unsigned long *dst, | |||
| 94 | const unsigned long *src, int shift, int bits); | 94 | const unsigned long *src, int shift, int bits); |
| 95 | extern void __bitmap_shift_left(unsigned long *dst, | 95 | extern void __bitmap_shift_left(unsigned long *dst, |
| 96 | const unsigned long *src, int shift, int bits); | 96 | const unsigned long *src, int shift, int bits); |
| 97 | extern void __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, | 97 | extern int __bitmap_and(unsigned long *dst, const unsigned long *bitmap1, |
| 98 | const unsigned long *bitmap2, int bits); | 98 | const unsigned long *bitmap2, int bits); |
| 99 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, | 99 | extern void __bitmap_or(unsigned long *dst, const unsigned long *bitmap1, |
| 100 | const unsigned long *bitmap2, int bits); | 100 | const unsigned long *bitmap2, int bits); |
| 101 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, | 101 | extern void __bitmap_xor(unsigned long *dst, const unsigned long *bitmap1, |
| 102 | const unsigned long *bitmap2, int bits); | 102 | const unsigned long *bitmap2, int bits); |
| 103 | extern void __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, | 103 | extern int __bitmap_andnot(unsigned long *dst, const unsigned long *bitmap1, |
| 104 | const unsigned long *bitmap2, int bits); | 104 | const unsigned long *bitmap2, int bits); |
| 105 | extern int __bitmap_intersects(const unsigned long *bitmap1, | 105 | extern int __bitmap_intersects(const unsigned long *bitmap1, |
| 106 | const unsigned long *bitmap2, int bits); | 106 | const unsigned long *bitmap2, int bits); |
| @@ -171,13 +171,12 @@ static inline void bitmap_copy(unsigned long *dst, const unsigned long *src, | |||
| 171 | } | 171 | } |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | static inline void bitmap_and(unsigned long *dst, const unsigned long *src1, | 174 | static inline int bitmap_and(unsigned long *dst, const unsigned long *src1, |
| 175 | const unsigned long *src2, int nbits) | 175 | const unsigned long *src2, int nbits) |
| 176 | { | 176 | { |
| 177 | if (small_const_nbits(nbits)) | 177 | if (small_const_nbits(nbits)) |
| 178 | *dst = *src1 & *src2; | 178 | return (*dst = *src1 & *src2) != 0; |
| 179 | else | 179 | return __bitmap_and(dst, src1, src2, nbits); |
| 180 | __bitmap_and(dst, src1, src2, nbits); | ||
| 181 | } | 180 | } |
| 182 | 181 | ||
| 183 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, | 182 | static inline void bitmap_or(unsigned long *dst, const unsigned long *src1, |
| @@ -198,13 +197,12 @@ static inline void bitmap_xor(unsigned long *dst, const unsigned long *src1, | |||
| 198 | __bitmap_xor(dst, src1, src2, nbits); | 197 | __bitmap_xor(dst, src1, src2, nbits); |
| 199 | } | 198 | } |
| 200 | 199 | ||
| 201 | static inline void bitmap_andnot(unsigned long *dst, const unsigned long *src1, | 200 | static inline int bitmap_andnot(unsigned long *dst, const unsigned long *src1, |
| 202 | const unsigned long *src2, int nbits) | 201 | const unsigned long *src2, int nbits) |
| 203 | { | 202 | { |
| 204 | if (small_const_nbits(nbits)) | 203 | if (small_const_nbits(nbits)) |
| 205 | *dst = *src1 & ~(*src2); | 204 | return (*dst = *src1 & ~(*src2)) != 0; |
| 206 | else | 205 | return __bitmap_andnot(dst, src1, src2, nbits); |
| 207 | __bitmap_andnot(dst, src1, src2, nbits); | ||
| 208 | } | 206 | } |
| 209 | 207 | ||
| 210 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, | 208 | static inline void bitmap_complement(unsigned long *dst, const unsigned long *src, |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index c5ac87ca7bc6..796df12091b7 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
| @@ -43,10 +43,10 @@ | |||
| 43 | * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask | 43 | * int cpu_isset(cpu, mask) true iff bit 'cpu' set in mask |
| 44 | * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask | 44 | * int cpu_test_and_set(cpu, mask) test and set bit 'cpu' in mask |
| 45 | * | 45 | * |
| 46 | * void cpus_and(dst, src1, src2) dst = src1 & src2 [intersection] | 46 | * int cpus_and(dst, src1, src2) dst = src1 & src2 [intersection] |
| 47 | * void cpus_or(dst, src1, src2) dst = src1 | src2 [union] | 47 | * void cpus_or(dst, src1, src2) dst = src1 | src2 [union] |
| 48 | * void cpus_xor(dst, src1, src2) dst = src1 ^ src2 | 48 | * void cpus_xor(dst, src1, src2) dst = src1 ^ src2 |
| 49 | * void cpus_andnot(dst, src1, src2) dst = src1 & ~src2 | 49 | * int cpus_andnot(dst, src1, src2) dst = src1 & ~src2 |
| 50 | * void cpus_complement(dst, src) dst = ~src | 50 | * void cpus_complement(dst, src) dst = ~src |
| 51 | * | 51 | * |
| 52 | * int cpus_equal(mask1, mask2) Does mask1 == mask2? | 52 | * int cpus_equal(mask1, mask2) Does mask1 == mask2? |
| @@ -179,10 +179,10 @@ static inline int __cpu_test_and_set(int cpu, cpumask_t *addr) | |||
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) | 181 | #define cpus_and(dst, src1, src2) __cpus_and(&(dst), &(src1), &(src2), NR_CPUS) |
| 182 | static inline void __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, | 182 | static inline int __cpus_and(cpumask_t *dstp, const cpumask_t *src1p, |
| 183 | const cpumask_t *src2p, int nbits) | 183 | const cpumask_t *src2p, int nbits) |
| 184 | { | 184 | { |
| 185 | bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); | 185 | return bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) | 188 | #define cpus_or(dst, src1, src2) __cpus_or(&(dst), &(src1), &(src2), NR_CPUS) |
| @@ -201,10 +201,10 @@ static inline void __cpus_xor(cpumask_t *dstp, const cpumask_t *src1p, | |||
| 201 | 201 | ||
| 202 | #define cpus_andnot(dst, src1, src2) \ | 202 | #define cpus_andnot(dst, src1, src2) \ |
| 203 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) | 203 | __cpus_andnot(&(dst), &(src1), &(src2), NR_CPUS) |
| 204 | static inline void __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, | 204 | static inline int __cpus_andnot(cpumask_t *dstp, const cpumask_t *src1p, |
| 205 | const cpumask_t *src2p, int nbits) | 205 | const cpumask_t *src2p, int nbits) |
| 206 | { | 206 | { |
| 207 | bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); | 207 | return bitmap_andnot(dstp->bits, src1p->bits, src2p->bits, nbits); |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | #define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS) | 210 | #define cpus_complement(dst, src) __cpus_complement(&(dst), &(src), NR_CPUS) |
| @@ -738,11 +738,11 @@ static inline void cpumask_clear(struct cpumask *dstp) | |||
| 738 | * @src1p: the first input | 738 | * @src1p: the first input |
| 739 | * @src2p: the second input | 739 | * @src2p: the second input |
| 740 | */ | 740 | */ |
| 741 | static inline void cpumask_and(struct cpumask *dstp, | 741 | static inline int cpumask_and(struct cpumask *dstp, |
| 742 | const struct cpumask *src1p, | 742 | const struct cpumask *src1p, |
| 743 | const struct cpumask *src2p) | 743 | const struct cpumask *src2p) |
| 744 | { | 744 | { |
| 745 | bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), | 745 | return bitmap_and(cpumask_bits(dstp), cpumask_bits(src1p), |
| 746 | cpumask_bits(src2p), nr_cpumask_bits); | 746 | cpumask_bits(src2p), nr_cpumask_bits); |
| 747 | } | 747 | } |
| 748 | 748 | ||
| @@ -779,11 +779,11 @@ static inline void cpumask_xor(struct cpumask *dstp, | |||
| 779 | * @src1p: the first input | 779 | * @src1p: the first input |
| 780 | * @src2p: the second input | 780 | * @src2p: the second input |
| 781 | */ | 781 | */ |
| 782 | static inline void cpumask_andnot(struct cpumask *dstp, | 782 | static inline int cpumask_andnot(struct cpumask *dstp, |
| 783 | const struct cpumask *src1p, | 783 | const struct cpumask *src1p, |
| 784 | const struct cpumask *src2p) | 784 | const struct cpumask *src2p) |
| 785 | { | 785 | { |
| 786 | bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), | 786 | return bitmap_andnot(cpumask_bits(dstp), cpumask_bits(src1p), |
| 787 | cpumask_bits(src2p), nr_cpumask_bits); | 787 | cpumask_bits(src2p), nr_cpumask_bits); |
| 788 | } | 788 | } |
| 789 | 789 | ||
