[Intel-gfx] [PATCH xf86-video-intel] sna: Allow DRI3 on gen2/3

Ville Syrjala ville.syrjala at linux.intel.com
Sun Mar 21 16:08:44 UTC 2021


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Once we have DRI3 in Mesa i915 driver we can allow DRI3
on gen2/3.

But due to the supposed missing DRI2 fallback with older Mesa
let's only do that if the user explicitly requests it. Note
that when I tried this with modern Mesa that lacks i915 DRI3
support things seemed to fall back to DRI2 just fine, but
better safe than sorry I guess.

Cc: Chris Wilson <chris at chris-wilson.co.uk>
References: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9734
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 src/sna/sna_driver.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index d810b262b452..b0e1683362d3 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -444,7 +444,8 @@ static void setup_dri(struct sna *sna)
 	sna->dri3.override =
 		!sna->dri3.available ||
 		xf86IsOptionSet(sna->Options, OPTION_DRI);
-	if (level >= 3 && sna->kgem.gen >= 040)
+	if (level >= 3 && (sna->kgem.gen >= 040 ||
+			   xf86IsOptionSet(sna->Options, OPTION_DRI)))
 		sna->dri3.enable = sna->dri3.available;
 #endif
 #if HAVE_DRI2
-- 
2.26.2



More information about the Intel-gfx mailing list