From 2b552ed7d528d24b688b992a5164e062827d0ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com> Date: Sun, 21 Mar 2021 17:53:20 +0200 Subject: [PATCH 2/7] sna: Allow DRI3 on gen2/3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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@chris-wilson.co.uk> References: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9734 Signed-off-by: Ville Syrjälä <ville.syrjala@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 d810b262..b0e16833 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.40.1