[Freedreno] [PATCH] kgsl: advertise DRI2Info v4 for !NoKMS case

Emil Velikov emil.l.velikov at gmail.com
Fri Aug 4 13:38:03 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

As mentioned in the commit message, Xserver has sufficient fallbacks
when the video driver does not implement ScheduleSwap, ScheduleWaitMSC
and GetMSC.

As such we can "fake it" and advertise v4, instead of the current v3.

Cc: freedreno at lists.freedesktop.org
Cc: Rob Clark <robdclark at gmail.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Rob, hope that you have a a2xx + kgsl + shim setup around and you can
give this a try.
---
 src/msm-dri2.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/msm-dri2.c b/src/msm-dri2.c
index 6f60c4d..e9a681b 100644
--- a/src/msm-dri2.c
+++ b/src/msm-dri2.c
@@ -596,7 +596,16 @@ MSMDRI2ScreenInit(ScreenPtr pScreen)
 
 	if (pMsm->NoKMS) {
 		info.driverName      = "kgsl";
-		info.version         = 3;
+                /* Driver does not have KMS, so strictly speaking we should
+                 * use v3 here.
+                 *
+                 * Although X server is smart enough to use appropriate
+                 * fallbacks, regardless of the version exposed.
+                 *
+                 * Bump to v4, since that allows us to simplify other
+                 * components such as Mesa.
+                 */
+		info.version         = 4;
 	} else {
 		info.driverName      = "msm";
 		info.version         = 6;
-- 
2.13.3



More information about the Freedreno mailing list