Commit 1298d51c authored by Zhi Wang's avatar Zhi Wang Committed by Chris Wilson

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: 4395890a ("drm/i915: Introduce private PAT management")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: default avatarZhi Wang <zhi.a.wang@intel.com>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1505741794-10593-1-git-send-email-zhi.a.wang@intel.comSigned-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent ee427e25
...@@ -2965,7 +2965,7 @@ static unsigned int bdw_private_pat_match(u8 src, u8 dst) ...@@ -2965,7 +2965,7 @@ static unsigned int bdw_private_pat_match(u8 src, u8 dst)
}; };
/* Cache attribute has to be matched. */ /* 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; return 0;
score |= CA_MATCH; score |= CA_MATCH;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment