Skip to contentSkip to conversation

xf86-video-intel: Disable SNA without composite

PATCH New Ben Widawsky 3 participants 13 messages Jul 18, 2014 – Feb 7, 2015 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 xf86-video-intel: Disable SNA without composite

SNA requires the composite extension. Fallback to UXA is the user has decided not to add this. Ideally we could fall back to glamor, but that was more work.

Cc Bernd Kuhls <[email protected]>
Cc Chris Wilson <[email protected]>
---
 .../xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk +13 -3
index 332de54..787b8fa 100644
@@ -16,13 +16,23 @@ XDRIVER_XF86_VIDEO_INTEL_CONF_OPT = \
 	--enable-kms-only \
 	--disable-xvmc \
 	--disable-ums-only \
-	--enable-sna \
-	--disable-uxa \
-	--disable-glamor \
 	--disable-xaa \
 	--disable-dga \
 	--disable-async-swap
 
+ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
+	XDRIVER_XF86_VIDEO_INTEL_CONF_OPT += \
+		--enable-sna \
+		--disable-uxa \
+		--disable-glamor
+else
+	XDRIVER_XF86_VIDEO_INTEL_CONF_OPT += \
+		--disable-sna \
+		--enable-uxa \
+		--disable-glamor
+endif
+
+
 XDRIVER_XF86_VIDEO_INTEL_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xproto libdrm xlib_libpciaccess
 
 $(eval $(autotools-package))
Signature · 1 line
2.0.1
#1 lore raw

PATCH 2/2 xf86-video-intel: Bump version to 2.99.912

Warning: I've only built this. Not run it.

Cc Bernd Kuhls <[email protected]>
Cc Chris Wilson <[email protected]>
---
 package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk +1 -1
index 787b8fa..82e6965 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-XDRIVER_XF86_VIDEO_INTEL_VERSION = 2.99.907
+XDRIVER_XF86_VIDEO_INTEL_VERSION = 2.99.912
 XDRIVER_XF86_VIDEO_INTEL_SOURCE = xf86-video-intel-$(XDRIVER_XF86_VIDEO_INTEL_VERSION).tar.bz2
 XDRIVER_XF86_VIDEO_INTEL_SITE = http://xorg.freedesktop.org/releases/individual/driver
 XDRIVER_XF86_VIDEO_INTEL_LICENSE = MIT
Signature · 1 line
2.0.1
#2 lore raw

PATCH 2/2 xf86-video-intel: Bump version to 2.99.912

Ben Widawsky <[email protected]> wrote in news:1405661249-6506-2-git-send-email-ben at bwidawsk.net:

Quoted 5 lines

Warning: I've only built this. Not run it.

Cc Bernd Kuhls <[email protected]>
Cc Chris Wilson <[email protected]>

Hi,

the OpenELEC team reverted this version bump last month, reason unknown:
https://github.com/OpenELEC/OpenELEC.tv/commit/8f4fd1a758da169c95816de4dc5c50
1fa268746c

Therefore I currently stayed away from this release, please see my patch to bump version to its predecessor 2.99.911[1]. I am awaiting the next release of this driver and will test again, so for today: NAK.

Regards, Bernd

[1] http://patchwork.ozlabs.org/patch/370975/

#3 lore raw

PATCH 2/2 xf86-video-intel: Bump version to 2.99.912

Bernd Kuhls <[email protected]> wrote in news:XnsA36EAEF1EB0D1berndkuhlsPkbjNfxxIA at bernd-kuhls.de:

Quoted 3 lines

Therefore I currently stayed away from this release, please see my patch to bump version to its predecessor 2.99.911[1]. I am awaiting the next release of this driver and will test again, so for today: NAK.

Hi,

I just tried 2.99.914 for a short test, the screen stayed black after two reboots, so I reverted back to 2.99.911. Currently I am lacking the time to debug, but I saw no obvious (dmesg, xorg.log) error messages.

Regards, Bernd

#4 lore raw

PATCH 2/2 xf86-video-intel: Bump version to 2.99.912

In reply to Ben Widawsky

