projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d93c037
)
drm/i915: Allow fuzzy matching in intel_compare_link_m_n
author
Maarten Lankhorst
<
[email protected]
>
Wed, 6 Jan 2016 12:54:43 +0000
(13:54 +0100)
committer
Maarten Lankhorst
<
[email protected]
>
Wed, 6 Jan 2016 13:20:30 +0000
(14:20 +0100)
This prevents a unnecessary modeset on a dell XPS 13 (2016).
N is always a power of 2, which means that for fuzzy matching we should
compare for inequality on the n values, then do fuzzy matching on the m
values.
Signed-off-by: Maarten Lankhorst <
[email protected]
>
Tested-by: Kenneth Graunke <
[email protected]
>
Reviewed-by: Daniel Vetter <
[email protected]
>
Link:
http://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/i915/intel_display.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/intel_display.c
b/drivers/gpu/drm/i915/intel_display.c
index 043adfa65203a54ab39cd76140709526431de96f..ab0b406ee8caa88af3e08bb92db28d2d09eb0c1b 100644
(file)
--- a/
drivers/gpu/drm/i915/intel_display.c
+++ b/
drivers/gpu/drm/i915/intel_display.c
@@
-12577,19
+12577,22
@@
intel_compare_m_n(unsigned int m, unsigned int n,
BUILD_BUG_ON(DATA_LINK_M_N_MASK > INT_MAX);
- if (
m > m
2) {
- while (
m > m
2) {
+ if (
n > n
2) {
+ while (
n > n
2) {
m2 <<= 1;
n2 <<= 1;
}
- } else if (
m < m
2) {
- while (
m < m
2) {
+ } else if (
n < n
2) {
+ while (
n < n
2) {
m <<= 1;
n <<= 1;
}
}
- return m == m2 && n == n2;
+ if (n != n2)
+ return false;
+
+ return intel_fuzzy_clock_check(m, m2);
}
static bool