Code Monkey home page Code Monkey logo

Comments (4)

svavassori avatar svavassori commented on August 15, 2024 1

+1

from xtrx_linux_pcie_drv.

hax0rbana-adam avatar hax0rbana-adam commented on August 15, 2024

Below is the patch to fix this issue. For reference, here's the thread about this change on the Linux Kernel mailing list: https://lore.kernel.org/lkml/[email protected]/T/

--- /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/xtrx.c  2023-08-02 23:31:16.843423689 -0500
+++ /var/lib/dkms/xtrx/0.0.1+git20190320.5ae3a3e-3.2/build/xtrx.c       2023-08-02 23:32:22.432850822 -0500
@@ -1072,7 +1072,7 @@
                        return -EINVAL;
                }
                //vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-               vma->vm_flags |= VM_LOCKED;
+               vm_flags_set(vma, VM_LOCKED);
 
                if (remap_pfn_range(vma, vma->vm_start,
                                                        virt_to_phys((void*)((unsigned long)xtrxdev->shared_mmap)) >> PAGE_SHIFT,
@@ -1087,7 +1087,7 @@
                unsigned long pfn;
                int bar = (region == REGION_CTRL) ? 0 : 1;
                vma->vm_page_prot = pgprot_device(vma->vm_page_prot);
-               vma->vm_flags |= VM_IO;
+               vm_flags_set(vma, VM_IO);
                pfn = pci_resource_start(xtrxdev->pdev, bar) >> PAGE_SHIFT;
 
                if (io_remap_pfn_range(vma, vma->vm_start, pfn,
@@ -1112,7 +1112,7 @@
                }
 
                //vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
-               vma->vm_flags |= VM_LOCKED;
+               vm_flags_set(vma, VM_LOCKED);
 
                for (i = 0, off = 0; i < BUFS; ++i, off += bufsize) {
 #ifdef VA_DMA_ADDR_FIXUP

from xtrx_linux_pcie_drv.

hax0rbana-adam avatar hax0rbana-adam commented on August 15, 2024

I submitted a pull request for this. #18

There's a superior pull request that was already submitted by @myriadrf but I failed to check before submitting my fix (oops).

If this repo is still being maintained, please merge in #17 so Linux Surface users can upgrade to the latest kernel.

from xtrx_linux_pcie_drv.

hax0rbana-adam avatar hax0rbana-adam commented on August 15, 2024

And I can also confirm that downgrading Linux to 6.2.10-surface works around this issue.

When linux-image-surface is installed, it currently uses linux-image-6.4.7-surface, which is why this happens to everyone running Linux on their surface by default.

from xtrx_linux_pcie_drv.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.