Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] xf86-video-intel: Add UXA PACKAGECONFIG and 20-intel.conf
@ 2016-03-28 18:07 Saul Wold
  2016-03-28 22:33 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Saul Wold @ 2016-03-28 18:07 UTC (permalink / raw)
  To: openembedded-core, richard.purdie

This patch adds the UXA Packageconfig option to handle older Intel Graphics
the uxa code when enabled needs a patch from upstream due to a change in the
API of the Xserver.

Also added a generic 20-intel.conf with a commented line to enable the uxa
AccelMethod option.

The Packageconfig only needs to be enabled in genericx86-64 since other
MACHINE configs (such as meta-intel) include the VAAPI acceleration that
handle the graphics hardware corretly.

[YOCTO #8312]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 ...-call-to-PixmapSyncDirtyHelper-broken-by-.patch | 30 ++++++++++++++++++++++
 .../xorg-driver/xf86-video-intel/20-intel.conf     |  6 +++++
 .../xorg-driver/xf86-video-intel_2.99.917.bb       | 14 ++++++++++
 3 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
 create mode 100644 meta/recipes-graphics/xorg-driver/xf86-video-intel/20-intel.conf

diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch b/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
new file mode 100644
index 0000000..29924bb
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
@@ -0,0 +1,30 @@
+From 2c5063938cc809f624e56efd4673041fa8141e81 Mon Sep 17 00:00:00 2001
+From: Martin Peres <martin.peres@linux.intel.com>
+Date: Thu, 9 Jul 2015 11:26:38 +0300
+Subject: [PATCH] uxa: fix the call to PixmapSyncDirtyHelper, broken by
+ xserver's 90db5ed
+
+[ickle: switch to HAS_DIRTYTRACKING_ROTATION as suggested by Dave Airlie]
+Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
+
+Upstream-Status: Backport
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ src/compat-api.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/compat-api.h b/src/compat-api.h
+index aa93bee..293e9d7 100644
+--- a/src/compat-api.h
++++ b/src/compat-api.h
+@@ -247,3 +247,7 @@ static inline void FreePixmap(PixmapPtr pixmap)
+ #endif
+ 
+ #endif
++
++#if HAS_DIRTYTRACKING_ROTATION
++#define PixmapSyncDirtyHelper(d, dd) PixmapSyncDirtyHelper(d)
++#endif
+-- 
+2.5.0
+
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel/20-intel.conf b/meta/recipes-graphics/xorg-driver/xf86-video-intel/20-intel.conf
new file mode 100644
index 0000000..0ce1939
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel/20-intel.conf
@@ -0,0 +1,6 @@
+
+Section "Device"
+    Identifier  "Intel Graphics"
+    Driver      "intel"
+#uxa    Option      "AccelMethod"  "uxa"
+EndSection
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb b/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
index a2f1456..8b67d70 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
@@ -13,8 +13,13 @@ SRC_URI += "file://disable-x11-dri3.patch \
             file://always_include_xorg_server.h.patch \
             file://sna-Protect-against-ABI-breakage-in-recent-versions-.patch \
             file://udev-fstat.patch \
+            ${@bb.utils.contains('PACKAGECONFIG', 'uxa', '${UXA_SRC_URI}', '', d)} \
+            file://20-intel.conf \
            "
 
+UXA_SRC_URI = "file://0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch \
+              "
+
 SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
 SRC_URI[sha256sum] = "00b781eea055582820a123c47b62411bdf6aabf4f03dc0568faec55faf9667c9"
 
@@ -38,3 +43,12 @@ EXTRA_OECONF += '${@base_conditional( "ROOTLESS_X", "1", " --enable-kms-only", "
 COMPATIBLE_HOST = '(i.86|x86_64).*-linux'
 
 FILES_${PN} += "${datadir}/polkit-1"
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/X11/xorg.conf.d
+	install -m 0644 ${WORKDIR}/20-intel.conf ${D}${sysconfdir}/X11/xorg.conf.d
+
+	if ${@bb.utils.contains('PACKAGECONFIG', 'uxa', 'true', 'false', d)}; then
+		sed -e "s/#uxa//" -i ${D}${sysconfdir}/X11/xorg.conf.d/20-intel.conf
+        fi
+}
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xf86-video-intel: Add UXA PACKAGECONFIG and 20-intel.conf
  2016-03-28 18:07 [PATCH] xf86-video-intel: Add UXA PACKAGECONFIG and 20-intel.conf Saul Wold
