Skip to content

Backport changes on 5.6 to 5.4 #46

Closed

Description

@qzed

Backport newer changes to 5.4, especially the new IPTS driver. This is motivated by a discussion on Gitter. Basically, on the Pro 7 there seem to be some upstream issues with the iGPU, causing freezes on v5.5+. It would thus help some people to have patches including the latest wifi fixes and IPTS driver on v5.4, even if we don't build binary releases.

We should probably remove the old 5.4 branch and start fresh based on the 5.6 patches.

Activity

  1. kitakar5525 commented on May 15, 2020

    @kitakar5525
    Member

    All of the commits from me that is relevant to v5.4 are applied to v5.4

    I guess starting freshly may not be needed but I'll leave it to you.

    Regarding the other commits, as far as I know:

    backported by upstream

    ioremap_uc

    • (EDIT:) "mfd: intel-lpss: Use devm_ioremap_uc for MMIO" (ours: f3e1eb2) has been backported on v5.4.40 as 1bc508b
    • "lib: devres: add a helper function for ioremap_uc" (ours: 04f6483) has been backported on v5.4.40 as 78b19f5
    • "sparc64: implement ioremap_uc" (ours: fa03b4c) has been backported on v5.4.3 as c3277e6

    hid

    • "HID: Improve Windows Precision Touchpad detection." (ours: 09f1c1c) has been backported on v5.4.8 as 65889bb

    missing

    surface-sam

    • commit 08e8fc4 ("surface_acpi: Add HPS dependency on GPIO_SYSFS in KConfig") is missing
    • commit fa33900 ("surface_acpi: Update based on module") is missing

    ipts: all of the commits are missing

    • there is small conflict on commit 72eb208 ("uapi: Add MEI bus ID") but easily resolved by auto-merging or something
    • ipts driver actually works on v5.4
  2. kitakar5525 commented on May 15, 2020

    @kitakar5525
    Member

    So, functionally, all of the ioremap_ucpatches are included on v5.4 (and also on v4.19 [1]) recently.

    v5.4-surface-devel and v4.19-surface-devel has the additional docs patch: "docs: driver-model: add devm_ioremap_uc" but not on upstream v5.4 and v4.19 (at least yet?)

    [1]
    btw, the following commits are also backported into v4.19:

    • "mfd: intel-lpss: Use devm_ioremap_uc for MMIO" (ours: d63f165) is also backported on v4.19.122 as e06a899
    • "lib: devres: add a helper function for ioremap_uc" (ours: 32bfaf2) is also backported on v4.19.122 as ccc4433
  3. qzed commented on May 16, 2020

    @qzed
    MemberAuthor

    Thanks! I'll probably have a go at this later. Seems like its probably easier to update the current 5.4. I think the docs commit will not be backported as its just for documentation. It's not important for functionality.

  4. qzed commented on May 16, 2020

    @qzed
    MemberAuthor

    v5.4-surface-devel should be up to date now. Have yet to test it.

  5. qzed commented on May 16, 2020

    @qzed
    MemberAuthor

    There was a merge conflict when rebasing onto v5.4.41, so I've force-pushed the rebased to 5.4-surface-devel so that we don't have to deal with that again in the future.

  6. kitakar5525 commented on May 18, 2020

    @kitakar5525
    Member

    I built 5.4.41 Arch kernel myself. It's working properly regarding linux-surface patches.

    Also, current v5.4-surface-devel branch looks good to me, except the following difference to v5.4-surface:

    $ git diff v5.4-surface-devel v5.4-surface
    diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
    index 92628fdc2f11..a100bef54952 100644
    --- a/Documentation/driver-api/driver-model/devres.rst
    +++ b/Documentation/driver-api/driver-model/devres.rst
    @@ -314,7 +314,6 @@ IOMAP
       devm_ioport_unmap()
       devm_ioremap()
       devm_ioremap_nocache()
    -  devm_ioremap_uc()
       devm_ioremap_wc()
       devm_ioremap_resource() : checks resource, requests memory region, ioremaps
       devm_iounmap()
    diff --git a/drivers/input/touchscreen/ipts/init.c b/drivers/input/touchscreen/ipts/init.c
    index fb70d55542af..6c2dcd88ce07 100644
    --- a/drivers/input/touchscreen/ipts/init.c
    +++ b/drivers/input/touchscreen/ipts/init.c
    @@ -1,6 +1,5 @@
     // SPDX-License-Identifier: GPL-2.0-or-later
     
    -#include <linux/dma-mapping.h>
     #include <linux/mei_cl_bus.h>
     #include <linux/module.h>
     #include <linux/mod_devicetable.h>
    @@ -21,17 +20,6 @@ static int ipts_init_probe(struct mei_cl_device *cldev,
     
            dev_info(&cldev->dev, "Probing IPTS\n");
     
    -       // Setup the DMA bit mask
    -       if (!dma_coerce_mask_and_coherent(&cldev->dev, DMA_BIT_MASK(64))) {
    -               dev_info(&cldev->dev, "IPTS using DMA_BIT_MASK(64)\n");
    -       } else if (!dma_coerce_mask_and_coherent(&cldev->dev,
    -                       DMA_BIT_MASK(32))) {
    -               dev_info(&cldev->dev, "IPTS using DMA_BIT_MASK(32)");
    -       } else {
    -               dev_err(&cldev->dev, "No suitable DMA for IPTS available\n");
    -               return -EFAULT;
    -       }
    -
            ret = mei_cldev_enable(cldev);
            if (ret) {
                    dev_err(&cldev->dev, "Cannot enable IPTS\n");
    • I guess docs patch for ioremap_uc is intentionally dropped?
    • wrt the DMA thing, those lines don't exist on v5.4-surface but exist on generated patches on linux-surface repo. So, I guess some accident happened?
      btw, on SB1, ipts works with those DMA lines (built kernel with patches from linux-surface repo).
      EDIT: ah, ok. I haven't read discussion on irc correctly. this commit linux-surface/intel-precise-touch@a3e443c caused issue on 5.4, so the commit isn't applied on 5.4. So, what is not updated is v5.4-surface.
  7. qzed commented on May 18, 2020

    @qzed
    MemberAuthor

    The ioremap_uc doc is intentionally dropped, yes. Without the doc patch we don't need to have a separate patch for ioremap_uc.

    I forgot to push the DMA change, so it didn't end up in v5.4-surface. Thanks for noticing! Should be fixed now.

    Also thanks for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C: enhancementCategory: New feature or requestP: highPriority: High priority

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions