diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-31 20:55:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-31 20:55:12 -0400 |
commit | 64ccccf8525fee499625b517c0faadf784c79e93 (patch) | |
tree | b6f523aef6a3caf4b1b539d33e035f8ff793f0a0 /include | |
parent | ec8fa30667340bdeb1938a9d4240497227fbe04f (diff) | |
parent | e1b4d3036c07ff137955fb1c0197ab62534f46ec (diff) |
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
"Radeon, nouveau, exynos, intel, mgag200..
Not all strictly regressions but there was probably only one patch I'd
have really left out and it didn't seem worth respinning exynos to
avoid it, the line change count is quite low.
radeon: regressions + more dynamic powermanagement fixes, since DPM
is a new feature, and off by default I'd prefer to keep merging
fixes since it has a large userbase already and I'd like to keep
them on mainline
nouveau: is mostly regression fixes
i915: is a regression fix since Daniel is on holidays I've merged it.
mgag200: I've picked a bunch of targetted fixes from a big bunch of
distro patches,
exynos: build fixes mostly, one regression fix
I expect things will slow right down now, I may send on the intel
early quirk from Jesse separatly, since I think the x86 maintainers
acked it"
* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (37 commits)
drm/i915: fix missed hunk after GT access breakage
drm/radeon/dpm: re-enable cac control on SI
drm/radeon/dpm: fix calculations in si_calculate_leakage_for_v_and_t_formula
drm: fix 64 bit drm fixed point helpers
drm/radeon/atom: initialize more atom interpretor elements to 0
drm/nouveau: fix semaphore dmabuf obj
drm/nouveau/vm: make vm refcount into a kref
drm/nv31/mpeg: don't recognize nv3x cards as having nv44 graph class
drm/nv40/mpeg: write magic value to channel object to make it work
drm/nouveau: fix size check for cards without vm
drm/nv50-/disp: remove dcb_outp_match call, and related variables
drm/nva3-/disp: fix hda eld writing, needs to be padded
drm/nv31/mpeg: fix mpeg engine initialization
drm/nv50/mc: include vp in the fb error reporting mask
drm/nouveau: fix null pointer dereference in poll_changed
drm/nv50/gpio: post-nv92 cards have 32 interrupt lines
drm/nvc0/fb: take lock in nvc0_ram_put()
drm/nouveau/core: xtensa firmware size needs to be 0x40000 no matter what
drm/mgag200: Fix LUT programming for 16bpp
drm/mgag200: Fix framebuffer pitch calculation
...
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_fixed.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/drm/drm_fixed.h b/include/drm/drm_fixed.h index f5e1168c7647..d639049a613d 100644 --- a/include/drm/drm_fixed.h +++ b/include/drm/drm_fixed.h | |||
@@ -84,12 +84,12 @@ static inline int drm_fixp2int(int64_t a) | |||
84 | return ((s64)a) >> DRM_FIXED_POINT; | 84 | return ((s64)a) >> DRM_FIXED_POINT; |
85 | } | 85 | } |
86 | 86 | ||
87 | static inline s64 drm_fixp_msbset(int64_t a) | 87 | static inline unsigned drm_fixp_msbset(int64_t a) |
88 | { | 88 | { |
89 | unsigned shift, sign = (a >> 63) & 1; | 89 | unsigned shift, sign = (a >> 63) & 1; |
90 | 90 | ||
91 | for (shift = 62; shift > 0; --shift) | 91 | for (shift = 62; shift > 0; --shift) |
92 | if ((a >> shift) != sign) | 92 | if (((a >> shift) & 1) != sign) |
93 | return shift; | 93 | return shift; |
94 | 94 | ||
95 | return 0; | 95 | return 0; |
@@ -100,9 +100,9 @@ static inline s64 drm_fixp_mul(s64 a, s64 b) | |||
100 | unsigned shift = drm_fixp_msbset(a) + drm_fixp_msbset(b); | 100 | unsigned shift = drm_fixp_msbset(a) + drm_fixp_msbset(b); |
101 | s64 result; | 101 | s64 result; |
102 | 102 | ||
103 | if (shift > 63) { | 103 | if (shift > 61) { |
104 | shift = shift - 63; | 104 | shift = shift - 61; |
105 | a >>= shift >> 1; | 105 | a >>= (shift >> 1) + (shift & 1); |
106 | b >>= shift >> 1; | 106 | b >>= shift >> 1; |
107 | } else | 107 | } else |
108 | shift = 0; | 108 | shift = 0; |
@@ -120,7 +120,7 @@ static inline s64 drm_fixp_mul(s64 a, s64 b) | |||
120 | 120 | ||
121 | static inline s64 drm_fixp_div(s64 a, s64 b) | 121 | static inline s64 drm_fixp_div(s64 a, s64 b) |
122 | { | 122 | { |
123 | unsigned shift = 63 - drm_fixp_msbset(a); | 123 | unsigned shift = 62 - drm_fixp_msbset(a); |
124 | s64 result; | 124 | s64 result; |
125 | 125 | ||
126 | a <<= shift; | 126 | a <<= shift; |
@@ -154,7 +154,7 @@ static inline s64 drm_fixp_exp(s64 x) | |||
154 | } | 154 | } |
155 | 155 | ||
156 | if (x < 0) | 156 | if (x < 0) |
157 | sum = drm_fixp_div(1, sum); | 157 | sum = drm_fixp_div(DRM_FIXED_ONE, sum); |
158 | 158 | ||
159 | return sum; | 159 | return sum; |
160 | } | 160 | } |