mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-03 16:07:51 +00:00
xf86-video-nvidia: fix 5.6-rc3 build + 440.64
https://gitlab.com/snippets/1945940
This commit is contained in:
parent
43c75c4ec6
commit
abc9b8141b
@ -1,19 +1,3 @@
|
||||
diff --git a/kernel/common/inc/nv-linux.h b/kernel/common/inc/nv-linux.h
|
||||
index e235842..805e525 100644
|
||||
--- a/kernel/common/inc/nv-linux.h
|
||||
+++ b/kernel/common/inc/nv-linux.h
|
||||
@@ -531,7 +531,11 @@ static inline void *nv_ioremap(NvU64 phys, NvU64 size)
|
||||
|
||||
static inline void *nv_ioremap_nocache(NvU64 phys, NvU64 size)
|
||||
{
|
||||
+#if defined(NV_IOREMAP_NOCACHE_PRESENT)
|
||||
void *ptr = ioremap_nocache(phys, size);
|
||||
+#else
|
||||
+ void *ptr = ioremap(phys, size);
|
||||
+#endif
|
||||
if (ptr)
|
||||
NV_MEMDBG_ADD(ptr, size);
|
||||
return ptr;
|
||||
diff --git a/kernel/common/inc/nv-procfs.h b/kernel/common/inc/nv-procfs.h
|
||||
index 8b53f86..4c5aceb 100644
|
||||
--- a/kernel/common/inc/nv-procfs.h
|
||||
@ -126,33 +110,10 @@ index 968b873..f03c7b0 100644
|
||||
.tv_usec = now.tv_nsec/1000,
|
||||
};
|
||||
diff --git a/kernel/conftest.sh b/kernel/conftest.sh
|
||||
index 57d85a4..b491aa3 100755
|
||||
index 57d85a4..4eb703f 100755
|
||||
--- a/kernel/conftest.sh
|
||||
+++ b/kernel/conftest.sh
|
||||
@@ -780,6 +780,22 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_IOREMAP_CACHE_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
+ ioremap_nocache)
|
||||
+ #
|
||||
+ # Determine if the ioremap_nocache() function is present.
|
||||
+ #
|
||||
+ # Removed by commit 4bdc0d676a64 ("remove ioremap_nocache and
|
||||
+ # devm_ioremap_nocache") in v5.6 (2020-01-06)
|
||||
+ #
|
||||
+ CODE="
|
||||
+ #include <asm/io.h>
|
||||
+ void conftest_ioremap_nocache(void) {
|
||||
+ ioremap_nocache();
|
||||
+ }"
|
||||
+
|
||||
+ compile_check_conftest "$CODE" "NV_IOREMAP_NOCACHE_PRESENT" "" "functions"
|
||||
+ ;;
|
||||
+
|
||||
ioremap_wc)
|
||||
#
|
||||
# Determine if the ioremap_wc() function is present.
|
||||
@@ -806,6 +822,46 @@ compile_test() {
|
||||
@@ -806,6 +806,46 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_FILE_OPERATIONS_HAS_IOCTL" "" "types"
|
||||
;;
|
||||
|
||||
@ -213,10 +174,10 @@ index 0ca2c7d..8902143 100644
|
||||
nv_gettimeofday(&tv);
|
||||
|
||||
diff --git a/kernel/nvidia-uvm/uvm_linux.h b/kernel/nvidia-uvm/uvm_linux.h
|
||||
index 661ec55..0d24282 100644
|
||||
index 30a9dea..1a20eff 100644
|
||||
--- a/kernel/nvidia-uvm/uvm_linux.h
|
||||
+++ b/kernel/nvidia-uvm/uvm_linux.h
|
||||
@@ -295,7 +295,16 @@ static inline uint64_t NV_DIV64(uint64_t dividend, uint64_t divisor, uint64_t *r
|
||||
@@ -301,7 +301,16 @@ static inline uint64_t NV_DIV64(uint64_t dividend, uint64_t divisor, uint64_t *r
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -234,7 +195,7 @@ index 661ec55..0d24282 100644
|
||||
/* Return a nanosecond-precise value */
|
||||
static inline NvU64 NV_GETTIME(void)
|
||||
{
|
||||
@@ -311,7 +320,7 @@ static inline NvU64 NV_GETTIME(void)
|
||||
@@ -317,7 +326,7 @@ static inline NvU64 NV_GETTIME(void)
|
||||
* available non-GPL symbols. */
|
||||
static inline NvU64 NV_GETTIME(void)
|
||||
{
|
||||
@ -418,18 +379,10 @@ index 064d727..a7308d3 100644
|
||||
static int
|
||||
nv_procfs_read_text_file(
|
||||
diff --git a/kernel/nvidia/nvidia.Kbuild b/kernel/nvidia/nvidia.Kbuild
|
||||
index 5ec3e65..56f9b3e 100644
|
||||
index 5ec3e65..339a757 100644
|
||||
--- a/kernel/nvidia/nvidia.Kbuild
|
||||
+++ b/kernel/nvidia/nvidia.Kbuild
|
||||
@@ -104,6 +104,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += set_memory_array_uc
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += acquire_console_sem
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += console_lock
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ioremap_cache
|
||||
+NV_CONFTEST_FUNCTION_COMPILE_TESTS += ioremap_nocache
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += ioremap_wc
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += acpi_walk_namespace
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += sg_alloc_table
|
||||
@@ -150,6 +151,9 @@ NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_swiotlb_dma_ops
|
||||
@@ -150,6 +150,9 @@ NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_swiotlb_dma_ops
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += acpi_op_remove
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += outer_flush_all
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += file_operations
|
||||
|
Loading…
x
Reference in New Issue
Block a user