Ping by request of patrickdp on IRC.

Note, I have a patch locally which applies to 2.99.912 (Chris' patch only applied cleanly to master).

There are few options at this point:
1. Merge these two patches.
This was tested before sending.
2. I can resend with the bump to 2.99.912 as the first patch, and then Chris' wiggled patch. I have this currently tested, and running.
3. Redo the patch for 2.99.907
This is the most logical, but I haven't done it yet. It also
requires two patches, one for .907, and one for .912 if update
is desired there.
4. Wait until Chris releases 2.99.913 (or 3.0), and just bump to that.

Quoted 25 lines · Ben Widawsky

Warning: I've only built this. Not run it.

Cc Bernd Kuhls <[email protected]>
Cc Chris Wilson <[email protected]>
---
 package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk +1 -1
index 787b8fa..82e6965 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-XDRIVER_XF86_VIDEO_INTEL_VERSION = 2.99.907
+XDRIVER_XF86_VIDEO_INTEL_VERSION = 2.99.912
 XDRIVER_XF86_VIDEO_INTEL_SOURCE = xf86-video-intel-$(XDRIVER_XF86_VIDEO_INTEL_VERSION).tar.bz2
 XDRIVER_XF86_VIDEO_INTEL_SITE = http://xorg.freedesktop.org/releases/individual/driver
 XDRIVER_XF86_VIDEO_INTEL_LICENSE = MIT
Signature · 1 line
2.0.1
#5 lore raw

PATCH 2/2 xf86-video-intel: Bump version to 2.99.912

[posted and mailed]

Ben Widawsky <[email protected]> wrote in
news:20140720191827.GA10208 at bwidawsk.net:

Quoted 1 line

4. Wait until Chris releases 2.99.913 (or 3.0), and just bump to that.

Hi,

after bisecting I found the patch responsible for the black screen:
http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?
id=f66e25def3431a900068cc1c23a6b1e8322ef046

Disabling __intel_open_device__pci solved the problem, I have yet to investigate the reason and maybe open a bugreport at freedesktop.org. After boot the screen stays black when starting Xorg for the first time, the second try works, although all kernel modules were loaded before...

So updating buildroot to 2.99.914 is ok for me now.

Regards, Bernd

A message that is not in the archive (sent off-list or not yet received): [email protected]

#7 lore raw

PATCH 1/1 sna/dri2: Protect compsiteext.h include with build check

Quoted 5 lines · Chris Wilson

We shouldn't include calls to the composite extension if it has not been built.

This patch does not apply cleanly to .912. The wiggled patch does build. With my earlier patch reverted.

If this patch will be in .913, and .913 is coming relatively soon, we can ignore this entirely for buildroot and simply do a version bump to .913 when its available.

Thanks.

#8 lore raw

PATCH 1/1 sna/dri2: Protect compsiteext.h include with build check

Dear Ben Widawsky,

Quoted 7 lines · Ben Widawsky
Quoted 5 lines · Chris Wilson

We shouldn't include calls to the composite extension if it has not been built.

Quoted 6 lines

This patch does not apply cleanly to .912. The wiggled patch does build. With my earlier patch reverted.

If this patch will be in .913, and .913 is coming relatively soon, we can ignore this entirely for buildroot and simply do a version bump to .913 when its available.

I'm sorry, but I don't understand your comment. Your patch was against Buildroot, but you say it doesn't apply against .912, which is a version of the intel driver. Could you explain a bit more if your patches http://patchwork.ozlabs.org/patch/371342/ and
http://patchwork.ozlabs.org/patch/371343/ are still applicable?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#9 lore raw

PATCH 1/1 sna/dri2: Protect compsiteext.h include with build check

Quoted 23 lines · Thomas Petazzoni

Dear Ben Widawsky,

Quoted 7 lines · Ben Widawsky
Quoted 5 lines · Chris Wilson

We shouldn't include calls to the composite extension if it has not been built.

Quoted 6 lines

This patch does not apply cleanly to .912. The wiggled patch does build. With my earlier patch reverted.

If this patch will be in .913, and .913 is coming relatively soon, we can ignore this entirely for buildroot and simply do a version bump to .913 when its available.

I'm sorry, but I don't understand your comment. Your patch was against Buildroot, but you say it doesn't apply against .912, which is a version of the intel driver. Could you explain a bit more if your patches http://patchwork.ozlabs.org/patch/371342/ and
http://patchwork.ozlabs.org/patch/371343/ are still applicable?

Quoted 3 lines

Thanks,

Thomas

Hi. The second patch, .912 bump has been nak'd already by Bernd (I missed this before my ping). Coincidentally, Bernd also fixed the composite extension compilation error in buildroot (differently than I did). Chris Wilson, the Intel DDX maintainer has fixed the issue meanwhile.

I would recommend backporting the xf86-video-intel patch instead of the patch Bernd submitted. Wiggle handled all the conflicts. I am not sure if it will apply to .907 (the current version). The other option is to take Bernd's patch, and revert it when you finally get to the fixed upstream version.

In the most ideal case, we could just bump to the recently released .913 and have everything /just/ work. Chris has fixed 2 bugs that Bernd's series also attempted to fix. Of course that runs the risk of invoking the wrath that caused the original .912 revert.

That all came out more complicated than it should have. I apologize. I am pasting the patch I wiggled as an example. Hopefully that helps make sense.

---

commit 6cf66fc273e6d6348f605e7dcce915e53198e23b

Author: Ben Widawsky <[email protected]>
Date:   Fri Jul 18 16:24:07 2014 -0700

xdriver_xf86-video-intel: Take the upstream composite patch

"
We shouldn't include calls to the composite extension if it has not been built.

"

package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel-0001-sna-dri2-Protect-compsiteext.h-include-with-build-ch.patch new file +50 -0
new file mode 100644
index 0000000..a82c482
@@ -0,0 +1,50 @@
+From f17f0808ab3de6f65a3eedf5548e7b314b7a182f Mon Sep 17 00:00:00 2001
+From: Chris Wilson <[email protected]>
+Date: Fri, 18 Jul 2014 07:40:34 +0100
+Subject: [PATCH] sna/dri2: Protect compsiteext.h include with build check
+
+We shouldn't include calls to the composite extension if it has not been
+built.
+
+Reported-by: Ben Widawsky <[email protected]>
+Signed-off-by: Chris Wilson <[email protected]>
+---
+ src/sna/sna_dri2.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
+index 1baaf2b..1edf98e 100644
+--- a/src/sna/sna_dri2.c
++++ b/src/sna/sna_dri2.c
+@@ -48,8 +48,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
+ #include <xf86drm.h>
+ #include <i915_drm.h>
+ #include <dri2.h>
+-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,12,99,901,0)
++#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,12,99,901,0) && defined(COMPOSITE)
+ #include <compositeext.h>
++#define CHECK_FOR_COMPOSITOR
+ #endif
+ 
+ #if DRI2INFOREC_VERSION < 2
+@@ -2164,7 +2165,7 @@ get_current_msc(struct sna *sna, DrawablePtr draw, xf86CrtcPtr crtc)
+       return draw_current_msc(draw, crtc, ret);
+ }
+ 
+-#if !XORG_CAN_TRIPLE_BUFFER && XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,12,99,901,0)
++#if !XORG_CAN_TRIPLE_BUFFER && defined(CHECK_FOR_COMPOSITOR)
+ static Bool find(pointer value, XID id, pointer cdata)
+ {
+       return TRUE;
+@@ -2187,7 +2188,7 @@ static int use_triple_buffer(struct sna *sna, ClientPtr client, bool async)
+ #if XORG_CAN_TRIPLE_BUFFER
+       DBG(("%s: triple buffer enabled, using FLIP_THROTTLE\n", __FUNCTION__));
+       return FLIP_THROTTLE;
+-#elif XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,12,99,901,0)
++#elif defined(CHECK_FOR_COMPOSITOR)
+       /* Hack: Disable triple buffering for compositors */
+       {
+               struct sna_client *priv = sna_client(client);
+-- 
+2.0.2
+
#10 lore raw

PATCH 1/1 sna/dri2: Protect compsiteext.h include with build check

Ben Widawsky <[email protected]> wrote in
news:20140723223626.GA759 at bwidawsk.net:

Quoted 4 lines

In the most ideal case, we could just bump to the recently released .913 and have everything /just/ work. Chris has fixed 2 bugs that Bernd's series also attempted to fix. Of course that runs the risk of invoking the wrath that caused the original .912 revert.

Hi,

yesterday I tried .914, without success:
http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/90194

Then I reverted back to .911, which works again without problems. Are you able to do run-time tests on your machine with .914?

Regards, Bernd

#11 lore raw

PATCH 1/1 sna/dri2: Protect compsiteext.h include with build check

In reply to Ben Widawsky

Dear Ben Widawsky,

Quoted 12 lines · Ben Widawsky

Hi. The second patch, .912 bump has been nak'd already by Bernd (I missed this before my ping). Coincidentally, Bernd also fixed the composite extension compilation error in buildroot (differently than I did). Chris Wilson, the Intel DDX maintainer has fixed the issue meanwhile.

I would recommend backporting the xf86-video-intel patch instead of the patch Bernd submitted. Wiggle handled all the conflicts. I am not sure if it will apply to .907 (the current version). The other option is to take Bernd's patch, and revert it when you finally get to the fixed upstream version.

Quoted 7 lines

In the most ideal case, we could just bump to the recently released .913 and have everything /just/ work. Chris has fixed 2 bugs that Bernd's series also attempted to fix. Of course that runs the risk of invoking the wrath that caused the original .912 revert.

That all came out more complicated than it should have. I apologize. I am pasting the patch I wiggled as an example. Hopefully that helps make sense.

Have all issues you had been resolved? I still have this old e-mail "marked" as to be handled here, so I'm wondering what is the status of this. Could you check if the latest Buildroot git master works for you?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#12 lore raw

PATCH 1/1 sna/dri2: Protect compsiteext.h include with build check

Quoted 24 lines · Thomas Petazzoni

Dear Ben Widawsky,

Quoted 12 lines · Ben Widawsky

Hi. The second patch, .912 bump has been nak'd already by Bernd (I missed this before my ping). Coincidentally, Bernd also fixed the composite extension compilation error in buildroot (differently than I did). Chris Wilson, the Intel DDX maintainer has fixed the issue meanwhile.

I would recommend backporting the xf86-video-intel patch instead of the patch Bernd submitted. Wiggle handled all the conflicts. I am not sure if it will apply to .907 (the current version). The other option is to take Bernd's patch, and revert it when you finally get to the fixed upstream version.

Quoted 7 lines

In the most ideal case, we could just bump to the recently released .913 and have everything /just/ work. Chris has fixed 2 bugs that Bernd's series also attempted to fix. Of course that runs the risk of invoking the wrath that caused the original .912 revert.

That all came out more complicated than it should have. I apologize. I am pasting the patch I wiggled as an example. Hopefully that helps make sense.

Quoted 7 lines

Have all issues you had been resolved? I still have this old e-mail "marked" as to be handled here, so I'm wondering what is the status of this. Could you check if the latest Buildroot git master works for you?

Thanks!

Thomas

Hi Thomas. I won't be able to check for a few days, but since you are currently at 2.99.917, I am confident this specific issue will go away. I keep putting off updating what I have since it works :P

#13 lore raw

PATCH 1/2 xf86-video-intel: Disable SNA without composite

In reply to Ben Widawsky

Ben Widawsky <[email protected]> wrote in news:1405661249-6506-1-git-send-email-ben at bwidawsk.net:

Quoted 1 line

SNA requires the composite extension.

Hi,

I could compile the sna module of 2.99.914 using

# BR2_PACKAGE_XLIB_LIBXCOMPOSITE is not set

snippet from configure:

xf86-video-intel 2.99.914 will be compiled with:
Xorg Video ABI version: 18.0
Acceleration backends: *sna

2.99.913 included a patch to address this:

* Fix build without Composite extension.

Regards, Bernd