[PATCH 2/3] compat-drivers: drm: Revert ACPI table size check for < 3.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



acpi_get_table_with_size() was exported with kernels >= 3.6. Revert the
size checking for kernels < 3.6.

Signed-off-by: Ozan Çağlayan <ozancag@xxxxxxxxx>
---
 .../10-radeon-revert-acpi-table-size-check.patch   | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 patches/drm/10-radeon-revert-acpi-table-size-check.patch

diff --git a/patches/drm/10-radeon-revert-acpi-table-size-check.patch b/patches/drm/10-radeon-revert-acpi-table-size-check.patch
new file mode 100644
index 0000000..d595a98
--- /dev/null
+++ b/patches/drm/10-radeon-revert-acpi-table-size-check.patch
@@ -0,0 +1,29 @@
+acpi_get_table_with_size() was exported with kernels >= 3.6. Revert the
+size checking for kernels < 3.6.
+
+Index: compat-drivers/drivers/gpu/drm/radeon/radeon_bios.c
+===================================================================
+--- compat-drivers.orig/drivers/gpu/drm/radeon/radeon_bios.c
++++ compat-drivers/drivers/gpu/drm/radeon/radeon_bios.c
+@@ -554,12 +554,21 @@ static bool radeon_acpi_vfct_bios(struct
+ {
+ 	bool ret = false;
+ 	struct acpi_table_header *hdr;
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+ 	acpi_size tbl_size;
++#else
++	/* acpi_get_table_with_size() not exported on kernels < 3.6 */
++	acpi_size tbl_size = 0x7fffffff;
++#endif
+ 	UEFI_ACPI_VFCT *vfct;
+ 	GOP_VBIOS_CONTENT *vbios;
+ 	VFCT_IMAGE_HEADER *vhdr;
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
+ 	if (!ACPI_SUCCESS(acpi_get_table_with_size("VFCT", 1, &hdr, &tbl_size)))
++#else
++	if (!ACPI_SUCCESS(acpi_get_table("VFCT", 1, &hdr)))
++#endif
+ 		return false;
+ 	if (tbl_size < sizeof(UEFI_ACPI_VFCT)) {
+ 		DRM_ERROR("ACPI VFCT table present but broken (too short #1)\n");
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux