Skip to content
  1. Jul 17, 2020
    • Ravi Bangoria's avatar
      libsubcmd: Fix OPT_CALLBACK_SET() · a2db71b9
      Ravi Bangoria authored
      Any option macro with _SET suffix should set opt->set variable which is
      not happening for OPT_CALLBACK_SET(). This is causing issues with perf
      record --switch-output-event. Fix that.
      
      Before:
      
        # ./perf record --overwrite -e sched:*switch,syscalls:sys_enter_mmap \
                 --switch-output-event syscalls:sys_enter_mmap
        ^C[ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.297 MB perf.data (657 samples) ]
      
      After:
      
        $ ./perf record --overwrite -e sched:*switch,syscalls:sys_enter_mmap \
                --switch-output-event syscalls:sys_enter_mmap
        [ perf record: dump data: Woken up 1 times ]
        [ perf record: Dump perf.data.2020061918144542 ]
        [ perf record: dump data: Woken up 1 times ]
        [ perf record: Dump perf.data.2020061918144608 ]
        [ perf record: dump data: Woken up 1 times ]
        [ perf record: Dump perf.data.2020061918144660 ]
        ^C[ perf record: dump data: Woken up 1 times ]
        [ perf record: Dump perf.data.2020061918144784 ]
        [ perf record: Woken up 0 times to write data ]
        [ perf record: Dump perf.data.2020061918144803 ]
        [ perf record: Captured and wrote 0.419 MB perf.data.<timestamp> ]
      
      Fixes: 636eb4d0
      
       ("libsubcmd: Introduce OPT_CALLBACK_SET()")
      Signed-off-by: default avatarRavi Bangoria <ravi.bangoria@linux.ibm.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Link: http://lore.kernel.org/lkml/20200619133412.50705-1-ravi.bangoria@linux.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a2db71b9
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-07-17-1' of git://anongit.freedesktop.org/drm/drm into master · 88825726
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Weekly fixes pull, big bigger than I'd normally like, but they are
        fairly scattered and small individually.
      
        The vmwgfx one is a black screen regression, otherwise the largest is
        an MST encoder fix for amdgpu which results in a WARN in some cases,
        and a scattering of i915 fixes.
      
        I'm tracking two regressions at the moment that hopefully we get
        nailed down this week for rc7.
      
        dma-buf:
         - sleeping atomic fix
      
        amdgpu:
         - Fix a race condition with KIQ
         - Preemption fix
         - Fix handling of fake MST encoders
         - OLED panel fix
         - Handle allocation failure in stream construction
         - Renoir SMC fix
         - SDMA 5.x fix
      
        i915:
         - FBC w/a stride fix
         - Fix use-after-free fix on module reload
         - Ignore irq enabling on the virtual engines to fix device sleep
         - Use GTT when saving/restoring engine GPR
         - Fix selftest sort function
      
        vmwgfx:
         - black screen fix
      
        aspeed:
         - fbcon init warn fix"
      
      * tag 'drm-fixes-2020-07-17-1' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu/sdma5: fix wptr overwritten in ->get_wptr()
        drm/amdgpu/powerplay: Modify SMC message name for setting power profile mode
        drm/amd/display: handle failed allocation during stream construction
        drm/amd/display: OLED panel backlight adjust not work with external display connected
        drm/amdgpu/display: create fake mst encoders ahead of time (v4)
        drm/amdgpu: fix preemption unit test
        drm/amdgpu/gfx10: fix race condition for kiq
        drm/i915: Recalculate FBC w/a stride when needed
        drm/i915: Move cec_notifier to intel_hdmi_connector_unregister, v2.
        drm/i915/gt: Only swap to a random sibling once upon creation
        drm/i915/gt: Ignore irq enabling on the virtual engines
        drm/i915/perf: Use GTT when saving/restoring engine GPR
        drm/i915/selftests: Fix compare functions provided for sorting
        drm/vmwgfx: fix update of display surface when resolution changes
        dmabuf: use spinlock to access dmabuf->name
        drm/aspeed: Call drm_fbdev_generic_setup after drm_dev_register
      88825726
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.8-2020-07-15' of... · adbe8a3c
      Dave Airlie authored
      
      Merge tag 'amd-drm-fixes-5.8-2020-07-15' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.8-2020-07-15:
      
      amdgpu:
      - Fix a race condition with KIQ
      - Preemption fix
      - Fix handling of fake MST encoders
      - OLED panel fix
      - Handle allocation failure in stream construction
      - Renoir SMC fix
      - SDMA 5.x fix
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200715213914.3994-1-alexander.deucher@amd.com
      adbe8a3c
    • Linus Torvalds's avatar
      Merge tag 'pm-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into master · 07a56bb8
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "Add missing handling of a command line switch to the intel_pstate
        driver (Rafael Wysocki) and fix the freeing of the operating
        performance point (OPP) entries for the legacy (v1) OPP table type
        (Walter Lozano)"
      
      * tag 'pm-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        opp: Increase parsed_static_opps in _of_add_opp_table_v1()
        cpufreq: intel_pstate: Fix active mode setting from command line
      07a56bb8
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.8-rc6' of... · 3e543a4d
      Linus Torvalds authored
      Merge tag 'char-misc-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc into master
      
      Pull char/misc fixes from Greg KH:
       "Here are number of small char/misc driver fixes for 5.8-rc6
      
        Not that many complex fixes here, just a number of small fixes for
        reported issues, and some new device ids. Nothing fancy.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'char-misc-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (21 commits)
        virtio: virtio_console: add missing MODULE_DEVICE_TABLE() for rproc serial
        intel_th: Fix a NULL dereference when hub driver is not loaded
        intel_th: pci: Add Emmitsburg PCH support
        intel_th: pci: Add Tiger Lake PCH-H support
        intel_th: pci: Add Jasper Lake CPU support
        virt: vbox: Fix guest capabilities mask check
        virt: vbox: Fix VBGL_IOCTL_VMMDEV_REQUEST_BIG and _LOG req numbers to match upstream
        uio_pdrv_genirq: fix use without device tree and no interrupt
        uio_pdrv_genirq: Remove warning when irq is not specified
        coresight: etmv4: Fix CPU power management setup in probe() function
        coresight: cti: Fix error handling in probe
        Revert "zram: convert remaining CLASS_ATTR() to CLASS_ATTR_RO()"
        mei: bus: don't clean driver pointer
        misc: atmel-ssc: lock with mutex instead of spinlock
        phy: sun4i-usb: fix dereference of pointer phy0 before it is null checked
        phy: rockchip: Fix return value of inno_dsidphy_probe()
        phy: ti: j721e-wiz: Constify structs
        phy: ti: am654-serdes: Constify regmap_config
        phy: intel: fix enum type mismatch warning
        phy: intel: Fix compilation error on FIELD_PREP usage
        ...
      3e543a4d
    • Linus Torvalds's avatar
      Merge tag 'driver-core-5.8-rc6' of... · 50ad1c21
      Linus Torvalds authored
      Merge tag 'driver-core-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into master
      
      Pull driver core fixes from Greg KH:
       "Here are 3 driver core fixes for 5.8-rc6.
      
        They resolve some issues found with the deferred probe code for some
        types of devices on some embedded systems. They have been tested a
        bunch and have been in linux-next for a while with no reported issues"
      
      * tag 'driver-core-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
        driver core: Avoid deferred probe due to fw_devlink_pause/resume()
        driver core: Rename dev_links_info.defer_sync to defer_hook
        driver core: Don't do deferred probe in parallel with kernel_init thread
      50ad1c21
    • Linus Torvalds's avatar
      Merge tag 'staging-5.8-rc6' of... · 6a058f0b
      Linus Torvalds authored
      Merge tag 'staging-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging into master
      
      Pull IIO and staging driver fixes from Greg KH:
       "Here are some IIO and staging driver fixes for 5.8-rc6.
      
        The majority of fixes are for IIO drivers, resolving a number of small
        reported issues, and there are some counter fixes in here too that
        were tied to the IIO fixes. There's only one staging driver fix here,
        a comedi fix found by code inspection.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'staging-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        staging: comedi: verify array index is correct before using it
        iio: adc: ad7780: Fix a resource handling path in 'ad7780_probe()'
        iio:pressure:ms5611 Fix buffer element alignment
        iio:humidity:hts221 Fix alignment and data leak issues
        iio:humidity:hdc100x Fix alignment and data leak issues
        iio:magnetometer:ak8974: Fix alignment and data leak issues
        iio: adc: adi-axi-adc: Fix object reference counting
        iio: pressure: zpa2326: handle pm_runtime_get_sync failure
        counter: 104-quad-8: Add lock guards - filter clock prescaler
        counter: 104-quad-8: Add lock guards - differential encoder
        iio: core: add missing IIO_MOD_H2/ETHANOL string identifiers
        iio: magnetometer: ak8974: Fix runtime PM imbalance on error
        iio: mma8452: Add missed iio_device_unregister() call in mma8452_probe()
        iio:health:afe4404 Fix timestamp alignment and prevent data leak.
        iio:health:afe4403 Fix timestamp alignment and prevent data leak.
      6a058f0b
    • Linus Torvalds's avatar
      Merge tag 'tty-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty into master · 7531ee31
      Linus Torvalds authored
      Pull tty/serial driver fixes from Greg KH:
       :Here are some small tty and serial driver fixes for 5.8-rc6.
      
        The largest set of patches in here is a revert of the sysrq changes
        that went into 5.8-rc1 but turned out to cause a noticable overhead
        and cpu usage.
      
        Other than that, there's a few small serial driver fixes to resolve
        reported issues, and finally resolving the spinlock init problem on
        many serial driver consoles.
      
        All of these have been in linux-next for a while with no reported
        issues"
      
      * tag 'tty-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial: core: Initialise spin lock before use in uart_configure_port()
        serial: mxs-auart: add missed iounmap() in probe failure and remove
        serial: sh-sci: Initialize spinlock for uart console
        Revert "tty: xilinx_uartps: Fix missing id assignment to the console"
        serial: core: drop redundant sysrq checks
        serial: core: fix sysrq overhead regression
        Revert "serial: core: Refactor uart_unlock_and_check_sysrq()"
        tty/serial: fix serial_core.c kernel-doc warnings
        tty: serial: cpm_uart: Fix behaviour for non existing GPIOs
      7531ee31
    • Linus Torvalds's avatar
      Merge tag 'thermal-v5.8-rc6' of... · 7e8d2f6d
      Linus Torvalds authored
      Merge tag 'thermal-v5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux into master
      
      Pull thermal fixes from Daniel Lezcano:
      
       - Fix invalid index array access on int340x_thermal leading to a kernel
         panic (Bartosz Szczepanek)
      
       - Fix debug message level to prevent flooding on some platform (Alex
         Hung)
      
       - Fix invalid bank access by reverting "thermal: mediatek: fix register
         index error" (Enric Balletbo i Serra)
      
      * tag 'thermal-v5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
        Revert "thermal: mediatek: fix register index error"
        thermal: int3403_thermal: Downgrade error message
        thermal/int340x_thermal: Prevent page fault on .set_mode() op
      7e8d2f6d
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpufreq' · 1740f21a
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: intel_pstate: Fix active mode setting from command line
      1740f21a
  2. Jul 16, 2020
    • Rafael J. Wysocki's avatar
      Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm · a6c99daa
      Rafael J. Wysocki authored
      Pull an operating performance points (OPP) framework fix for 5.8-rc6 from
      Viresh Kumar:
      
      "This fixes freeing of the OPP entries for the legacy OPP table type (v1)."
      
      * 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
        opp: Increase parsed_static_opps in _of_add_opp_table_v1()
      a6c99daa
    • Walter Lozano's avatar
      opp: Increase parsed_static_opps in _of_add_opp_table_v1() · 6544abc5
      Walter Lozano authored
      Currently, when using _of_add_opp_table_v2 parsed_static_opps is
      increased and this value is used in _opp_remove_all_static() to
      check if there are static opp entries that need to be freed.
      Unfortunately this does not happen when using _of_add_opp_table_v1(),
      which leads to warnings.
      
      This patch increases parsed_static_opps in _of_add_opp_table_v1() in a
      similar way as in _of_add_opp_table_v2().
      
      Fixes: 03758d60
      
       ("opp: Replace list_kref with a local counter")
      Cc: v5.6+ <stable@vger.kernel.org> # v5.6+
      Signed-off-by: default avatarWalter Lozano <walter.lozano@collabora.com>
      [ Viresh: Do the operation with lock held and set the value to 1 instead
      	  of incrementing it ]
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      6544abc5
    • Linus Torvalds's avatar
      Merge tag 'clk-fixes-for-linus' of... · f8456690
      Linus Torvalds authored
      Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux into master
      
      Pull clk fixes from Stephen Boyd:
       "A couple build fixes for issues exposed this merge window and a fix
        for the eMMC clk on AST2600 SoCs that fixes the rate that is
        calculated by the clk framework"
      
      * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux:
        clk: Specify IOMEM dependency for HSDK pll driver
        clk: AST2600: Add mux for EMMC clock
        clk: mvebu: ARMADA_AP_CPU_CLK needs to select ARMADA_AP_CP_HELPER
      f8456690
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2020-07-15' of... · 524d4f71
      Dave Airlie authored
      
      Merge tag 'drm-intel-fixes-2020-07-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v5.8-rc6:
      - FBC w/a stride fix
      - Fix use-after-free fix on module reload
      - Ignore irq enabling on the virtual engines to fix device sleep
      - Use GTT when saving/restoring engine GPR
      - Fix selftest sort function
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87ft9t0vtt.fsf@intel.com
      524d4f71
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2020-07-15' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 03d54ef0
      Dave Airlie authored
      
      
       * aspeed: setup fbdev console after registering device; avoids warning
         and stacktrace in dmesg log
       * dmabuf: protect dmabuf->name with a spinlock; avoids sleeping in
         atomic context
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Thomas Zimmermann <tzimmermann@suse.de>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200715171756.GA18606@linux-uq9g
      03d54ef0
    • Dave Airlie's avatar
      Merge branch 'vmwgfx-fixes-5.8' of git://people.freedesktop.org/~sroland/linux into drm-fixes · 8257a0d9
      Dave Airlie authored
      
      
      fix for black screens
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: "Roland Scheidegger (VMware)" <rscheidegger.oss@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200715161843.21118-1-rscheidegger.oss@gmail.com
      8257a0d9
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v5.8-2' of... · 994e99a9
      Linus Torvalds authored
      Merge tag 'platform-drivers-x86-v5.8-2' of git://git.infradead.org/linux-platform-drivers-x86 into master
      
      Pull x86 platform driver fixes from Andriy Shevchenko:
       "Small fixes for this cycle:
      
         - Fix procfs handling in Thinkpad ACPI driver
      
         - Fix battery management on new ASUS laptops
      
         - New IDs (Sapphire Rapids) in ISST tool"
      
      * tag 'platform-drivers-x86-v5.8-2' of git://git.infradead.org/linux-platform-drivers-x86:
        platform/x86: asus-wmi: allow BAT1 battery name
        platform/x86: ISST: Add new PCI device ids
        platform/x86: thinkpad_acpi: Revert "Use strndup_user() in dispatch_proc_write()"
      994e99a9
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.8-rc6' of... · 0665a4e9
      Linus Torvalds authored
      Merge tag 'dmaengine-fix-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine into master
      
      Pull dmaengine fixes from Vinod Koul:
      
       - update dmaengine tree location to kernel.org
      
       - dmatest fix for completing threads
      
       - driver fixes for k3dma, fsl-dma, idxd, ,tegra, and few other drivers
      
      * tag 'dmaengine-fix-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (21 commits)
        dmaengine: ioat setting ioat timeout as module parameter
        dmaengine: fsl-edma: fix wrong tcd endianness for big-endian cpu
        dmaengine: dmatest: stop completed threads when running without set channel
        dmaengine: fsl-edma-common: correct DSIZE_32BYTE
        dmaengine: dw: Initialize channel before each transfer
        dmaengine: idxd: fix misc interrupt handler thread unmasking
        dmaengine: idxd: cleanup workqueue config after disabling
        dmaengine: tegra210-adma: Fix runtime PM imbalance on error
        dmaengine: mcf-edma: Fix NULL pointer exception in mcf_edma_tx_handler
        dmaengine: fsl-edma: Fix NULL pointer exception in fsl_edma_tx_handler
        dmaengine: fsl-edma: Add lockdep assert for exported function
        dmaengine: idxd: fix hw descriptor fields for delta record
        dmaengine: ti: k3-udma: add missing put_device() call in of_xudma_dev_get()
        dmaengine: sh: usb-dmac: set tx_result parameters
        dmaengine: ti: k3-udma: Fix delayed_work usage for tx drain workaround
        dmaengine: idxd: fix cdev locking for open and release
        dmaengine: imx-sdma: Fix: Remove 'always true' comparison
        MAINTAINERS: switch dmaengine tree to kernel.org
        dmaengine: ti: k3-udma: Fix the running channel handling in alloc_chan_resources
        dmaengine: ti: k3-udma: Fix cleanup code for alloc_chan_resources
        ...
      0665a4e9
    • Wei Yongjun's avatar
      keys: asymmetric: fix error return code in software_key_query() · 6cbba1f9
      Wei Yongjun authored
      Fix to return negative error code -ENOMEM from kmalloc() error handling
      case instead of 0, as done elsewhere in this function.
      
      Fixes: f1774cb8
      
       ("X.509: parse public key parameters from x509 for akcipher")
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      6cbba1f9
    • David Howells's avatar
      afs: Fix interruption of operations · 811f04ba
      David Howells authored
      The afs filesystem driver allows unstarted operations to be cancelled by
      signal, but most of these can easily be restarted (mkdir for example).  The
      primary culprits for reproducing this are those applications that use
      SIGALRM to display a progress counter.
      
      File lock-extension operation is marked uninterruptible as we have a
      limited time in which to do it, and the release op is marked
      uninterruptible also as if we fail to unlock a file, we'll have to wait 20
      mins before anyone can lock it again.
      
      The store operation logs a warning if it gets interruption, e.g.:
      
      	kAFS: Unexpected error from FS.StoreData -4
      
      because it's run from the background - but it can also be run from
      fdatasync()-type things.  However, store options aren't marked
      interruptible at the moment.
      
      Fix this in the following ways:
      
       (1) Mark store operations as uninterruptible.  It might make sense to
           relax this for certain situations, but I'm not sure how to make sure
           that background store ops aren't affected by signals to foreground
           processes that happen to trigger them.
      
       (2) In afs_get_io_locks(), where we're getting the serialisation lock for
           talking to the fileserver, return ERESTARTSYS rather than EINTR
           because a lot of the operations (e.g. mkdir) are restartable if we
           haven't yet started sending the op to the server.
      
      Fixes: e49c7b2f
      
       ("afs: Build an abstraction around an "operation" concept")
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      811f04ba
  3. Jul 15, 2020
    • Vasiliy Kupriakov's avatar
      platform/x86: asus-wmi: allow BAT1 battery name · 9a33e375
      Vasiliy Kupriakov authored
      
      
      The battery on my laptop ASUS TUF Gaming FX706II is named BAT1.
      This patch allows battery extension to load.
      
      Signed-off-by: default avatarVasiliy Kupriakov <rublag-ns@yandex.ru>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      9a33e375
    • Srinivas Pandruvada's avatar
      platform/x86: ISST: Add new PCI device ids · e1eea3f8
      Srinivas Pandruvada authored
      
      
      Added new PCI device ids for supporting mailbox and MMIO interface for
      Sapphire Rapids.
      
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      e1eea3f8
    • Andy Shevchenko's avatar
      platform/x86: thinkpad_acpi: Revert "Use strndup_user() in dispatch_proc_write()" · e2e90804
      Andy Shevchenko authored
      This reverts commit 35d13c7a.
      
      This broke procfs interface due to neglecting the fact that
      the strings are not coming NULL terminated.
      
      Revert the change till we will have a better clean up.
      
      Fixes: 35d13c7a
      
       ("platform/x86: thinkpad_acpi: Use strndup_user() in dispatch_proc_write()")
      Reported-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      e2e90804
    • Enric Balletbo i Serra's avatar
      Revert "thermal: mediatek: fix register index error" · a8f62f18
      Enric Balletbo i Serra authored
      This reverts commit eb9aecd9
      
      The above patch is supposed to fix a register index error on mt2701. It
      is not clear if the problem solved is a hang or just an invalid value
      returned, my guess is the second. The patch introduces, though, a new
      hang on MT8173 device making them unusable. So, seems reasonable, revert
      the patch because introduces a worst issue.
      
      The reason I send a revert instead of trying to fix the issue for MT8173
      is because the information needed to fix the issue is in the datasheet
      and is not public. So I am not really able to fix it.
      
      Fixes the following bug when CONFIG_MTK_THERMAL is set on MT8173
      devices.
      
      [    2.222488] Unable to handle kernel paging request at virtual address ffff8000125f5001
      [    2.230421] Mem abort info:
      [    2.233207]   ESR = 0x96000021
      [    2.236261]   EC = 0x25: DABT (current EL), IL = 32 bits
      [    2.241571]   SET = 0, FnV = 0
      [    2.244623]   EA = 0, S1PTW = 0
      [    2.247762] Data abort info:
      [    2.250640]   ISV = 0, ISS = 0x00000021
      [    2.254473]   CM = 0, WnR = 0
      [    2.257544] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000041850000
      [    2.264251] [ffff8000125f5001] pgd=000000013ffff003, pud=000000013fffe003, pmd=000000013fff9003, pte=006800001100b707
      [    2.274867] Internal error: Oops: 96000021 [#1] PREEMPT SMP
      [    2.280432] Modules linked in:
      [    2.283483] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.7.0-rc6+ #162
      [    2.289914] Hardware name: Google Elm (DT)
      [    2.294003] pstate: 20000005 (nzCv daif -PAN -UAO)
      [    2.298792] pc : mtk_read_temp+0xb8/0x1c8
      [    2.302793] lr : mtk_read_temp+0x7c/0x1c8
      [    2.306794] sp : ffff80001003b930
      [    2.310100] x29: ffff80001003b930 x28: 0000000000000000
      [    2.315404] x27: 0000000000000002 x26: ffff0000f9550b10
      [    2.320709] x25: ffff0000f9550a80 x24: 0000000000000090
      [    2.326014] x23: ffff80001003ba24 x22: 00000000610344c0
      [    2.331318] x21: 0000000000002710 x20: 00000000000001f4
      [    2.336622] x19: 0000000000030d40 x18: ffff800011742ec0
      [    2.341926] x17: 0000000000000001 x16: 0000000000000001
      [    2.347230] x15: ffffffffffffffff x14: ffffff0000000000
      [    2.352535] x13: ffffffffffffffff x12: 0000000000000028
      [    2.357839] x11: 0000000000000003 x10: ffff800011295ec8
      [    2.363143] x9 : 000000000000291b x8 : 0000000000000002
      [    2.368447] x7 : 00000000000000a8 x6 : 0000000000000004
      [    2.373751] x5 : 0000000000000000 x4 : ffff800011295cb0
      [    2.379055] x3 : 0000000000000002 x2 : ffff8000125f5001
      [    2.384359] x1 : 0000000000000001 x0 : ffff0000f9550a80
      [    2.389665] Call trace:
      [    2.392105]  mtk_read_temp+0xb8/0x1c8
      [    2.395760]  of_thermal_get_temp+0x2c/0x40
      [    2.399849]  thermal_zone_get_temp+0x78/0x160
      [    2.404198]  thermal_zone_device_update.part.0+0x3c/0x1f8
      [    2.409589]  thermal_zone_device_update+0x34/0x48
      [    2.414286]  of_thermal_set_mode+0x58/0x88
      [    2.418375]  thermal_zone_of_sensor_register+0x1a8/0x1d8
      [    2.423679]  devm_thermal_zone_of_sensor_register+0x64/0xb0
      [    2.429242]  mtk_thermal_probe+0x690/0x7d0
      [    2.433333]  platform_drv_probe+0x5c/0xb0
      [    2.437335]  really_probe+0xe4/0x448
      [    2.440901]  driver_probe_device+0xe8/0x140
      [    2.445077]  device_driver_attach+0x7c/0x88
      [    2.449252]  __driver_attach+0xac/0x178
      [    2.453082]  bus_for_each_dev+0x78/0xc8
      [    2.456909]  driver_attach+0x2c/0x38
      [    2.460476]  bus_add_driver+0x14c/0x230
      [    2.464304]  driver_register+0x6c/0x128
      [    2.468131]  __platform_driver_register+0x50/0x60
      [    2.472831]  mtk_thermal_driver_init+0x24/0x30
      [    2.477268]  do_one_initcall+0x50/0x298
      [    2.481098]  kernel_init_freeable+0x1ec/0x264
      [    2.485450]  kernel_init+0x1c/0x110
      [    2.488931]  ret_from_fork+0x10/0x1c
      [    2.492502] Code: f9401081 f9400402 b8a67821 8b010042 (b9400042)
      [    2.498599] ---[ end trace e43e3105ed27dc99 ]---
      [    2.503367] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
      [    2.511020] SMP: stopping secondary CPUs
      [    2.514941] Kernel Offset: disabled
      [    2.518421] CPU features: 0x090002,25006005
      [    2.522595] Memory Limit: none
      [    2.525644] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--
      
      Cc: Michael Kao <michael.kao@mediatek.com>
      Fixes: eb9aecd9
      
       ("thermal: mediatek: fix register index error")
      Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
      Reviewed-by: default avatarMatthias Brugger <matthias.bgg@gmail.com>
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Link: https://lore.kernel.org/r/20200707103412.1010823-1-enric.balletbo@collabora.com
      a8f62f18
    • Alex Hung's avatar
      thermal: int3403_thermal: Downgrade error message · f3d7fb38
      Alex Hung authored
      
      
      Downgrade "Unsupported event" message from dev_err to dev_dbg to avoid
      flooding with this message on some platforms.
      
      Cc: stable@vger.kernel.org # v5.4+
      Suggested-by: default avatarZhang Rui <rui.zhang@intel.com>
      Signed-off-by: default avatarAlex Hung <alex.hung@canonical.com>
      [ rzhang: fix typo in changelog ]
      Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
      Link: https://lore.kernel.org/r/20200615223957.183153-1-alex.hung@canonical.com
      f3d7fb38
    • Xiaojie Yuan's avatar
      drm/amdgpu/sdma5: fix wptr overwritten in ->get_wptr() · 05051496
      Xiaojie Yuan authored
      
      
      "u64 *wptr" points to the the wptr value in write back buffer and
      "*wptr = (*wptr) >> 2;" results in the value being overwritten each time
      when ->get_wptr() is called.
      
      umr uses /sys/kernel/debug/dri/0/amdgpu_ring_sdma0 to get rptr/wptr and
      decode ring content and it is affected by this issue.
      
      fix and simplify the logic similar as sdma_v4_0_ring_get_wptr().
      
      v2: fix for sdma5.2 as well
      v3: drop sdma 5.2 changes for 5.8 and stable
      
      Suggested-by: default avatarLe Ma <le.ma@amd.com>
      Signed-off-by: default avatarXiaojie Yuan <xiaojie.yuan@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      05051496
    • chen gong's avatar
      drm/amdgpu/powerplay: Modify SMC message name for setting power profile mode · 98a34cf9
      chen gong authored
      
      
      I consulted Cai Land(Chuntian.Cai@amd.com), he told me corresponding smc
      message name to fSMC_MSG_SetWorkloadMask() is
      "PPSMC_MSG_ActiveProcessNotify" in firmware code of Renoir.
      
      Strange though it may seem, but it's a fact.
      
      Signed-off-by: default avatarchen gong <curry.gong@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      98a34cf9
    • Josip Pavic's avatar
      drm/amd/display: handle failed allocation during stream construction · be73e608
      Josip Pavic authored
      
      
      [Why]
      Failing to allocate a transfer function during stream construction leads
      to a null pointer dereference
      
      [How]
      Handle the failed allocation by failing the stream construction
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJosip Pavic <Josip.Pavic@amd.com>
      Reviewed-by: default avatarAric Cyr <Aric.Cyr@amd.com>
      Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      be73e608
    • hersen wu's avatar
      drm/amd/display: OLED panel backlight adjust not work with external display connected · b448d30b
      hersen wu authored
      
      
      [Why]
      amdgpu_dm->backlight_caps is for single eDP only. the caps are upddated
      for very connector. Real eDP caps will be overwritten by other external
      display. For OLED panel, caps->aux_support is set to 1 for OLED pnael.
      after external connected, caps+.aux_support is set to 0. This causes
      OLED backlight adjustment not work.
      
      [How]
      within update_conector_ext_caps, backlight caps will be updated only for
      eDP connector.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarhersen wu <hersenxs.wu@amd.com>
      Reviewed-by: default avatarNicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
      Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      b448d30b
    • Alex Deucher's avatar
      drm/amdgpu/display: create fake mst encoders ahead of time (v4) · 31684701
      Alex Deucher authored
      Prevents a warning in the MST create connector case.
      
      v2: create global fake encoders rather per connector fake encoders
      to avoid running out of encoder indices.
      
      v3: use the actual number of crtcs on the asic rather than the max
      to conserve encoders.
      
      v4: v3 plus missing hunk I forgot to git add.
      
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1108
      Fixes: c6385e50
      
       ("drm/amdgpu: drop legacy drm load and unload callbacks")
      Reviewed-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org # 5.7.x
      31684701
    • Jack Xiao's avatar
      drm/amdgpu: fix preemption unit test · d845a205
      Jack Xiao authored
      
      
      Remove signaled jobs from job list and ensure the
      job was indeed preempted.
      
      Signed-off-by: default avatarJack Xiao <Jack.Xiao@amd.com>
      Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      d845a205
    • Jack Xiao's avatar
      drm/amdgpu/gfx10: fix race condition for kiq · 7d65a577
      Jack Xiao authored
      
      
      During preemption test for gfx10, it uses kiq to trigger
      gfx preemption, which would result in race condition
      with flushing TLB for kiq.
      
      Signed-off-by: default avatarJack Xiao <Jack.Xiao@amd.com>
      Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      7d65a577
    • Ville Syrjälä's avatar
      drm/i915: Recalculate FBC w/a stride when needed · 92e0575b
      Ville Syrjälä authored
      
      
      Currently we're failing to recalculate the gen9 FBC w/a stride
      unless something more drastic than just the modifier itself has
      changed. This often leaves us with FBC enabled with the linear
      fbdev framebuffer without the w/a stride enabled. That will cause
      an immediate underrun and FBC will get promptly disabled.
      
      Fix the problem by checking if the w/a stride is about to change,
      and go through the full dance if so. This part of the FBC code
      is still pretty much a disaster and will need lots more work.
      But this should at least fix the immediate issue.
      
      v2: Deactivate FBC when the modifier changes since that will
          likely require resetting the w/a CFB stride
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200711080336.13423-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      (cherry picked from commit 0428ab01
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      92e0575b
    • Maarten Lankhorst's avatar
      drm/i915: Move cec_notifier to intel_hdmi_connector_unregister, v2. · 6647e6cd
      Maarten Lankhorst authored
      
      
      This fixes the following KASAN splash on module reload:
      [  145.136327] ==================================================================
      [  145.136502] BUG: KASAN: use-after-free in intel_hdmi_destroy+0x74/0x80 [i915]
      [  145.136514] Read of size 8 at addr ffff888216641830 by task kworker/1:1/134
      
      [  145.136535] CPU: 1 PID: 134 Comm: kworker/1:1 Tainted: G     U          T 5.5.0-rc7-valkyria+ #5783
      [  145.136539] Hardware name: GIGABYTE GB-BKi3A-7100/MFLP3AP-00, BIOS F1 07/27/2016
      [  145.136546] Workqueue: events drm_connector_free_work_fn
      [  145.136551] Call Trace:
      [  145.136560]  dump_stack+0xa1/0xe0
      [  145.136571]  print_address_description.constprop.0+0x1e/0x210
      [  145.136639]  ? intel_hdmi_destroy+0x74/0x80 [i915]
      [  145.136703]  ? intel_hdmi_destroy+0x74/0x80 [i915]
      [  145.136710]  __kasan_report.cold+0x1b/0x37
      [  145.136790]  ? intel_hdmi_destroy+0x74/0x80 [i915]
      [  145.136863]  ? intel_hdmi_destroy+0x74/0x80 [i915]
      [  145.136870]  kasan_report+0x27/0x30
      [  145.136881]  __asan_report_load8_noabort+0x1c/0x20
      [  145.136946]  intel_hdmi_destroy+0x74/0x80 [i915]
      [  145.136954]  drm_connector_free_work_fn+0xd1/0x100
      [  145.136967]  process_one_work+0x86e/0x1610
      [  145.136987]  ? pwq_dec_nr_in_flight+0x2f0/0x2f0
      [  145.137004]  ? move_linked_works+0x128/0x2c0
      [  145.137021]  worker_thread+0x63e/0xc90
      [  145.137048]  kthread+0x2f6/0x3f0
      [  145.137054]  ? calculate_sigpending+0x81/0xa0
      [  145.137059]  ? process_one_work+0x1610/0x1610
      [  145.137064]  ? kthread_bind+0x40/0x40
      [  145.137075]  ret_from_fork+0x24/0x30
      
      [  145.137111] Allocated by task 0:
      [  145.137119] (stack is not available)
      
      [  145.137137] Freed by task 5053:
      [  145.137147]  save_stack+0x28/0x90
      [  145.137152]  __kasan_slab_free+0x136/0x180
      [  145.137157]  kasan_slab_free+0x26/0x30
      [  145.137161]  kfree+0xe6/0x350
      [  145.137242]  intel_ddi_encoder_destroy+0x60/0x80 [i915]
      [  145.137252]  drm_mode_config_cleanup+0x11d/0x8f0
      [  145.137329]  intel_modeset_driver_remove+0x1f5/0x350 [i915]
      [  145.137403]  i915_driver_remove+0xc4/0x130 [i915]
      [  145.137482]  i915_pci_remove+0x3e/0x90 [i915]
      [  145.137489]  pci_device_remove+0x108/0x2d0
      [  145.137494]  device_release_driver_internal+0x1e6/0x4a0
      [  145.137499]  driver_detach+0xcb/0x198
      [  145.137503]  bus_remove_driver+0xde/0x204
      [  145.137508]  driver_unregister+0x6d/0xa0
      [  145.137513]  pci_unregister_driver+0x2e/0x230
      [  145.137576]  i915_exit+0x1f/0x26 [i915]
      [  145.137157]  kasan_slab_free+0x26/0x30
      [  145.137161]  kfree+0xe6/0x350
      [  145.137242]  intel_ddi_encoder_destroy+0x60/0x80 [i915]
      [  145.137252]  drm_mode_config_cleanup+0x11d/0x8f0
      [  145.137329]  intel_modeset_driver_remove+0x1f5/0x350 [i915]
      [  145.137403]  i915_driver_remove+0xc4/0x130 [i915]
      [  145.137482]  i915_pci_remove+0x3e/0x90 [i915]
      [  145.137489]  pci_device_remove+0x108/0x2d0
      [  145.137494]  device_release_driver_internal+0x1e6/0x4a0
      [  145.137499]  driver_detach+0xcb/0x198
      [  145.137503]  bus_remove_driver+0xde/0x204
      [  145.137508]  driver_unregister+0x6d/0xa0
      [  145.137513]  pci_unregister_driver+0x2e/0x230
      [  145.137576]  i915_exit+0x1f/0x26 [i915]
      [  145.137581]  __x64_sys_delete_module+0x35b/0x470
      [  145.137586]  do_syscall_64+0x99/0x4e0
      [  145.137591]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      [  145.137606] The buggy address belongs to the object at ffff888216640000
                      which belongs to the cache kmalloc-8k of size 8192
      [  145.137618] The buggy address is located 6192 bytes inside of
                      8192-byte region [ffff888216640000, ffff888216642000)
      [  145.137630] The buggy address belongs to the page:
      [  145.137640] page:ffffea0008599000 refcount:1 mapcount:0 mapping:ffff888107c02a80 index:0xffff888216644000 compound_mapcount: 0
      [  145.137647] raw: 0200000000010200 0000000000000000 0000000100000001 ffff888107c02a80
      [  145.137652] raw: ffff888216644000 0000000080020001 00000001ffffffff 0000000000000000
      [  145.137656] page dumped because: kasan: bad access detected
      
      [  145.137668] Memory state around the buggy address:
      [  145.137678]  ffff888216641700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [  145.137687]  ffff888216641780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [  145.137697] >ffff888216641800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [  145.137706]                                      ^
      [  145.137715]  ffff888216641880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [  145.137724]  ffff888216641900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
      [  145.137733] ==================================================================
      [  145.137742] Disabling lock debugging due to kernel taint
      
      Changes since v1:
      - Add fixes tags.
      - Use early unregister.
      
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Fixes: 9c229127
      
       ("drm/i915: hdmi: add CEC notifier to intel_hdmi")
      Cc: <stable@vger.kernel.org> # v4.19+
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200212135445.1469133-1-maarten.lankhorst@linux.intel.com
      (cherry picked from commit a581483b
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      6647e6cd
    • Chris Wilson's avatar
      drm/i915/gt: Only swap to a random sibling once upon creation · 110f9efa
      Chris Wilson authored
      The danger in switching at random upon intel_context_pin is that the
      context may still actually be inflight, as it will not be scheduled out
      until a context switch after it is complete -- that may be a long time
      after we do a final intel_context_unpin.
      
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2118
      Fixes: 6d06779e
      
       ("drm/i915: Load balancing across a virtual engine")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: <stable@vger.kernel.org> # v5.3+
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200713160549.17344-1-chris@chris-wilson.co.uk
      (cherry picked from commit 90a98720
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      110f9efa
    • Chris Wilson's avatar
      drm/i915/gt: Ignore irq enabling on the virtual engines · 858f1299
      Chris Wilson authored
      We do not use the virtual engines for interrupts (they have physical
      components), but we do use them to decouple the fence signaling during
      submission. Currently, when we submit a completed request, we try to
      enable the interrupt handler for the virtual engine, but we never disarm
      it. A quick fix is then to mark the irq as enabled, and it will then
      remain enabled -- and this prevents us from waking the device and never
      letting it sleep again.
      
      Fixes: f8db4d05
      
       ("drm/i915: Initialise breadcrumb lists on the virtual engine")
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: <stable@vger.kernel.org> # v5.5+
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200711203236.12330-1-chris@chris-wilson.co.uk
      (cherry picked from commit 4fe6abb8
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      858f1299
    • Umesh Nerlige Ramappa's avatar
      drm/i915/perf: Use GTT when saving/restoring engine GPR · aee62e02
      Umesh Nerlige Ramappa authored
      MI_STORE_REGISTER_MEM and MI_LOAD_REGISTER_MEM need to know which
      translation to use when saving restoring the engine general purpose
      registers to and from the GT scratch. Since GT scratch is mapped to
      ggtt, we need to set an additional bit in the command to use GTT.
      
      Fixes: daed3e44
      
       ("drm/i915/perf: implement active wait for noa configurations")
      Suggested-by: default avatarPrathap Kumar Valsan <prathap.kumar.valsan@intel.com>
      Signed-off-by: default avatarUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
      Reviewed-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200709224504.11345-1-chris@chris-wilson.co.uk
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      (cherry picked from commit e43ff99c
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      aee62e02
    • Sudeep Holla's avatar
      drm/i915/selftests: Fix compare functions provided for sorting · 42de9b0a
      Sudeep Holla authored
      Both cmp_u32 and cmp_u64 are comparing the pointers instead of the value
      at those pointers. This will result in incorrect/unsorted list. Fix it
      by deferencing the pointers before comparison.
      
      Fixes: 4ba74e53 ("drm/i915/selftests: Verify frequency scaling with RPS")
      Fixes: 8757797f
      
       ("drm/i915/selftests: Repeat the rps clock frequency measurement")
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200709154931.23310-1-sudeep.holla@arm.com
      (cherry picked from commit 2196dfea
      
      )
      Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
      42de9b0a
  4. Jul 14, 2020