summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Chauvet <kwizart@gmail.com>2014-04-29 11:05:22 +0200
committerNicolas Chauvet <kwizart@gmail.com>2014-05-13 23:52:10 +0200
commit2a26d38161e13657cb46956b93ece05fcb7c187b (patch)
treecc852f0f3fee0908e5a578eb9067b5cb459299c1
parent4bf5ce33af2a0b6429a3de4d39a75b5f9785f872 (diff)
downloadkernel-2a26d38161e13657cb46956b93ece05fcb7c187b.tar.gz
kernel-2a26d38161e13657cb46956b93ece05fcb7c187b.tar.xz
kernel-2a26d38161e13657cb46956b93ece05fcb7c187b.zip
drm/tegra - Backport Remove gratuitous pad field
This is the backport for cbfbbabb89b37f6bad05f478d906a385149f288d
-rw-r--r--arm-tegra-drm-remove_pad_field.patch37
-rw-r--r--kernel.spec2
2 files changed, 39 insertions, 0 deletions
diff --git a/arm-tegra-drm-remove_pad_field.patch b/arm-tegra-drm-remove_pad_field.patch
new file mode 100644
index 00000000..6c91a099
--- /dev/null
+++ b/arm-tegra-drm-remove_pad_field.patch
@@ -0,0 +1,37 @@
+commit cbfbbabb89b37f6bad05f478d906a385149f288d
+Author: Thierry Reding <treding@nvidia.com>
+Date: Wed Apr 9 14:26:59 2014 +0200
+
+ drm/tegra: Remove gratuitous pad field
+
+ The version of the drm_tegra_submit structure that was merged all the
+ way back in 3.10 contains a pad field that was originally intended to
+ properly pad the following __u64 field. Unfortunately it seems like a
+ different field was dropped during review that caused this padding to
+ become unnecessary, but the pad field wasn't removed at that time.
+
+ One possible side-effect of this is that since the __u64 following the
+ pad is now no longer properly aligned, the compiler may (or may not)
+ introduce padding itself, which results in no predictable ABI.
+
+ Rectify this by removing the pad field so that all fields are again
+ naturally aligned. Technically this is breaking existing userspace ABI,
+ but given that there aren't any (released) userspace drivers that make
+ use of this yet, the fallout should be minimal.
+
+ Fixes: d43f81cbaf43 ("drm/tegra: Add gr2d device")
+ Cc: <stable@vger.kernel.org> # 3.10
+ Signed-off-by: Thierry Reding <treding@nvidia.com>
+
+diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h
+index b042b48..b754821 100644
+--- a/include/uapi/drm/tegra_drm.h
++++ b/include/uapi/drm/tegra_drm.h
+@@ -120,7 +120,6 @@ struct drm_tegra_submit {
+ __u32 num_waitchks;
+ __u32 waitchk_mask;
+ __u32 timeout;
+- __u32 pad;
+ __u64 syncpts;
+ __u64 cmdbufs;
+ __u64 relocs;
diff --git a/kernel.spec b/kernel.spec
index 1f65dafd..184b6534 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -693,6 +693,7 @@ Patch21020: arm-tegra-usb-no-reset-linux33.patch
# Add panel support for tegra paz00
# Backported from linux-next scheduled for 3.15
Patch21021: arm-tegra-paz00-panel-dts.patch
+Patch21022: arm-tegra-drm-remove_pad_field.patch
# ARM i.MX6
# http://www.spinics.net/lists/devicetree/msg08276.html
@@ -1331,6 +1332,7 @@ ApplyPatch arm-sound-soc-samsung-dma-avoid-another-64bit-division.patch
ApplyPatch arm-omap-load-tfp410.patch
ApplyPatch arm-tegra-usb-no-reset-linux33.patch
ApplyPatch arm-tegra-paz00-panel-dts.patch
+ApplyPatch arm-tegra-drm-remove_pad_field.patch
ApplyPatch arm-imx6-utilite.patch