@ 2016-03-28 22:33 ` Richard Purdie
  2016-03-28 23:01   ` Saul Wold
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2016-03-28 22:33 UTC (permalink / raw)
  To: Saul Wold, openembedded-core

On Mon, 2016-03-28 at 11:07 -0700, Saul Wold wrote:
> This patch adds the UXA Packageconfig option to handle older Intel
> Graphics
> the uxa code when enabled needs a patch from upstream due to a change
> in the
> API of the Xserver.
> 
> Also added a generic 20-intel.conf with a commented line to enable
> the uxa
> AccelMethod option.
> 
> The Packageconfig only needs to be enabled in genericx86-64 since
> other
> MACHINE configs (such as meta-intel) include the VAAPI acceleration
> that
> handle the graphics hardware corretly.

This doesn't really look right to me. It makes the driver MACHINE
specific which is generally bad and will fail various tests. You likely
need to detect this at runtime on the relevant hardward and enable
if/as/when needed.

Is there some way that X can correctly autodetect what its running on
and do the right thing without requiring manual config? The fact we're
having to do that seems to fly in the face of the "configurationless"
goals X has had more recently...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] xf86-video-intel: Add UXA PACKAGECONFIG and 20-intel.conf
  2016-03-28 22:33 ` Richard Purdie
@ 2016-03-28 23:01   ` Saul Wold
  0 siblings, 0 replies; 3+ messages in thread
From: Saul Wold @ 2016-03-28 23:01 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: jianxun.zhang@intel.com

On Mon, 2016-03-28 at 23:33 +0100, Richard Purdie wrote:
> On Mon, 2016-03-28 at 11:07 -0700, Saul Wold wrote:
> > 
> > This patch adds the UXA Packageconfig option to handle older Intel
> > Graphics
> > the uxa code when enabled needs a patch from upstream due to a
> > change
> > in the
> > API of the Xserver.
> > 
> > Also added a generic 20-intel.conf with a commented line to enable
> > the uxa
> > AccelMethod option.
> > 
> > The Packageconfig only needs to be enabled in genericx86-64 since
> > other
> > MACHINE configs (such as meta-intel) include the VAAPI acceleration
> > that
> > handle the graphics hardware corretly.
> This doesn't really look right to me. It makes the driver MACHINE
> specific which is generally bad and will fail various tests. You
> likely
> need to detect this at runtime on the relevant hardward and enable
> if/as/when needed.
> 
Yeah, I had a thought that this might cause a MACHINE specific issue,
but wanted to get eyes on the issue.

Your right this could be another example of where the Runtime Machine
Config could help, I will add it to Jianxun's list.

> Is there some way that X can correctly autodetect what its running on
> and do the right thing without requiring manual config? The fact
> we're
> having to do that seems to fly in the face of the "configurationless"
> goals X has had more recently...
> 
Unfortunately X will start correctly with the newer AccelMethod which
this particular hardware does not handle well.

Let's hold off on this patch for now, we understand that basics, better
than we did yesterday and can get it logged in the Bug.

Sau!


> Cheers,
> 
> Richard


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-28 23:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-28 18:07 [PATCH] xf86-video-intel: Add UXA PACKAGECONFIG and 20-intel.conf Saul Wold
2016-03-28 22:33 ` Richard Purdie
2016-03-28 23:01   ` Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox