[qmmp-plugins-freeworld] version bump to 2.2.5
by Karel Volný
commit 07fe0938ffa39f0a080cf8b4ab08186a914751bd
Author: Karel Volný <kvolny(a)redhat.com>
Date: Mon Apr 28 14:04:35 2025 +0200
version bump to 2.2.5
.gitignore | 1 +
qmmp-plugins-freeworld.spec | 5 ++++-
sources | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index be65c7f..1151ab4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -37,3 +37,4 @@ qmmp-0.9.6.tar.bz2
/qmmp-2.2.2.tar.bz2
/qmmp-2.2.3.tar.bz2
/qmmp-2.2.4.tar.bz2
+/qmmp-2.2.5.tar.bz2
diff --git a/qmmp-plugins-freeworld.spec b/qmmp-plugins-freeworld.spec
index 1288f96..baf5305 100644
--- a/qmmp-plugins-freeworld.spec
+++ b/qmmp-plugins-freeworld.spec
@@ -1,5 +1,5 @@
Name: qmmp-plugins-freeworld
-Version: 2.2.4
+Version: 2.2.5
Release: 1%{?dist}
Summary: Plugins for qmmp (Qt-based multimedia player)
@@ -136,6 +136,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}-aac-enqueue.
%changelog
+* Mon Apr 28 2025 Karel Volný <kvolny(a)redhat.com> 2.2.5-1
+- version bump to 2.2.5
+
* Mon Apr 14 2025 Karel Volný <kvolny(a)redhat.com> 2.2.4-1
- version bump to 2.2.4
diff --git a/sources b/sources
index 25d2f4c..123a75b 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (qmmp-2.2.4.tar.bz2) = 4c8908497f34d3d116afebc07879dd27f9bd36ad786be8f31237b810db723aa4aa8d604e0849b17757c6d267c44976aa0495b4b35b2d2c8fe599f9f72e8a9859
+SHA512 (qmmp-2.2.5.tar.bz2) = e293ff94195ea04275cbc405898f072b06af9d820792547f04134127ba5af0fbe7a566228fc6d568e879d43bb3dfac1c1d1fff23bdbc0ca6969800740466349f
8 hours, 10 minutes
[nvidia-open-kmod] Patch for kernel-6.15rc
by Leigh Scott
commit 74904f590e4a630c212affb9bd4d30979d7d2f6e
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sun Apr 27 12:45:47 2025 +0100
Patch for kernel-6.15rc
kernel-open-6.15_buildfix.patch | 479 ++++++++++++++++++++++++++++++++++++++++
nvidia-kernel-ccflags-y.patch | 117 ----------
nvidia-open-kmod.spec | 7 +-
3 files changed, 484 insertions(+), 119 deletions(-)
---
diff --git a/kernel-open-6.15_buildfix.patch b/kernel-open-6.15_buildfix.patch
new file mode 100644
index 0000000..2cfd4bf
--- /dev/null
+++ b/kernel-open-6.15_buildfix.patch
@@ -0,0 +1,479 @@
+diff -uNrp a/kernel-open/Kbuild b/kernel-open/Kbuild
+--- a/kernel-open/Kbuild 2025-04-10 16:55:42.000000000 +0100
++++ b/kernel-open/Kbuild 2025-04-27 10:43:28.345532688 +0100
+@@ -75,21 +75,15 @@ $(foreach _module, $(NV_KERNEL_MODULES),
+ $(eval include $(src)/$(_module)/$(_module).Kbuild))
+
+
+-#
+-# Define CFLAGS that apply to all the NVIDIA kernel modules. EXTRA_CFLAGS
+-# is deprecated since 2.6.24 in favor of ccflags-y, but we need to support
+-# older kernels which do not have ccflags-y. Newer kernels append
+-# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
+-#
+-
+-EXTRA_CFLAGS += -I$(src)/common/inc
+-EXTRA_CFLAGS += -I$(src)
+-EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
+-EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
+-EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\"
++ccflags-y += -std=gnu17
++ccflags-y += -I$(src)/common/inc
++ccflags-y += -I$(src)
++ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
++ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
++ccflags-y += -DNV_VERSION_STRING=\"575.51.02\"
+
+ ifneq ($(SYSSRCHOST1X),)
+- EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
++ ccflags-y += -I$(SYSSRCHOST1X)
+ endif
+
+ # Some Android kernels prohibit driver use of filesystem functions like
+@@ -99,57 +93,57 @@ endif
+ PLATFORM_IS_ANDROID ?= 0
+
+ ifeq ($(PLATFORM_IS_ANDROID),1)
+- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
++ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
+ else
+- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
++ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
+ endif
+
+-EXTRA_CFLAGS += -Wno-unused-function
++ccflags-y += -Wno-unused-function
+
+ ifneq ($(NV_BUILD_TYPE),debug)
+- EXTRA_CFLAGS += -Wuninitialized
++ ccflags-y += -Wuninitialized
+ endif
+
+-EXTRA_CFLAGS += -fno-strict-aliasing
++ccflags-y += -fno-strict-aliasing
+
+ ifeq ($(ARCH),arm64)
+- EXTRA_CFLAGS += -mstrict-align
++ ccflags-y += -mstrict-align
+ endif
+
+ ifeq ($(NV_BUILD_TYPE),debug)
+- EXTRA_CFLAGS += -g
++ ccflags-y += -g
+ endif
+
+-EXTRA_CFLAGS += -ffreestanding
++ccflags-y += -ffreestanding
+
+ ifeq ($(ARCH),arm64)
+- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a
+- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,)
++ ccflags-y += -mgeneral-regs-only -march=armv8-a
++ ccflags-y += $(call cc-option,-mno-outline-atomics,)
+ endif
+
+ ifeq ($(ARCH),x86_64)
+- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel
++ ccflags-y += -mno-red-zone -mcmodel=kernel
+ endif
+
+ ifeq ($(ARCH),powerpc)
+- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align
++ ccflags-y += -mlittle-endian -mno-strict-align
+ endif
+
+-EXTRA_CFLAGS += -DNV_UVM_ENABLE
+-EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
+-EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
+-EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER
++ccflags-y += -DNV_UVM_ENABLE
++ccflags-y += $(call cc-option,-Werror=undef,)
++ccflags-y += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
++ccflags-y += -DNV_KERNEL_INTERFACE_LAYER
+
+ #
+ # Detect SGI UV systems and apply system-specific optimizations.
+ #
+
+ ifneq ($(wildcard /proc/sgi_uv),)
+- EXTRA_CFLAGS += -DNV_CONFIG_X86_UV
++ ccflags-y += -DNV_CONFIG_X86_UV
+ endif
+
+ ifdef VGX_FORCE_VFIO_PCI_CORE
+- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE
++ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE
+ endif
+
+ WARNINGS_AS_ERRORS ?=
+@@ -183,7 +177,7 @@ NV_CONFTEST_CMD := /bin/sh $(NV_CONFTEST
+
+ NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags)
+
+-NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie
++NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie
+ NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
+ NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
+ NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
+diff -uNrp a/kernel-open/nvidia/nv.c b/kernel-open/nvidia/nv.c
+--- a/kernel-open/nvidia/nv.c 2025-04-10 16:55:10.000000000 +0100
++++ b/kernel-open/nvidia/nv.c 2025-04-27 10:22:33.344672970 +0100
+@@ -22,6 +22,7 @@
+ */
+
+ #include <linux/module.h> // for MODULE_FIRMWARE
++#include <linux/version.h>
+
+ // must precede "nv.h" and "nv-firmware.h" includes
+ #define NV_FIRMWARE_FOR_NAME(name) "nvidia/" NV_VERSION_STRING "/" name ".bin"
+@@ -4189,7 +4190,11 @@ int NV_API_CALL nv_stop_rc_timer(
+
+ nv_printf(NV_DBG_INFO, "NVRM: stopping rc timer\n");
+ nv->rc_timer_enabled = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&nvl->rc_timer.kernel_timer);
++#else
++ timer_delete_sync(&nvl->rc_timer.kernel_timer);
++#endif
+ nv_printf(NV_DBG_INFO, "NVRM: rc timer stopped\n");
+
+ return 0;
+@@ -4233,7 +4238,11 @@ void NV_API_CALL nv_stop_snapshot_timer(
+ NV_SPIN_UNLOCK_IRQRESTORE(&nvl->snapshot_timer_lock, flags);
+
+ if (timer_active)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&nvl->snapshot_timer.kernel_timer);
++#else
++ timer_delete_sync(&nvl->snapshot_timer.kernel_timer);
++#endif
+ }
+
+ void NV_API_CALL nv_flush_snapshot_timer(void)
+diff -uNrp a/kernel-open/nvidia/nv-nano-timer.c b/kernel-open/nvidia/nv-nano-timer.c
+--- a/kernel-open/nvidia/nv-nano-timer.c 2025-04-10 16:55:10.000000000 +0100
++++ b/kernel-open/nvidia/nv-nano-timer.c 2025-04-27 10:22:33.344377367 +0100
+@@ -27,6 +27,7 @@
+ #include <linux/hrtimer.h>
+ #include <linux/ktime.h>
+ #include <linux/timer.h>
++#include <linux/version.h>
+ #include "os-interface.h"
+ #include "nv-linux.h"
+
+@@ -46,7 +47,7 @@ struct nv_nano_timer
+ };
+
+ /*!
+- * @brief runs nano second resolution timer callback
++ * @brief runs nano second resolution timer callback
+ *
+ * @param[in] nv_nstimer Pointer to nv_nano_timer_t object
+ */
+@@ -150,9 +151,14 @@ void NV_API_CALL nv_create_nano_timer(
+ nv_nstimer->nv_nano_timer_callback = nvidia_nano_timer_callback;
+
+ #if NV_NANO_TIMER_USE_HRTIMER
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ hrtimer_init(&nv_nstimer->hr_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+ nv_nstimer->hr_timer.function = nv_nano_timer_callback_typed_data;
+ #else
++ hrtimer_setup(&nv_nstimer->hr_timer, nv_nano_timer_callback_typed_data,
++ CLOCK_MONOTONIC, HRTIMER_MODE_REL);
++#endif /* Kernel < 6.15 */
++#else
+ #if defined(NV_TIMER_SETUP_PRESENT)
+ timer_setup(&nv_nstimer->jiffy_timer, nv_jiffy_timer_callback_typed_data, 0);
+ #else
+@@ -203,7 +209,11 @@ void NV_API_CALL nv_cancel_nano_timer(
+ #if NV_NANO_TIMER_USE_HRTIMER
+ hrtimer_cancel(&nv_nstimer->hr_timer);
+ #else
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&nv_nstimer->jiffy_timer);
++#else
++ timer_delete_sync(&nv_nstimer->jiffy_timer);
++#endif
+ #endif
+
+ }
+diff -uNrp a/kernel-open/nvidia-drm/nvidia-drm-os-interface.c b/kernel-open/nvidia-drm/nvidia-drm-os-interface.c
+--- a/kernel-open/nvidia-drm/nvidia-drm-os-interface.c 2025-04-10 16:41:35.000000000 +0100
++++ b/kernel-open/nvidia-drm/nvidia-drm-os-interface.c 2025-04-27 10:22:33.344075442 +0100
+@@ -21,6 +21,7 @@
+ */
+
+ #include <linux/slab.h>
++#include <linux/version.h>
+
+ #include "nvidia-drm-os-interface.h"
+
+@@ -238,7 +239,11 @@ unsigned long nv_drm_timeout_from_ms(NvU
+
+ bool nv_drm_del_timer_sync(nv_drm_timer *timer)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ if (del_timer_sync(&timer->kernel_timer)) {
++#else
++ if (timer_delete_sync(&timer->kernel_timer)) {
++#endif
+ return true;
+ } else {
+ return false;
+diff -uNrp a/kernel-open/nvidia-modeset/nvidia-modeset-linux.c b/kernel-open/nvidia-modeset/nvidia-modeset-linux.c
+--- a/kernel-open/nvidia-modeset/nvidia-modeset-linux.c 2025-04-10 16:40:55.000000000 +0100
++++ b/kernel-open/nvidia-modeset/nvidia-modeset-linux.c 2025-04-27 10:22:33.344225618 +0100
+@@ -37,6 +37,7 @@
+ #include <linux/freezer.h>
+ #include <linux/poll.h>
+ #include <linux/cdev.h>
++#include <linux/version.h>
+
+ #include <acpi/video.h>
+
+@@ -748,7 +749,11 @@ static void nvkms_kthread_q_callback(voi
+ * pending timers and than waiting for workqueue callbacks.
+ */
+ if (timer->kernel_timer_created) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&timer->kernel_timer);
++#else
++ timer_delete_sync(&timer->kernel_timer);
++#endif
+ }
+
+ /*
+@@ -1932,7 +1937,11 @@ restart:
+ * completion, and we wait for queue completion with
+ * nv_kthread_q_stop below.
+ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ if (del_timer_sync(&timer->kernel_timer) == 1) {
++#else
++ if (timer_delete_sync(&timer->kernel_timer) == 1) {
++#endif
+ /* We've deactivated timer so we need to clean after it */
+ list_del(&timer->timers_list);
+
+diff -uNrp a/kernel-open/nvidia-uvm/uvm_ats_sva.c b/kernel-open/nvidia-uvm/uvm_ats_sva.c
+--- a/kernel-open/nvidia-uvm/uvm_ats_sva.c 2025-04-10 18:08:50.000000000 +0100
++++ b/kernel-open/nvidia-uvm/uvm_ats_sva.c 2025-04-27 10:24:47.591844968 +0100
+@@ -20,6 +20,7 @@
+ DEALINGS IN THE SOFTWARE.
+
+ *******************************************************************************/
++#include <linux/version.h>
+
+ #include "uvm_ats_sva.h"
+
+@@ -137,10 +138,17 @@ static NvU32 smmu_vcmdq_read32(void __io
+ return ioread32(SMMU_VCMDQ_BASE_ADDR(smmu_cmdqv_base, VCMDQ) + reg);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ static void smmu_vcmdq_write64(void __iomem *smmu_cmdqv_base, int reg, NvU64 val)
+ {
+ iowrite64(val, SMMU_VCMDQ_BASE_ADDR(smmu_cmdqv_base, VCMDQ) + reg);
+ }
++#else
++static void smmu_vcmdq_write64(void __iomem *smmu_cmdqv_base, int reg, NvU64 val)
++{
++ __iowrite64_hi_lo(val, SMMU_VCMDQ_BASE_ADDR(smmu_cmdqv_base, VCMDQ) + reg);
++}
++#endif
+
+ // Fix for Bug 4130089: [GH180][r535] WAR for kernel not issuing SMMU
+ // TLB invalidates on read-only to read-write upgrades
+diff -uNrp a/kernel-open/nvidia-uvm/uvm_common.h b/kernel-open/nvidia-uvm/uvm_common.h
+--- a/kernel-open/nvidia-uvm/uvm_common.h 2025-04-10 16:55:21.000000000 +0100
++++ b/kernel-open/nvidia-uvm/uvm_common.h 2025-04-27 10:26:11.083106295 +0100
+@@ -39,6 +39,12 @@
+ #define UVM_IS_DEVELOP() 0
+ #endif
+
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
++#define page_pgmap(p) (p)->pgmap
++#endif
++
+ #include "uvm_types.h"
+ #include "uvm_linux.h"
+
+diff -uNrp a/kernel-open/nvidia-uvm/uvm_hmm.c b/kernel-open/nvidia-uvm/uvm_hmm.c
+--- a/kernel-open/nvidia-uvm/uvm_hmm.c 2025-04-10 16:55:36.000000000 +0100
++++ b/kernel-open/nvidia-uvm/uvm_hmm.c 2025-04-27 10:35:38.316865361 +0100
+@@ -1992,7 +1992,7 @@ static void fill_dst_pfn(uvm_va_block_t
+
+ dpage = pfn_to_page(pfn);
+ UVM_ASSERT(is_device_private_page(dpage));
+- UVM_ASSERT(dpage->pgmap->owner == &g_uvm_global);
++ UVM_ASSERT(page_pgmap(dpage)->owner == &g_uvm_global);
+
+ hmm_mark_gpu_chunk_referenced(va_block, gpu, gpu_chunk);
+ UVM_ASSERT(!page_count(dpage));
+@@ -2438,6 +2438,7 @@ static void hmm_release_atomic_pages(uvm
+ }
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ static NV_STATUS hmm_block_atomic_fault_locked(uvm_processor_id_t processor_id,
+ uvm_va_block_t *va_block,
+ uvm_va_block_retry_t *va_block_retry,
+@@ -2556,6 +2557,135 @@ release:
+ done:
+ return status;
+ }
++#else
++static NV_STATUS hmm_block_atomic_fault_locked(uvm_processor_id_t processor_id,
++ uvm_va_block_t *va_block,
++ uvm_va_block_retry_t *va_block_retry,
++ uvm_service_block_context_t *service_context)
++{
++ uvm_va_block_region_t region = service_context->region;
++ struct page **pages = service_context->block_context->hmm.pages;
++ struct vm_area_struct *vma = service_context->block_context->hmm.vma;
++ struct page *page;
++ struct folio *folio;
++ uvm_page_index_t page_index;
++ uvm_make_resident_cause_t cause;
++ NV_STATUS status;
++
++ if (!uvm_processor_mask_test(&va_block->resident, UVM_ID_CPU) ||
++ !uvm_va_block_cpu_is_region_resident_on(va_block, NUMA_NO_NODE, region)) {
++ // There is an atomic GPU fault. We need to make sure no pages are
++ // GPU resident so that make_device_exclusive_range() doesn't call
++ // migrate_to_ram() and cause a va_space lock recursion problem.
++ if (service_context->operation == UVM_SERVICE_OPERATION_REPLAYABLE_FAULTS)
++ cause = UVM_MAKE_RESIDENT_CAUSE_REPLAYABLE_FAULT;
++ else if (service_context->operation == UVM_SERVICE_OPERATION_NON_REPLAYABLE_FAULTS)
++ cause = UVM_MAKE_RESIDENT_CAUSE_NON_REPLAYABLE_FAULT;
++ else
++ cause = UVM_MAKE_RESIDENT_CAUSE_ACCESS_COUNTER;
++
++ UVM_ASSERT(uvm_hmm_check_context_vma_is_valid(va_block, vma, region));
++
++ status = uvm_hmm_va_block_migrate_locked(va_block, va_block_retry, service_context, UVM_ID_CPU, region, cause);
++ if (status != NV_OK)
++ goto done;
++
++ // make_device_exclusive_range() will try to call migrate_to_ram()
++ // and deadlock with ourself if the data isn't CPU resident.
++ if (!uvm_processor_mask_test(&va_block->resident, UVM_ID_CPU) ||
++ !uvm_va_block_cpu_is_region_resident_on(va_block, NUMA_NO_NODE, region)) {
++ status = NV_WARN_MORE_PROCESSING_REQUIRED;
++ goto done;
++ }
++ }
++
++ // TODO: Bug 4014681: atomic GPU operations are not supported on MAP_SHARED
++ // mmap() files so we check for that here and report a fatal fault.
++ // Otherwise with the current Linux 6.1 make_device_exclusive_range(),
++ // it doesn't make the page exclusive and we end up in an endless loop.
++ if (vma->vm_flags & (VM_SHARED | VM_HUGETLB)) {
++ status = NV_ERR_NOT_SUPPORTED;
++ goto done;
++ }
++
++ hmm_range_fault_begin(va_block);
++
++ uvm_mutex_unlock(&va_block->lock);
++
++ unsigned long start = uvm_va_block_cpu_page_address(va_block, region.first);
++ page = make_device_exclusive(service_context->block_context->mm, start,
++ &g_uvm_global, &folio);
++
++ uvm_mutex_lock(&va_block->lock);
++
++ if (IS_ERR(page)) {
++ long err = PTR_ERR(page);
++ status = (err == -EBUSY) ? NV_WARN_MORE_PROCESSING_REQUIRED : errno_to_nv_status(err);
++ goto done;
++ }
++
++ /*
++ * This code is most likely WRONG, but it *should* be relatively safe
++ * because of the error above
++ */
++ size_t npages = (uvm_va_block_cpu_page_address(va_block, region.outer - 1) + PAGE_SIZE -
++ start) >> PAGE_SHIFT;
++ while (npages < uvm_va_block_region_num_pages(region))
++ pages[region.first + npages++] = NULL;
++
++ folio_unlock(folio);
++ folio_put(folio);
++
++ if (hmm_range_fault_retry(va_block)) {
++ status = NV_WARN_MORE_PROCESSING_REQUIRED;
++ goto release;
++ }
++
++ status = NV_OK;
++
++ for_each_va_block_page_in_region(page_index, region) {
++ struct page *page = pages[page_index];
++
++ if (!page) {
++ // Record that one of the pages isn't exclusive but keep converting
++ // the others.
++ status = NV_WARN_MORE_PROCESSING_REQUIRED;
++ continue;
++ }
++
++ // If a CPU chunk is already allocated, check to see it matches what
++ // make_device_exclusive_range() found.
++ if (uvm_page_mask_test(&va_block->cpu.allocated, page_index)) {
++ UVM_ASSERT(hmm_va_block_cpu_page_is_same(va_block, page_index, page));
++ UVM_ASSERT(uvm_processor_mask_test(&va_block->resident, UVM_ID_CPU));
++ UVM_ASSERT(uvm_va_block_cpu_is_page_resident_on(va_block, NUMA_NO_NODE, page_index));
++ }
++ else {
++ NV_STATUS s = hmm_va_block_cpu_page_populate(va_block, page_index, page);
++
++ if (s == NV_OK)
++ uvm_va_block_cpu_set_resident_page(va_block, page_to_nid(page), page_index);
++ }
++
++ cpu_mapping_clear(va_block, page_index);
++ }
++
++ if (status != NV_OK)
++ goto release;
++
++ status = uvm_va_block_service_copy(processor_id, UVM_ID_CPU, va_block, va_block_retry, service_context);
++ if (status != NV_OK)
++ goto release;
++
++ status = uvm_va_block_service_finish(processor_id, va_block, service_context);
++
++release:
++ hmm_release_atomic_pages(va_block, service_context);
++
++done:
++ return status;
++}
++#endif
+
+ static bool is_atomic_fault(NvU8 *access_type, uvm_va_block_region_t region)
+ {
+diff -uNrp a/kernel-open/nvidia-uvm/uvm_pmm_gpu.c b/kernel-open/nvidia-uvm/uvm_pmm_gpu.c
+--- a/kernel-open/nvidia-uvm/uvm_pmm_gpu.c 2025-04-10 16:55:35.000000000 +0100
++++ b/kernel-open/nvidia-uvm/uvm_pmm_gpu.c 2025-04-27 10:26:11.083709855 +0100
+@@ -3333,7 +3333,7 @@ void uvm_pmm_gpu_device_p2p_init(uvm_gpu
+ // TODO: Bug 4672502: [Linux Upstream][UVM] Allow drivers to manage and
+ // allocate PCI P2PDMA pages directly
+ p2p_page = pfn_to_page(pci_start_pfn);
+- p2p_page->pgmap->ops = &uvm_device_p2p_pgmap_ops;
++ page_pgmap(p2p_page)->ops = &uvm_device_p2p_pgmap_ops;
+ for (; page_to_pfn(p2p_page) < pci_end_pfn; p2p_page++)
+ p2p_page->zone_device_data = NULL;
+
+@@ -3348,7 +3348,7 @@ void uvm_pmm_gpu_device_p2p_deinit(uvm_g
+
+ if (gpu->device_p2p_initialised && !uvm_parent_gpu_is_coherent(gpu->parent)) {
+ p2p_page = pfn_to_page(pci_start_pfn);
+- devm_memunmap_pages(&gpu->parent->pci_dev->dev, p2p_page->pgmap);
++ devm_memunmap_pages(&gpu->parent->pci_dev->dev, page_pgmap(p2p_page));
+ }
+
+ gpu->device_p2p_initialised = false;
diff --git a/nvidia-open-kmod.spec b/nvidia-open-kmod.spec
index 41a53aa..049421b 100644
--- a/nvidia-open-kmod.spec
+++ b/nvidia-open-kmod.spec
@@ -13,7 +13,7 @@ Name: nvidia-open-kmod
Epoch: 3
Version: 575.51.02
# Taken over by kmodtool
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: NVIDIA open display driver kernel module
License: GPLv2 and MIT
URL: https://github.com/NVIDIA/open-gpu-kernel-modules
@@ -22,7 +22,7 @@ Source0: %{url}/archive/%{version}/open-gpu-kernel-modules-%{version}.tar.
Source11: nvidia-open-kmodtool-excludekernel-filterfile
Patch0: make_modeset_default.patch
Patch1: linker_fix.patch
-Patch2: nvidia-kernel-ccflags-y.patch
+Patch2: kernel-open-6.15_buildfix.patch
ExclusiveArch: x86_64 aarch64
@@ -86,6 +86,9 @@ done
%changelog
+* Sun Apr 27 2025 Leigh Scott <leigh123linux(a)gmail.com> - 3:575.51.02-3
+- Patch for kernel-6.15rc
+
* Thu Apr 24 2025 Nicolas Chauvet <kwizart(a)gmail.com> - 3:575.51.02-2
- Add obsoletes/provides nvidia-kmod
1 day, 8 hours
[nvidia-kmod] Fix
by Leigh Scott
commit 2afef4c8cf1bcd6df537917dbda742e15d053e6f
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sun Apr 27 11:34:40 2025 +0100
Fix
nvidia-kmod.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index 7bf94f8..f325ff1 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -13,7 +13,7 @@ Name: nvidia-kmod
Epoch: 3
Version: 575.51.02
# Taken over by kmodtool
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: NVIDIA display driver kernel module
License: Redistributable, no modification permitted
URL: https://www.nvidia.com/
@@ -89,7 +89,7 @@ done
%changelog
-* Sun Apr 27 2025 Leigh Scott <leigh123linux(a)gmail.com> - 3:575.51.02-2
+* Sun Apr 27 2025 Leigh Scott <leigh123linux(a)gmail.com> - 3:575.51.02-3
- Fix build for open module with 6.15rc kernel
* Sat Apr 19 2025 Leigh Scott <leigh123linux(a)gmail.com> - 3:575.51.02-2
1 day, 9 hours
[nvidia-kmod] Fix build for open module with 6.15rc kernel
by Leigh Scott
commit 16eebfcd3ddfcdff73d02e7cba461faf435efa15
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sun Apr 27 11:30:49 2025 +0100
Fix build for open module with 6.15rc kernel
kernel-6.15_buildfix.patch | 765 +++++++++++++++++++++++++++++++++++++++++++++
make_modeset_default.patch | 2 +-
nvidia-kmod.spec | 12 +-
3 files changed, 775 insertions(+), 4 deletions(-)
---
diff --git a/kernel-6.15_buildfix.patch b/kernel-6.15_buildfix.patch
new file mode 100644
index 0000000..b0e7cb8
--- /dev/null
+++ b/kernel-6.15_buildfix.patch
@@ -0,0 +1,765 @@
+diff -uNrp a/kernel/Kbuild b/kernel/Kbuild
+--- a/kernel/Kbuild 2025-04-10 18:00:35.000000000 +0100
++++ b/kernel/Kbuild 2025-04-27 10:44:03.992055169 +0100
+@@ -75,21 +75,15 @@ $(foreach _module, $(NV_KERNEL_MODULES),
+ $(eval include $(src)/$(_module)/$(_module).Kbuild))
+
+
+-#
+-# Define CFLAGS that apply to all the NVIDIA kernel modules. EXTRA_CFLAGS
+-# is deprecated since 2.6.24 in favor of ccflags-y, but we need to support
+-# older kernels which do not have ccflags-y. Newer kernels append
+-# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
+-#
+-
+-EXTRA_CFLAGS += -I$(src)/common/inc
+-EXTRA_CFLAGS += -I$(src)
+-EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
+-EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
+-EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\"
++ccflags-y += -std=gnu17
++ccflags-y += -I$(src)/common/inc
++ccflags-y += -I$(src)
++ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
++ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
++ccflags-y += -DNV_VERSION_STRING=\"575.51.02\"
+
+ ifneq ($(SYSSRCHOST1X),)
+- EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
++ ccflags-y += -I$(SYSSRCHOST1X)
+ endif
+
+ # Some Android kernels prohibit driver use of filesystem functions like
+@@ -99,57 +93,57 @@ endif
+ PLATFORM_IS_ANDROID ?= 0
+
+ ifeq ($(PLATFORM_IS_ANDROID),1)
+- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
++ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
+ else
+- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
++ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
+ endif
+
+-EXTRA_CFLAGS += -Wno-unused-function
++ccflags-y += -Wno-unused-function
+
+ ifneq ($(NV_BUILD_TYPE),debug)
+- EXTRA_CFLAGS += -Wuninitialized
++ ccflags-y += -Wuninitialized
+ endif
+
+-EXTRA_CFLAGS += -fno-strict-aliasing
++ccflags-y += -fno-strict-aliasing
+
+ ifeq ($(ARCH),arm64)
+- EXTRA_CFLAGS += -mstrict-align
++ ccflags-y += -mstrict-align
+ endif
+
+ ifeq ($(NV_BUILD_TYPE),debug)
+- EXTRA_CFLAGS += -g
++ ccflags-y += -g
+ endif
+
+-EXTRA_CFLAGS += -ffreestanding
++ccflags-y += -ffreestanding
+
+ ifeq ($(ARCH),arm64)
+- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a
+- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,)
++ ccflags-y += -mgeneral-regs-only -march=armv8-a
++ ccflags-y += $(call cc-option,-mno-outline-atomics,)
+ endif
+
+ ifeq ($(ARCH),x86_64)
+- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel
++ ccflags-y += -mno-red-zone -mcmodel=kernel
+ endif
+
+ ifeq ($(ARCH),powerpc)
+- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align
++ ccflags-y += -mlittle-endian -mno-strict-align
+ endif
+
+-EXTRA_CFLAGS += -DNV_UVM_ENABLE
+-EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
+-EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
+-EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER
++ccflags-y += -DNV_UVM_ENABLE
++ccflags-y += $(call cc-option,-Werror=undef,)
++ccflags-y += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
++ccflags-y += -DNV_KERNEL_INTERFACE_LAYER
+
+ #
+ # Detect SGI UV systems and apply system-specific optimizations.
+ #
+
+ ifneq ($(wildcard /proc/sgi_uv),)
+- EXTRA_CFLAGS += -DNV_CONFIG_X86_UV
++ ccflags-y += -DNV_CONFIG_X86_UV
+ endif
+
+ ifdef VGX_FORCE_VFIO_PCI_CORE
+- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE
++ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE
+ endif
+
+ WARNINGS_AS_ERRORS ?=
+@@ -183,7 +177,7 @@ NV_CONFTEST_CMD := /bin/sh $(NV_CONFTEST
+
+ NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags)
+
+-NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie
++NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie
+ NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
+ NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
+ NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
+diff -uNrp a/kernel/nvidia/nv.c b/kernel/nvidia/nv.c
+--- a/kernel/nvidia/nv.c 2025-04-10 18:00:36.000000000 +0100
++++ b/kernel/nvidia/nv.c 2025-04-27 10:23:28.464980152 +0100
+@@ -22,6 +22,7 @@
+ */
+
+ #include <linux/module.h> // for MODULE_FIRMWARE
++#include <linux/version.h>
+
+ // must precede "nv.h" and "nv-firmware.h" includes
+ #define NV_FIRMWARE_FOR_NAME(name) "nvidia/" NV_VERSION_STRING "/" name ".bin"
+@@ -4177,7 +4178,11 @@ int NV_API_CALL nv_stop_rc_timer(
+
+ nv_printf(NV_DBG_INFO, "NVRM: stopping rc timer\n");
+ nv->rc_timer_enabled = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&nvl->rc_timer.kernel_timer);
++#else
++ timer_delete_sync(&nvl->rc_timer.kernel_timer);
++#endif
+ nv_printf(NV_DBG_INFO, "NVRM: rc timer stopped\n");
+
+ return 0;
+@@ -4221,7 +4226,11 @@ void NV_API_CALL nv_stop_snapshot_timer(
+ NV_SPIN_UNLOCK_IRQRESTORE(&nvl->snapshot_timer_lock, flags);
+
+ if (timer_active)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&nvl->snapshot_timer.kernel_timer);
++#else
++ timer_delete_sync(&nvl->snapshot_timer.kernel_timer);
++#endif
+ }
+
+ void NV_API_CALL nv_flush_snapshot_timer(void)
+diff -uNrp a/kernel/nvidia/nv-nano-timer.c b/kernel/nvidia/nv-nano-timer.c
+--- a/kernel/nvidia/nv-nano-timer.c 2025-04-10 18:00:37.000000000 +0100
++++ b/kernel/nvidia/nv-nano-timer.c 2025-04-27 10:23:28.464750495 +0100
+@@ -27,6 +27,7 @@
+ #include <linux/hrtimer.h>
+ #include <linux/ktime.h>
+ #include <linux/timer.h>
++#include <linux/version.h>
+ #include "os-interface.h"
+ #include "nv-linux.h"
+
+@@ -46,7 +47,7 @@ struct nv_nano_timer
+ };
+
+ /*!
+- * @brief runs nano second resolution timer callback
++ * @brief runs nano second resolution timer callback
+ *
+ * @param[in] nv_nstimer Pointer to nv_nano_timer_t object
+ */
+@@ -150,9 +151,14 @@ void NV_API_CALL nv_create_nano_timer(
+ nv_nstimer->nv_nano_timer_callback = nvidia_nano_timer_callback;
+
+ #if NV_NANO_TIMER_USE_HRTIMER
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ hrtimer_init(&nv_nstimer->hr_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+ nv_nstimer->hr_timer.function = nv_nano_timer_callback_typed_data;
+ #else
++ hrtimer_setup(&nv_nstimer->hr_timer, nv_nano_timer_callback_typed_data,
++ CLOCK_MONOTONIC, HRTIMER_MODE_REL);
++#endif /* Kernel < 6.15 */
++#else
+ #if defined(NV_TIMER_SETUP_PRESENT)
+ timer_setup(&nv_nstimer->jiffy_timer, nv_jiffy_timer_callback_typed_data, 0);
+ #else
+@@ -203,7 +209,11 @@ void NV_API_CALL nv_cancel_nano_timer(
+ #if NV_NANO_TIMER_USE_HRTIMER
+ hrtimer_cancel(&nv_nstimer->hr_timer);
+ #else
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&nv_nstimer->jiffy_timer);
++#else
++ timer_delete_sync(&nv_nstimer->jiffy_timer);
++#endif
+ #endif
+
+ }
+diff -uNrp a/kernel/nvidia-drm/nvidia-drm-os-interface.c b/kernel/nvidia-drm/nvidia-drm-os-interface.c
+--- a/kernel/nvidia-drm/nvidia-drm-os-interface.c 2025-04-10 16:41:27.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-os-interface.c 2025-04-27 10:23:28.464505147 +0100
+@@ -21,6 +21,7 @@
+ */
+
+ #include <linux/slab.h>
++#include <linux/version.h>
+
+ #include "nvidia-drm-os-interface.h"
+
+@@ -238,7 +239,11 @@ unsigned long nv_drm_timeout_from_ms(NvU
+
+ bool nv_drm_del_timer_sync(nv_drm_timer *timer)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ if (del_timer_sync(&timer->kernel_timer)) {
++#else
++ if (timer_delete_sync(&timer->kernel_timer)) {
++#endif
+ return true;
+ } else {
+ return false;
+diff -uNrp a/kernel/nvidia-modeset/nvidia-modeset-linux.c b/kernel/nvidia-modeset/nvidia-modeset-linux.c
+--- a/kernel/nvidia-modeset/nvidia-modeset-linux.c 2025-04-10 16:37:29.000000000 +0100
++++ b/kernel/nvidia-modeset/nvidia-modeset-linux.c 2025-04-27 10:23:28.464637119 +0100
+@@ -37,6 +37,7 @@
+ #include <linux/freezer.h>
+ #include <linux/poll.h>
+ #include <linux/cdev.h>
++#include <linux/version.h>
+
+ #include <acpi/video.h>
+
+@@ -748,7 +749,11 @@ static void nvkms_kthread_q_callback(voi
+ * pending timers and than waiting for workqueue callbacks.
+ */
+ if (timer->kernel_timer_created) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&timer->kernel_timer);
++#else
++ timer_delete_sync(&timer->kernel_timer);
++#endif
+ }
+
+ /*
+@@ -1932,7 +1937,11 @@ restart:
+ * completion, and we wait for queue completion with
+ * nv_kthread_q_stop below.
+ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ if (del_timer_sync(&timer->kernel_timer) == 1) {
++#else
++ if (timer_delete_sync(&timer->kernel_timer) == 1) {
++#endif
+ /* We've deactivated timer so we need to clean after it */
+ list_del(&timer->timers_list);
+
+diff -uNrp a/kernel/nvidia-uvm/uvm_ats_sva.c b/kernel/nvidia-uvm/uvm_ats_sva.c
+--- a/kernel/nvidia-uvm/uvm_ats_sva.c 2025-04-10 18:08:50.000000000 +0100
++++ b/kernel/nvidia-uvm/uvm_ats_sva.c 2025-04-27 10:25:18.919709814 +0100
+@@ -20,6 +20,7 @@
+ DEALINGS IN THE SOFTWARE.
+
+ *******************************************************************************/
++#include <linux/version.h>
+
+ #include "uvm_ats_sva.h"
+
+@@ -137,10 +138,17 @@ static NvU32 smmu_vcmdq_read32(void __io
+ return ioread32(SMMU_VCMDQ_BASE_ADDR(smmu_cmdqv_base, VCMDQ) + reg);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ static void smmu_vcmdq_write64(void __iomem *smmu_cmdqv_base, int reg, NvU64 val)
+ {
+ iowrite64(val, SMMU_VCMDQ_BASE_ADDR(smmu_cmdqv_base, VCMDQ) + reg);
+ }
++#else
++static void smmu_vcmdq_write64(void __iomem *smmu_cmdqv_base, int reg, NvU64 val)
++{
++ __iowrite64_hi_lo(val, SMMU_VCMDQ_BASE_ADDR(smmu_cmdqv_base, VCMDQ) + reg);
++}
++#endif
+
+ // Fix for Bug 4130089: [GH180][r535] WAR for kernel not issuing SMMU
+ // TLB invalidates on read-only to read-write upgrades
+diff -uNrp a/kernel-open/Kbuild b/kernel-open/Kbuild
+--- a/kernel-open/Kbuild 2025-04-10 16:55:42.000000000 +0100
++++ b/kernel-open/Kbuild 2025-04-27 10:43:28.345532688 +0100
+@@ -75,21 +75,15 @@ $(foreach _module, $(NV_KERNEL_MODULES),
+ $(eval include $(src)/$(_module)/$(_module).Kbuild))
+
+
+-#
+-# Define CFLAGS that apply to all the NVIDIA kernel modules. EXTRA_CFLAGS
+-# is deprecated since 2.6.24 in favor of ccflags-y, but we need to support
+-# older kernels which do not have ccflags-y. Newer kernels append
+-# $(EXTRA_CFLAGS) to ccflags-y for compatibility.
+-#
+-
+-EXTRA_CFLAGS += -I$(src)/common/inc
+-EXTRA_CFLAGS += -I$(src)
+-EXTRA_CFLAGS += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
+-EXTRA_CFLAGS += -D__KERNEL__ -DMODULE -DNVRM
+-EXTRA_CFLAGS += -DNV_VERSION_STRING=\"575.51.02\"
++ccflags-y += -std=gnu17
++ccflags-y += -I$(src)/common/inc
++ccflags-y += -I$(src)
++ccflags-y += -Wall $(DEFINES) $(INCLUDES) -Wno-cast-qual -Wno-format-extra-args
++ccflags-y += -D__KERNEL__ -DMODULE -DNVRM
++ccflags-y += -DNV_VERSION_STRING=\"575.51.02\"
+
+ ifneq ($(SYSSRCHOST1X),)
+- EXTRA_CFLAGS += -I$(SYSSRCHOST1X)
++ ccflags-y += -I$(SYSSRCHOST1X)
+ endif
+
+ # Some Android kernels prohibit driver use of filesystem functions like
+@@ -99,57 +93,57 @@ endif
+ PLATFORM_IS_ANDROID ?= 0
+
+ ifeq ($(PLATFORM_IS_ANDROID),1)
+- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
++ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=0
+ else
+- EXTRA_CFLAGS += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
++ ccflags-y += -DNV_FILESYSTEM_ACCESS_AVAILABLE=1
+ endif
+
+-EXTRA_CFLAGS += -Wno-unused-function
++ccflags-y += -Wno-unused-function
+
+ ifneq ($(NV_BUILD_TYPE),debug)
+- EXTRA_CFLAGS += -Wuninitialized
++ ccflags-y += -Wuninitialized
+ endif
+
+-EXTRA_CFLAGS += -fno-strict-aliasing
++ccflags-y += -fno-strict-aliasing
+
+ ifeq ($(ARCH),arm64)
+- EXTRA_CFLAGS += -mstrict-align
++ ccflags-y += -mstrict-align
+ endif
+
+ ifeq ($(NV_BUILD_TYPE),debug)
+- EXTRA_CFLAGS += -g
++ ccflags-y += -g
+ endif
+
+-EXTRA_CFLAGS += -ffreestanding
++ccflags-y += -ffreestanding
+
+ ifeq ($(ARCH),arm64)
+- EXTRA_CFLAGS += -mgeneral-regs-only -march=armv8-a
+- EXTRA_CFLAGS += $(call cc-option,-mno-outline-atomics,)
++ ccflags-y += -mgeneral-regs-only -march=armv8-a
++ ccflags-y += $(call cc-option,-mno-outline-atomics,)
+ endif
+
+ ifeq ($(ARCH),x86_64)
+- EXTRA_CFLAGS += -mno-red-zone -mcmodel=kernel
++ ccflags-y += -mno-red-zone -mcmodel=kernel
+ endif
+
+ ifeq ($(ARCH),powerpc)
+- EXTRA_CFLAGS += -mlittle-endian -mno-strict-align
++ ccflags-y += -mlittle-endian -mno-strict-align
+ endif
+
+-EXTRA_CFLAGS += -DNV_UVM_ENABLE
+-EXTRA_CFLAGS += $(call cc-option,-Werror=undef,)
+-EXTRA_CFLAGS += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
+-EXTRA_CFLAGS += -DNV_KERNEL_INTERFACE_LAYER
++ccflags-y += -DNV_UVM_ENABLE
++ccflags-y += $(call cc-option,-Werror=undef,)
++ccflags-y += -DNV_SPECTRE_V2=$(NV_SPECTRE_V2)
++ccflags-y += -DNV_KERNEL_INTERFACE_LAYER
+
+ #
+ # Detect SGI UV systems and apply system-specific optimizations.
+ #
+
+ ifneq ($(wildcard /proc/sgi_uv),)
+- EXTRA_CFLAGS += -DNV_CONFIG_X86_UV
++ ccflags-y += -DNV_CONFIG_X86_UV
+ endif
+
+ ifdef VGX_FORCE_VFIO_PCI_CORE
+- EXTRA_CFLAGS += -DNV_VGPU_FORCE_VFIO_PCI_CORE
++ ccflags-y += -DNV_VGPU_FORCE_VFIO_PCI_CORE
+ endif
+
+ WARNINGS_AS_ERRORS ?=
+@@ -183,7 +177,7 @@ NV_CONFTEST_CMD := /bin/sh $(NV_CONFTEST
+
+ NV_CFLAGS_FROM_CONFTEST := $(shell $(NV_CONFTEST_CMD) build_cflags)
+
+-NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(EXTRA_CFLAGS) -fno-pie
++NV_CONFTEST_CFLAGS = $(NV_CFLAGS_FROM_CONFTEST) $(ccflags-y) -fno-pie
+ NV_CONFTEST_CFLAGS += $(call cc-disable-warning,pointer-sign)
+ NV_CONFTEST_CFLAGS += $(call cc-option,-fshort-wchar,)
+ NV_CONFTEST_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types,)
+diff -uNrp a/kernel-open/nvidia/nv.c b/kernel-open/nvidia/nv.c
+--- a/kernel-open/nvidia/nv.c 2025-04-10 16:55:10.000000000 +0100
++++ b/kernel-open/nvidia/nv.c 2025-04-27 10:22:33.344672970 +0100
+@@ -22,6 +22,7 @@
+ */
+
+ #include <linux/module.h> // for MODULE_FIRMWARE
++#include <linux/version.h>
+
+ // must precede "nv.h" and "nv-firmware.h" includes
+ #define NV_FIRMWARE_FOR_NAME(name) "nvidia/" NV_VERSION_STRING "/" name ".bin"
+@@ -4189,7 +4190,11 @@ int NV_API_CALL nv_stop_rc_timer(
+
+ nv_printf(NV_DBG_INFO, "NVRM: stopping rc timer\n");
+ nv->rc_timer_enabled = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&nvl->rc_timer.kernel_timer);
++#else
++ timer_delete_sync(&nvl->rc_timer.kernel_timer);
++#endif
+ nv_printf(NV_DBG_INFO, "NVRM: rc timer stopped\n");
+
+ return 0;
+@@ -4233,7 +4238,11 @@ void NV_API_CALL nv_stop_snapshot_timer(
+ NV_SPIN_UNLOCK_IRQRESTORE(&nvl->snapshot_timer_lock, flags);
+
+ if (timer_active)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&nvl->snapshot_timer.kernel_timer);
++#else
++ timer_delete_sync(&nvl->snapshot_timer.kernel_timer);
++#endif
+ }
+
+ void NV_API_CALL nv_flush_snapshot_timer(void)
+diff -uNrp a/kernel-open/nvidia/nv-nano-timer.c b/kernel-open/nvidia/nv-nano-timer.c
+--- a/kernel-open/nvidia/nv-nano-timer.c 2025-04-10 16:55:10.000000000 +0100
++++ b/kernel-open/nvidia/nv-nano-timer.c 2025-04-27 10:22:33.344377367 +0100
+@@ -27,6 +27,7 @@
+ #include <linux/hrtimer.h>
+ #include <linux/ktime.h>
+ #include <linux/timer.h>
++#include <linux/version.h>
+ #include "os-interface.h"
+ #include "nv-linux.h"
+
+@@ -46,7 +47,7 @@ struct nv_nano_timer
+ };
+
+ /*!
+- * @brief runs nano second resolution timer callback
++ * @brief runs nano second resolution timer callback
+ *
+ * @param[in] nv_nstimer Pointer to nv_nano_timer_t object
+ */
+@@ -150,9 +151,14 @@ void NV_API_CALL nv_create_nano_timer(
+ nv_nstimer->nv_nano_timer_callback = nvidia_nano_timer_callback;
+
+ #if NV_NANO_TIMER_USE_HRTIMER
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ hrtimer_init(&nv_nstimer->hr_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+ nv_nstimer->hr_timer.function = nv_nano_timer_callback_typed_data;
+ #else
++ hrtimer_setup(&nv_nstimer->hr_timer, nv_nano_timer_callback_typed_data,
++ CLOCK_MONOTONIC, HRTIMER_MODE_REL);
++#endif /* Kernel < 6.15 */
++#else
+ #if defined(NV_TIMER_SETUP_PRESENT)
+ timer_setup(&nv_nstimer->jiffy_timer, nv_jiffy_timer_callback_typed_data, 0);
+ #else
+@@ -203,7 +209,11 @@ void NV_API_CALL nv_cancel_nano_timer(
+ #if NV_NANO_TIMER_USE_HRTIMER
+ hrtimer_cancel(&nv_nstimer->hr_timer);
+ #else
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&nv_nstimer->jiffy_timer);
++#else
++ timer_delete_sync(&nv_nstimer->jiffy_timer);
++#endif
+ #endif
+
+ }
+diff -uNrp a/kernel-open/nvidia-drm/nvidia-drm-os-interface.c b/kernel-open/nvidia-drm/nvidia-drm-os-interface.c
+--- a/kernel-open/nvidia-drm/nvidia-drm-os-interface.c 2025-04-10 16:41:35.000000000 +0100
++++ b/kernel-open/nvidia-drm/nvidia-drm-os-interface.c 2025-04-27 10:22:33.344075442 +0100
+@@ -21,6 +21,7 @@
+ */
+
+ #include <linux/slab.h>
++#include <linux/version.h>
+
+ #include "nvidia-drm-os-interface.h"
+
+@@ -238,7 +239,11 @@ unsigned long nv_drm_timeout_from_ms(NvU
+
+ bool nv_drm_del_timer_sync(nv_drm_timer *timer)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ if (del_timer_sync(&timer->kernel_timer)) {
++#else
++ if (timer_delete_sync(&timer->kernel_timer)) {
++#endif
+ return true;
+ } else {
+ return false;
+diff -uNrp a/kernel-open/nvidia-modeset/nvidia-modeset-linux.c b/kernel-open/nvidia-modeset/nvidia-modeset-linux.c
+--- a/kernel-open/nvidia-modeset/nvidia-modeset-linux.c 2025-04-10 16:40:55.000000000 +0100
++++ b/kernel-open/nvidia-modeset/nvidia-modeset-linux.c 2025-04-27 10:22:33.344225618 +0100
+@@ -37,6 +37,7 @@
+ #include <linux/freezer.h>
+ #include <linux/poll.h>
+ #include <linux/cdev.h>
++#include <linux/version.h>
+
+ #include <acpi/video.h>
+
+@@ -748,7 +749,11 @@ static void nvkms_kthread_q_callback(voi
+ * pending timers and than waiting for workqueue callbacks.
+ */
+ if (timer->kernel_timer_created) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ del_timer_sync(&timer->kernel_timer);
++#else
++ timer_delete_sync(&timer->kernel_timer);
++#endif
+ }
+
+ /*
+@@ -1932,7 +1937,11 @@ restart:
+ * completion, and we wait for queue completion with
+ * nv_kthread_q_stop below.
+ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ if (del_timer_sync(&timer->kernel_timer) == 1) {
++#else
++ if (timer_delete_sync(&timer->kernel_timer) == 1) {
++#endif
+ /* We've deactivated timer so we need to clean after it */
+ list_del(&timer->timers_list);
+
+diff -uNrp a/kernel-open/nvidia-uvm/uvm_ats_sva.c b/kernel-open/nvidia-uvm/uvm_ats_sva.c
+--- a/kernel-open/nvidia-uvm/uvm_ats_sva.c 2025-04-10 18:08:50.000000000 +0100
++++ b/kernel-open/nvidia-uvm/uvm_ats_sva.c 2025-04-27 10:24:47.591844968 +0100
+@@ -20,6 +20,7 @@
+ DEALINGS IN THE SOFTWARE.
+
+ *******************************************************************************/
++#include <linux/version.h>
+
+ #include "uvm_ats_sva.h"
+
+@@ -137,10 +138,17 @@ static NvU32 smmu_vcmdq_read32(void __io
+ return ioread32(SMMU_VCMDQ_BASE_ADDR(smmu_cmdqv_base, VCMDQ) + reg);
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ static void smmu_vcmdq_write64(void __iomem *smmu_cmdqv_base, int reg, NvU64 val)
+ {
+ iowrite64(val, SMMU_VCMDQ_BASE_ADDR(smmu_cmdqv_base, VCMDQ) + reg);
+ }
++#else
++static void smmu_vcmdq_write64(void __iomem *smmu_cmdqv_base, int reg, NvU64 val)
++{
++ __iowrite64_hi_lo(val, SMMU_VCMDQ_BASE_ADDR(smmu_cmdqv_base, VCMDQ) + reg);
++}
++#endif
+
+ // Fix for Bug 4130089: [GH180][r535] WAR for kernel not issuing SMMU
+ // TLB invalidates on read-only to read-write upgrades
+diff -uNrp a/kernel-open/nvidia-uvm/uvm_common.h b/kernel-open/nvidia-uvm/uvm_common.h
+--- a/kernel-open/nvidia-uvm/uvm_common.h 2025-04-10 16:55:21.000000000 +0100
++++ b/kernel-open/nvidia-uvm/uvm_common.h 2025-04-27 10:26:11.083106295 +0100
+@@ -39,6 +39,12 @@
+ #define UVM_IS_DEVELOP() 0
+ #endif
+
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
++#define page_pgmap(p) (p)->pgmap
++#endif
++
+ #include "uvm_types.h"
+ #include "uvm_linux.h"
+
+diff -uNrp a/kernel-open/nvidia-uvm/uvm_hmm.c b/kernel-open/nvidia-uvm/uvm_hmm.c
+--- a/kernel-open/nvidia-uvm/uvm_hmm.c 2025-04-10 16:55:36.000000000 +0100
++++ b/kernel-open/nvidia-uvm/uvm_hmm.c 2025-04-27 10:35:38.316865361 +0100
+@@ -1992,7 +1992,7 @@ static void fill_dst_pfn(uvm_va_block_t
+
+ dpage = pfn_to_page(pfn);
+ UVM_ASSERT(is_device_private_page(dpage));
+- UVM_ASSERT(dpage->pgmap->owner == &g_uvm_global);
++ UVM_ASSERT(page_pgmap(dpage)->owner == &g_uvm_global);
+
+ hmm_mark_gpu_chunk_referenced(va_block, gpu, gpu_chunk);
+ UVM_ASSERT(!page_count(dpage));
+@@ -2438,6 +2438,7 @@ static void hmm_release_atomic_pages(uvm
+ }
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 15, 0)
+ static NV_STATUS hmm_block_atomic_fault_locked(uvm_processor_id_t processor_id,
+ uvm_va_block_t *va_block,
+ uvm_va_block_retry_t *va_block_retry,
+@@ -2556,6 +2557,135 @@ release:
+ done:
+ return status;
+ }
++#else
++static NV_STATUS hmm_block_atomic_fault_locked(uvm_processor_id_t processor_id,
++ uvm_va_block_t *va_block,
++ uvm_va_block_retry_t *va_block_retry,
++ uvm_service_block_context_t *service_context)
++{
++ uvm_va_block_region_t region = service_context->region;
++ struct page **pages = service_context->block_context->hmm.pages;
++ struct vm_area_struct *vma = service_context->block_context->hmm.vma;
++ struct page *page;
++ struct folio *folio;
++ uvm_page_index_t page_index;
++ uvm_make_resident_cause_t cause;
++ NV_STATUS status;
++
++ if (!uvm_processor_mask_test(&va_block->resident, UVM_ID_CPU) ||
++ !uvm_va_block_cpu_is_region_resident_on(va_block, NUMA_NO_NODE, region)) {
++ // There is an atomic GPU fault. We need to make sure no pages are
++ // GPU resident so that make_device_exclusive_range() doesn't call
++ // migrate_to_ram() and cause a va_space lock recursion problem.
++ if (service_context->operation == UVM_SERVICE_OPERATION_REPLAYABLE_FAULTS)
++ cause = UVM_MAKE_RESIDENT_CAUSE_REPLAYABLE_FAULT;
++ else if (service_context->operation == UVM_SERVICE_OPERATION_NON_REPLAYABLE_FAULTS)
++ cause = UVM_MAKE_RESIDENT_CAUSE_NON_REPLAYABLE_FAULT;
++ else
++ cause = UVM_MAKE_RESIDENT_CAUSE_ACCESS_COUNTER;
++
++ UVM_ASSERT(uvm_hmm_check_context_vma_is_valid(va_block, vma, region));
++
++ status = uvm_hmm_va_block_migrate_locked(va_block, va_block_retry, service_context, UVM_ID_CPU, region, cause);
++ if (status != NV_OK)
++ goto done;
++
++ // make_device_exclusive_range() will try to call migrate_to_ram()
++ // and deadlock with ourself if the data isn't CPU resident.
++ if (!uvm_processor_mask_test(&va_block->resident, UVM_ID_CPU) ||
++ !uvm_va_block_cpu_is_region_resident_on(va_block, NUMA_NO_NODE, region)) {
++ status = NV_WARN_MORE_PROCESSING_REQUIRED;
++ goto done;
++ }
++ }
++
++ // TODO: Bug 4014681: atomic GPU operations are not supported on MAP_SHARED
++ // mmap() files so we check for that here and report a fatal fault.
++ // Otherwise with the current Linux 6.1 make_device_exclusive_range(),
++ // it doesn't make the page exclusive and we end up in an endless loop.
++ if (vma->vm_flags & (VM_SHARED | VM_HUGETLB)) {
++ status = NV_ERR_NOT_SUPPORTED;
++ goto done;
++ }
++
++ hmm_range_fault_begin(va_block);
++
++ uvm_mutex_unlock(&va_block->lock);
++
++ unsigned long start = uvm_va_block_cpu_page_address(va_block, region.first);
++ page = make_device_exclusive(service_context->block_context->mm, start,
++ &g_uvm_global, &folio);
++
++ uvm_mutex_lock(&va_block->lock);
++
++ if (IS_ERR(page)) {
++ long err = PTR_ERR(page);
++ status = (err == -EBUSY) ? NV_WARN_MORE_PROCESSING_REQUIRED : errno_to_nv_status(err);
++ goto done;
++ }
++
++ /*
++ * This code is most likely WRONG, but it *should* be relatively safe
++ * because of the error above
++ */
++ size_t npages = (uvm_va_block_cpu_page_address(va_block, region.outer - 1) + PAGE_SIZE -
++ start) >> PAGE_SHIFT;
++ while (npages < uvm_va_block_region_num_pages(region))
++ pages[region.first + npages++] = NULL;
++
++ folio_unlock(folio);
++ folio_put(folio);
++
++ if (hmm_range_fault_retry(va_block)) {
++ status = NV_WARN_MORE_PROCESSING_REQUIRED;
++ goto release;
++ }
++
++ status = NV_OK;
++
++ for_each_va_block_page_in_region(page_index, region) {
++ struct page *page = pages[page_index];
++
++ if (!page) {
++ // Record that one of the pages isn't exclusive but keep converting
++ // the others.
++ status = NV_WARN_MORE_PROCESSING_REQUIRED;
++ continue;
++ }
++
++ // If a CPU chunk is already allocated, check to see it matches what
++ // make_device_exclusive_range() found.
++ if (uvm_page_mask_test(&va_block->cpu.allocated, page_index)) {
++ UVM_ASSERT(hmm_va_block_cpu_page_is_same(va_block, page_index, page));
++ UVM_ASSERT(uvm_processor_mask_test(&va_block->resident, UVM_ID_CPU));
++ UVM_ASSERT(uvm_va_block_cpu_is_page_resident_on(va_block, NUMA_NO_NODE, page_index));
++ }
++ else {
++ NV_STATUS s = hmm_va_block_cpu_page_populate(va_block, page_index, page);
++
++ if (s == NV_OK)
++ uvm_va_block_cpu_set_resident_page(va_block, page_to_nid(page), page_index);
++ }
++
++ cpu_mapping_clear(va_block, page_index);
++ }
++
++ if (status != NV_OK)
++ goto release;
++
++ status = uvm_va_block_service_copy(processor_id, UVM_ID_CPU, va_block, va_block_retry, service_context);
++ if (status != NV_OK)
++ goto release;
++
++ status = uvm_va_block_service_finish(processor_id, va_block, service_context);
++
++release:
++ hmm_release_atomic_pages(va_block, service_context);
++
++done:
++ return status;
++}
++#endif
+
+ static bool is_atomic_fault(NvU8 *access_type, uvm_va_block_region_t region)
+ {
+diff -uNrp a/kernel-open/nvidia-uvm/uvm_pmm_gpu.c b/kernel-open/nvidia-uvm/uvm_pmm_gpu.c
+--- a/kernel-open/nvidia-uvm/uvm_pmm_gpu.c 2025-04-10 16:55:35.000000000 +0100
++++ b/kernel-open/nvidia-uvm/uvm_pmm_gpu.c 2025-04-27 10:26:11.083709855 +0100
+@@ -3333,7 +3333,7 @@ void uvm_pmm_gpu_device_p2p_init(uvm_gpu
+ // TODO: Bug 4672502: [Linux Upstream][UVM] Allow drivers to manage and
+ // allocate PCI P2PDMA pages directly
+ p2p_page = pfn_to_page(pci_start_pfn);
+- p2p_page->pgmap->ops = &uvm_device_p2p_pgmap_ops;
++ page_pgmap(p2p_page)->ops = &uvm_device_p2p_pgmap_ops;
+ for (; page_to_pfn(p2p_page) < pci_end_pfn; p2p_page++)
+ p2p_page->zone_device_data = NULL;
+
+@@ -3348,7 +3348,7 @@ void uvm_pmm_gpu_device_p2p_deinit(uvm_g
+
+ if (gpu->device_p2p_initialised && !uvm_parent_gpu_is_coherent(gpu->parent)) {
+ p2p_page = pfn_to_page(pci_start_pfn);
+- devm_memunmap_pages(&gpu->parent->pci_dev->dev, p2p_page->pgmap);
++ devm_memunmap_pages(&gpu->parent->pci_dev->dev, page_pgmap(p2p_page));
+ }
+
+ gpu->device_p2p_initialised = false;
diff --git a/make_modeset_default.patch b/make_modeset_default.patch
index c850bab..afd69bb 100644
--- a/make_modeset_default.patch
+++ b/make_modeset_default.patch
@@ -13,7 +13,7 @@ diff -uNrp a/kernel/nvidia-drm/nvidia-drm-linux.c b/kernel/nvidia-drm/nvidia-drm
diff -uNrp a/kernel/nvidia-drm/nvidia-drm-os-interface.c b/kernel/nvidia-drm/nvidia-drm-os-interface.c
--- a/kernel/nvidia-drm/nvidia-drm-os-interface.c 2025-01-16 03:13:56.000000000 +0000
+++ b/kernel/nvidia-drm/nvidia-drm-os-interface.c 2025-01-24 15:15:16.192929239 +0000
-@@ -41,7 +41,7 @@
+@@ -42,7 +42,7 @@
#include <drm/drmP.h>
#endif
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index 20c432f..7bf94f8 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -13,14 +13,14 @@ Name: nvidia-kmod
Epoch: 3
Version: 575.51.02
# Taken over by kmodtool
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: NVIDIA display driver kernel module
License: Redistributable, no modification permitted
URL: https://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: make_modeset_default.patch
-Patch1: nvidia-kernel-ccflags-y.patch
+Patch1: kernel-6.15_buildfix.patch
ExclusiveArch: x86_64 aarch64
@@ -42,6 +42,7 @@ The nvidia %{version} display driver kernel module for kernel %{kversion}.
kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{name} --filterfile %{SOURCE11} --obsolete-name nvidia-newest --obsolete-version "%{?epoch}:%{version}-%{release}" %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null
%setup -T -c
tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{version}-%{_target_cpu}.tar.xz
+%patch -P1 -p1
# Switch to kernel or kernel-open
%if 0%{?_with_kmod_nvidia_open:1}
mv kernel kernel-closed
@@ -54,7 +55,6 @@ echo "Using original nvidia defaults"
echo "Set nvidia to modeset=1"
%patch -P0 -p1
%endif
-%patch -P1 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -89,6 +89,12 @@ done
%changelog
+* Sun Apr 27 2025 Leigh Scott <leigh123linux(a)gmail.com> - 3:575.51.02-2
+- Fix build for open module with 6.15rc kernel
+
+* Sat Apr 19 2025 Leigh Scott <leigh123linux(a)gmail.com> - 3:575.51.02-2
+- Patch for 6.15rc kernel
+
* Wed Apr 16 2025 Leigh Scott <leigh123linux(a)gmail.com> - 3:575.51.02-1
- Update to 575.51.02 beta
1 day, 9 hours
[telegram-desktop] Fix build with Qt 6.9
by Leigh Scott
commit e40ac0a0fbe31ed934305ffd61bfd2f9a3e3ad70
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sat Apr 26 16:40:12 2025 +0100
Fix build with Qt 6.9
qt-6.9.patch | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++
telegram-desktop.spec | 1 +
2 files changed, 62 insertions(+)
---
diff --git a/qt-6.9.patch b/qt-6.9.patch
new file mode 100644
index 0000000..4e8b170
--- /dev/null
+++ b/qt-6.9.patch
@@ -0,0 +1,61 @@
+From 55deb31dff2a2bbda5124d2500ebbc7150724e6b Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010(a)ya.ru>
+Date: Fri, 4 Apr 2025 23:33:40 +0000
+Subject: [PATCH] Fix a PiP crash with Qt 6.9
+
+---
+ Telegram/SourceFiles/media/view/media_view_pip.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/Telegram/SourceFiles/media/view/media_view_pip.cpp b/Telegram/SourceFiles/media/view/media_view_pip.cpp
+index 4e1d7c1360f188..7c8f958889ffc2 100644
+--- a/Telegram/SourceFiles/media/view/media_view_pip.cpp
++++ b/Telegram/SourceFiles/media/view/media_view_pip.cpp
+@@ -362,6 +362,10 @@ void PipPanel::init() {
+ ) | rpl::filter(rpl::mappers::_1) | rpl::start_with_next([=] {
+ // Workaround Qt's forced transient parent.
+ Ui::Platform::ClearTransientParent(widget());
++ }, rp()->lifetime());
++
++ rp()->shownValue(
++ ) | rpl::filter(rpl::mappers::_1) | rpl::start_with_next([=] {
+ Ui::Platform::SetWindowMargins(widget(), _padding);
+ }, rp()->lifetime());
+
+From c952da37294b958e896b27528e7834f0892faa0a Mon Sep 17 00:00:00 2001
+From: Antonio Rojas <arojas(a)archlinux.org>
+Date: Sat, 1 Mar 2025 01:20:04 +0100
+Subject: [PATCH] Fix build with Qt 6.9
+
+---
+ base/platform/linux/base_linux_xdp_utilities.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp b/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
+index 8aca67c9..80626af1 100644
+--- a/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
++++ b/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
+@@ -16,7 +16,11 @@
+ #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+ #include <qpa/qplatformintegration.h>
+ #include <private/qguiapplication_p.h>
++#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
++#include <private/qdesktopunixservices_p.h>
++#else
+ #include <private/qgenericunixservices_p.h>
++#endif // Qt >= 6.9.0
+ #endif // Qt >= 6.5.0
+
+ #include <sstream>
+@@ -39,7 +43,11 @@ std::string ParentWindowID(QWindow *window) {
+ }
+
+ #if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
++#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
++ if (const auto services = dynamic_cast<QDesktopUnixServices*>(
++#else
+ if (const auto services = dynamic_cast<QGenericUnixServices*>(
++#endif // Qt >= 6.9.0
+ QGuiApplicationPrivate::platformIntegration()->services())) {
+ return services->portalWindowIdentifier(window).toStdString();
+ }
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index 5fdad75..ff43628 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -24,6 +24,7 @@ License: GPL-3.0-or-later AND BSD-3-Clause AND BSD-2-Clause AND Apache-2.0 AND M
URL: https://github.com/telegramdesktop/%{appname}
Summary: Telegram Desktop official messaging app
Source0: %{url}/releases/download/v%{version}/%{appname}-%{version}-full.tar.gz
+Patch0: qt-6.9.patch
# Telegram Desktop require more than 8 GB of RAM on linking stage.
# Disabling all low-memory architectures.
2 days, 4 hours
[discord/f40] Update to 0.0.92
by Sérgio M. Basto
Summary of changes:
2a5a654... Update to 0.0.92 (*)
(*) This commit already existed in another branch; no separate mail sent
3 days, 1 hour
[discord/f41] Update to 0.0.92
by Sérgio M. Basto
Summary of changes:
2a5a654... Update to 0.0.92 (*)
(*) This commit already existed in another branch; no separate mail sent
3 days, 1 hour