aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhi Wang <[email protected]>2017-09-18 21:36:34 +0800
committerChris Wilson <[email protected]>2017-09-18 16:02:51 +0100
commit1298d51c44fddcb609ea6c9fa37b76028593963b (patch)
tree5f8e776f9807075e997704e2b2ab224d69689cb3
parentee427e259567bc9ba817ddfa5abaf7033f5603e9 (diff)
drm/i915: Return the correct score in i915_ppat_get()
The cache attribute of the required entry has to be the same with the existing value. After this requirement is met, the futher comparison should be performed. After this fix, the refined test case can pass. v2: - Refine the tittle and comments. (Rodrigo) Fixes: 4395890a4855 ("drm/i915: Introduce private PAT management") Cc: Chris Wilson <[email protected]> Cc: Ben Widawsky <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: Joonas Lahtinen <[email protected]> Signed-off-by: Zhi Wang <[email protected]> Reviewed-by: Joonas Lahtinen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Chris Wilson <[email protected]>
-rw-r--r--drivers/gpu/drm/i915/i915_gem_gtt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 729ebaf29b71..37cd0860fc29 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2965,7 +2965,7 @@ static unsigned int bdw_private_pat_match(u8 src, u8 dst)
};
/* Cache attribute has to be matched. */
- if (GEN8_PPAT_GET_CA(src) == GEN8_PPAT_GET_CA(dst))
+ if (GEN8_PPAT_GET_CA(src) != GEN8_PPAT_GET_CA(dst))
return 0;
score |= CA_MATCH;