[Intel-gfx] [RFC 08/12] drm/i915/config: Use workarounds list from configuration.

Bob Paauwe bob.j.paauwe at intel.com
Thu Feb 12 15:41:34 PST 2015


If there are ACPI table based workarounds for a platform, use those
instead of the built-in driver list when doing the workaround init.

Signed-off-by: Bob Paauwe <bob.j.paauwe at intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 2060610..6aa8908 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1014,16 +1014,19 @@ int init_workarounds_ring(struct intel_engine_cs *ring)
 
 	dev_priv->workarounds.count = 0;
 
-	if (IS_BROADWELL(dev))
-		return bdw_init_workarounds(ring);
+	if (!intel_config_wa_add(dev_priv)) {
+		if (IS_BROADWELL(dev))
+			return bdw_init_workarounds(ring);
 
-	if (IS_CHERRYVIEW(dev))
-		return chv_init_workarounds(ring);
+		if (IS_CHERRYVIEW(dev))
+			return chv_init_workarounds(ring);
+
+		if (IS_SKYLAKE(dev))
+			return skl_init_workarounds(ring);
+		else if (IS_GEN9(dev))
+			return gen9_init_workarounds(ring);
+	}
 
-	if (IS_SKYLAKE(dev))
-		return skl_init_workarounds(ring);
-	else if (IS_GEN9(dev))
-		return gen9_init_workarounds(ring);
 
 	return 0;
 }
-- 
2.1.0



More information about the Intel-gfx mailing list