1. 07 7月, 2020 1 次提交
    • C
      drm/i915: Skip stale object handle for debugfs per-file-stats · 7dfbf8a0
      Chris Wilson 提交于
      As we close a handle GEM object, we update the drm_file's idr with an
      error^W NULL pointer to indicate the in-progress closure, and finally
      removing it. If we read the idr directly, we may then see an invalid
      object pointer, and in our debugfs per_file_stats() we therefore need
      to protect against the entry being invalid.
      
      [ 1016.651637] RIP: 0010:per_file_stats+0xe/0x16e
      [ 1016.651646] Code: d2 41 0f b6 8e 69 8c 00 00 48 89 df 48 c7 c6 7b 74 8c be 31 c0 e8 0c 89 cf ff eb d2 0f 1f 44 00 00 55 48 89 e5 41
      57 41 56 53 <8b> 06 85 c0 0f 84 4d 01 00 00 49 89 d6 48 89 f3 3d ff ff ff 7f 73
      [ 1016.651651] RSP: 0018:ffffad3a01337ba0 EFLAGS: 00010293
      [ 1016.651656] RAX: 0000000000000018 RBX: ffff96fe040d65e0 RCX: 0000000000000002
      [ 1016.651660] RDX: ffffad3a01337c50 RSI: 0000000000000000 RDI: 00000000000001e8
      [ 1016.651663] RBP: ffffad3a01337bb8 R08: 0000000000000000 R09: 00000000000001c0
      [ 1016.651667] R10: 0000000000000000 R11: ffffffffbdbe5fce R12: 0000000000000000
      [ 1016.651671] R13: ffffffffbdbe5fce R14: ffffad3a01337c50 R15: 0000000000000001
      [ 1016.651676] FS:  00007a597e2d7480(0000) GS:ffff96ff3bb00000(0000) knlGS:0000000000000000
      [ 1016.651680] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 1016.651683] CR2: 0000000000000000 CR3: 0000000171fc2001 CR4: 00000000003606e0
      [ 1016.651687] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [ 1016.651690] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [ 1016.651693] Call Trace:
      [ 1016.651693] Call Trace:
      [ 1016.651703]  idr_for_each+0x8a/0xe8
      [ 1016.651711]  i915_gem_object_info+0x2a3/0x3eb
      [ 1016.651720]  seq_read+0x162/0x3ca
      [ 1016.651727]  full_proxy_read+0x5b/0x8d
      [ 1016.651733]  __vfs_read+0x45/0x1bb
      [ 1016.651741]  vfs_read+0xc9/0x15e
      [ 1016.651746]  ksys_read+0x7e/0xde
      [ 1016.651752]  do_syscall_64+0x54/0x68
      [ 1016.651758]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
      Reported-by: NGuenter Roeck <linux@roeck-us.net>
      Fixes: a8c15954 ("drm/i915: Protect debugfs per_file_stats with RCU lock")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: stable@vger.kernel.org
      Reviewed-by: NMika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200630152724.3734-1-chris@chris-wilson.co.uk
      (cherry picked from commit c1b9fd3d)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      7dfbf8a0
  2. 02 7月, 2020 2 次提交
  3. 01 7月, 2020 1 次提交
  4. 30 6月, 2020 1 次提交
  5. 29 6月, 2020 4 次提交
    • R
      drm/i915: Include asm sources for {ivb, hsw}_clear_kernel.c · 55fd7e02
      Rodrigo Vivi 提交于
      Alexandre Oliva has recently removed these files from Linux Libre
      with concerns that the sources weren't available.
      
      The sources are available on IGT repository, and only open source
      tools are used to generate the {ivb,hsw}_clear_kernel.c files.
      
      However, the remaining concern from Alexandre Oliva was around
      GPL license and the source not been present when distributing
      the code.
      
      So, it looks like 2 alternatives are possible, the use of
      linux-firmware.git repository to store the blob or making sure
      that the source is also present in our tree. Since the goal
      is to limit the i915 firmware to only the micro-controller blobs
      let's make sure that we do include the asm sources here in our tree.
      
      Btw, I tried to have some diligence here and make sure that the
      asms that these commits are adding are truly the source for
      the mentioned files:
      
      igt$ ./scripts/generate_clear_kernel.sh -g ivb \
           -m ~/mesa/build/src/intel/tools/i965_asm
      Output file not specified - using default file "ivb-cb_assembled"
      
      Generating gen7 CB Kernel assembled file "ivb_clear_kernel.c"
      for i915 driver...
      
      igt$ diff ~/i915/drm-tip/drivers/gpu/drm/i915/gt/ivb_clear_kernel.c \
           ivb_clear_kernel.c
      
      <  * Generated by: IGT Gpu Tools on Fri 21 Feb 2020 05:29:32 AM UTC
      >  * Generated by: IGT Gpu Tools on Mon 08 Jun 2020 10:00:54 AM PDT
      61c61
      < };
      > };
      \ No newline at end of file
      
      igt$ ./scripts/generate_clear_kernel.sh -g hsw \
           -m ~/mesa/build/src/intel/tools/i965_asm
      Output file not specified - using default file "hsw-cb_assembled"
      
      Generating gen7.5 CB Kernel assembled file "hsw_clear_kernel.c"
      for i915 driver...
      
      igt$ diff ~/i915/drm-tip/drivers/gpu/drm/i915/gt/hsw_clear_kernel.c \
           hsw_clear_kernel.c
      5c5
      <  * Generated by: IGT Gpu Tools on Fri 21 Feb 2020 05:30:13 AM UTC
      >  * Generated by: IGT Gpu Tools on Mon 08 Jun 2020 10:01:42 AM PDT
      61c61
      < };
      > };
      \ No newline at end of file
      
      Used IGT and Mesa master repositories from Fri Jun 5 2020)
      IGT: 53e8c878a6fb ("tests/kms_chamelium: Force reprobe after replugging
           the connector")
      Mesa: 5d13c7477eb1 ("radv: set keep_statistic_info with
            RADV_DEBUG=shaderstats")
      Mesa built with: meson build -D platforms=drm,x11 -D dri-drivers=i965 \
                       -D gallium-drivers=iris -D prefix=/usr \
      		 -D libdir=/usr/lib64/ -Dtools=intel \
      		 -Dkulkan-drivers=intel && ninja -C build
      
      v2: Header clean-up and include build instructions in a readme (Chris)
          Modified commit message to respect check-patch
      
      Reference: http://www.fsfla.org/pipermail/linux-libre/2020-June/003374.html
      Reference: http://www.fsfla.org/pipermail/linux-libre/2020-June/003375.html
      Fixes: 47f8253d ("drm/i915/gen7: Clear all EU/L3 residual contexts")
      Cc: <stable@vger.kernel.org> # v5.7+
      Cc: Alexandre Oliva <lxoliva@fsfla.org>
      Cc: Prathap Kumar Valsan <prathap.kumar.valsan@intel.com>
      Cc: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NJon Bloomfield <jon.bloomfield@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200610201807.191440-1-rodrigo.vivi@intel.com
      (cherry picked from commit 5a7eeb8b)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      55fd7e02
    • N
      drm/exynos: fix ref count leak in mic_pre_enable · d4f5a095
      Navid Emamdoost 提交于
      in mic_pre_enable, pm_runtime_get_sync is called which
      increments the counter even in case of failure, leading to incorrect
      ref count. In case of failure, decrement the ref count before returning.
      Signed-off-by: NNavid Emamdoost <navid.emamdoost@gmail.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      d4f5a095
    • M
      drm/exynos: Properly propagate return value in drm_iommu_attach_device() · b9c63388
      Marek Szyprowski 提交于
      Propagate the proper error codes from the called functions instead of
      unconditionally returning 0.
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Merge conflict so merged it manually.
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      b9c63388
    • T
      drm/exynos: Remove dev_err() on platform_get_irq() failure · aee83fbd
      Tamseel Shams 提交于
      platform_get_irq() will call dev_err() itself on failure,
      so there is no need for the driver to also do this.
      This is detected by coccinelle.
      Signed-off-by: NTamseel Shams <m.shams@samsung.com>
      Signed-off-by: NInki Dae <inki.dae@samsung.com>
      aee83fbd
  6. 26 6月, 2020 1 次提交
    • I
      drm/amd/powerplay: Fix NULL dereference in lock_bus() on Vega20 w/o RAS · 7e89e4aa
      Ivan Mironov 提交于
      I updated my system with Radeon VII from kernel 5.6 to kernel 5.7, and
      following started to happen on each boot:
      
      	...
      	BUG: kernel NULL pointer dereference, address: 0000000000000128
      	...
      	CPU: 9 PID: 1940 Comm: modprobe Tainted: G            E     5.7.2-200.im0.fc32.x86_64 #1
      	Hardware name: System manufacturer System Product Name/PRIME X570-P, BIOS 1407 04/02/2020
      	RIP: 0010:lock_bus+0x42/0x60 [amdgpu]
      	...
      	Call Trace:
      	 i2c_smbus_xfer+0x3d/0xf0
      	 i2c_default_probe+0xf3/0x130
      	 i2c_detect.isra.0+0xfe/0x2b0
      	 ? kfree+0xa3/0x200
      	 ? kobject_uevent_env+0x11f/0x6a0
      	 ? i2c_detect.isra.0+0x2b0/0x2b0
      	 __process_new_driver+0x1b/0x20
      	 bus_for_each_dev+0x64/0x90
      	 ? 0xffffffffc0f34000
      	 i2c_register_driver+0x73/0xc0
      	 do_one_initcall+0x46/0x200
      	 ? _cond_resched+0x16/0x40
      	 ? kmem_cache_alloc_trace+0x167/0x220
      	 ? do_init_module+0x23/0x260
      	 do_init_module+0x5c/0x260
      	 __do_sys_init_module+0x14f/0x170
      	 do_syscall_64+0x5b/0xf0
      	 entry_SYSCALL_64_after_hwframe+0x44/0xa9
      	...
      
      Error appears when some i2c device driver tries to probe for devices
      using adapter registered by `smu_v11_0_i2c_eeprom_control_init()`.
      Code supporting this adapter requires `adev->psp.ras.ras` to be not
      NULL, which is true only when `amdgpu_ras_init()` detects HW support by
      calling `amdgpu_ras_check_supported()`.
      
      Before 9015d60c, adapter was registered by
      
      	-> amdgpu_device_ip_init()
      	  -> amdgpu_ras_recovery_init()
      	    -> amdgpu_ras_eeprom_init()
      	      -> smu_v11_0_i2c_eeprom_control_init()
      
      after verifying that `adev->psp.ras.ras` is not NULL in
      `amdgpu_ras_recovery_init()`. Currently it is registered
      unconditionally by
      
      	-> amdgpu_device_ip_init()
      	  -> pp_sw_init()
      	    -> hwmgr_sw_init()
      	      -> vega20_smu_init()
      	        -> smu_v11_0_i2c_eeprom_control_init()
      
      Fix simply adds HW support check (ras == NULL => no support) before
      calling `smu_v11_0_i2c_eeprom_control_{init,fini}()`.
      
      Please note that there is a chance that similar fix is also required for
      CHIP_ARCTURUS. I do not know whether any actual Arcturus hardware without
      RAS exist, and whether calling `smu_i2c_eeprom_init()` makes any sense
      when there is no HW support.
      
      Cc: stable@vger.kernel.org
      Fixes: 9015d60c ("drm/amdgpu: Move EEPROM I2C adapter to amdgpu_device")
      Signed-off-by: NIvan Mironov <mironov.ivan@gmail.com>
      Tested-by: NBjorn Nostvold <bjorn.nostvold@gmail.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7e89e4aa
  7. 25 6月, 2020 5 次提交
  8. 24 6月, 2020 3 次提交
  9. 23 6月, 2020 3 次提交
  10. 21 6月, 2020 3 次提交
  11. 19 6月, 2020 2 次提交
  12. 18 6月, 2020 5 次提交
  13. 17 6月, 2020 7 次提交
    • C
      drm/i915/gvt: Use GFP_ATOMIC instead of GFP_KERNEL in atomic context · a291e4fb
      Colin Xu 提交于
      GFP_KERNEL flag specifies a normal kernel allocation in which executing
      in process context without any locks and can sleep.
      mmio_diff takes sometime to finish all the diff compare and it has
      locks, continue using GFP_KERNEL will output below trace if LOCKDEP
      enabled.
      
      Use GFP_ATOMIC instead.
      
      V2: Rebase.
      
      =====================================================
      WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected
      5.7.0-rc2 #400 Not tainted
      -----------------------------------------------------
      is trying to acquire:
      ffffffffb47bea20 (fs_reclaim){+.+.}-{0:0}, at: fs_reclaim_acquire.part.0+0x0/0x30
      
                     and this task is already holding:
      ffff88845b85cc90 (&gvt->scheduler.mmio_context_lock){+.-.}-{2:2}, at: vgpu_mmio_diff_show+0xcf/0x2e0
      which would create a new lock dependency:
       (&gvt->scheduler.mmio_context_lock){+.-.}-{2:2} -> (fs_reclaim){+.+.}-{0:0}
      
                     but this new dependency connects a SOFTIRQ-irq-safe lock:
       (&gvt->scheduler.mmio_context_lock){+.-.}-{2:2}
      
                     ... which became SOFTIRQ-irq-safe at:
        lock_acquire+0x175/0x4e0
        _raw_spin_lock_irqsave+0x2b/0x40
        shadow_context_status_change+0xfe/0x2f0
        notifier_call_chain+0x6a/0xa0
        __atomic_notifier_call_chain+0x5f/0xf0
        execlists_schedule_out+0x42a/0x820
        process_csb+0xe7/0x3e0
        execlists_submission_tasklet+0x5c/0x1d0
        tasklet_action_common.isra.0+0xeb/0x260
        __do_softirq+0x11d/0x56f
        irq_exit+0xf6/0x100
        do_IRQ+0x7f/0x160
        ret_from_intr+0x0/0x2a
        cpuidle_enter_state+0xcd/0x5b0
        cpuidle_enter+0x37/0x60
        do_idle+0x337/0x3f0
        cpu_startup_entry+0x14/0x20
        start_kernel+0x58b/0x5c5
        secondary_startup_64+0xa4/0xb0
      
                     to a SOFTIRQ-irq-unsafe lock:
       (fs_reclaim){+.+.}-{0:0}
      
                     ... which became SOFTIRQ-irq-unsafe at:
      ...
        lock_acquire+0x175/0x4e0
        fs_reclaim_acquire.part.0+0x20/0x30
        kmem_cache_alloc_node_trace+0x2e/0x290
        alloc_worker+0x2b/0xb0
        init_rescuer.part.0+0x17/0xe0
        workqueue_init+0x293/0x3bb
        kernel_init_freeable+0x149/0x325
        kernel_init+0x8/0x116
        ret_from_fork+0x3a/0x50
      
                     other info that might help us debug this:
      
       Possible interrupt unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(fs_reclaim);
                                     local_irq_disable();
                                     lock(&gvt->scheduler.mmio_context_lock);
                                     lock(fs_reclaim);
        <Interrupt>
          lock(&gvt->scheduler.mmio_context_lock);
      
                      *** DEADLOCK ***
      
      3 locks held by cat/1439:
       #0: ffff888444a23698 (&p->lock){+.+.}-{3:3}, at: seq_read+0x49/0x680
       #1: ffff88845b858068 (&gvt->lock){+.+.}-{3:3}, at: vgpu_mmio_diff_show+0xc7/0x2e0
       #2: ffff88845b85cc90 (&gvt->scheduler.mmio_context_lock){+.-.}-{2:2}, at: vgpu_mmio_diff_show+0xcf/0x2e0
      
                     the dependencies between SOFTIRQ-irq-safe lock and the holding lock:
      -> (&gvt->scheduler.mmio_context_lock){+.-.}-{2:2} ops: 31 {
         HARDIRQ-ON-W at:
                          lock_acquire+0x175/0x4e0
                          _raw_spin_lock_bh+0x2f/0x40
                          vgpu_mmio_diff_show+0xcf/0x2e0
                          seq_read+0x242/0x680
                          full_proxy_read+0x95/0xc0
                          vfs_read+0xc2/0x1b0
                          ksys_read+0xc4/0x160
                          do_syscall_64+0x63/0x290
                          entry_SYSCALL_64_after_hwframe+0x49/0xb3
         IN-SOFTIRQ-W at:
                          lock_acquire+0x175/0x4e0
                          _raw_spin_lock_irqsave+0x2b/0x40
                          shadow_context_status_change+0xfe/0x2f0
                          notifier_call_chain+0x6a/0xa0
                          __atomic_notifier_call_chain+0x5f/0xf0
                          execlists_schedule_out+0x42a/0x820
                          process_csb+0xe7/0x3e0
                          execlists_submission_tasklet+0x5c/0x1d0
                          tasklet_action_common.isra.0+0xeb/0x260
                          __do_softirq+0x11d/0x56f
                          irq_exit+0xf6/0x100
                          do_IRQ+0x7f/0x160
                          ret_from_intr+0x0/0x2a
                          cpuidle_enter_state+0xcd/0x5b0
                          cpuidle_enter+0x37/0x60
                          do_idle+0x337/0x3f0
                          cpu_startup_entry+0x14/0x20
                          start_kernel+0x58b/0x5c5
                          secondary_startup_64+0xa4/0xb0
         INITIAL USE at:
                         lock_acquire+0x175/0x4e0
                         _raw_spin_lock_irqsave+0x2b/0x40
                         shadow_context_status_change+0xfe/0x2f0
                         notifier_call_chain+0x6a/0xa0
                         __atomic_notifier_call_chain+0x5f/0xf0
                         execlists_schedule_in+0x2c8/0x690
                         __execlists_submission_tasklet+0x1303/0x1930
                         execlists_submit_request+0x1e7/0x230
                         submit_notify+0x105/0x2a4
                         __i915_sw_fence_complete+0xaa/0x380
                         __engine_park+0x313/0x5a0
                         ____intel_wakeref_put_last+0x3e/0x90
                         intel_gt_resume+0x41e/0x440
                         intel_gt_init+0x283/0xbc0
                         i915_gem_init+0x197/0x240
                         i915_driver_probe+0xc2d/0x12e0
                         i915_pci_probe+0xa2/0x1e0
                         local_pci_probe+0x6f/0xb0
                         pci_device_probe+0x171/0x230
                         really_probe+0x17a/0x380
                         driver_probe_device+0x70/0xf0
                         device_driver_attach+0x82/0x90
                         __driver_attach+0x60/0x100
                         bus_for_each_dev+0xe4/0x140
                         bus_add_driver+0x257/0x2a0
                         driver_register+0xd3/0x150
                         i915_init+0x6d/0x80
                         do_one_initcall+0xb8/0x3a0
                         kernel_init_freeable+0x2b4/0x325
                         kernel_init+0x8/0x116
                         ret_from_fork+0x3a/0x50
       }
      __key.77812+0x0/0x40
       ... acquired at:
         lock_acquire+0x175/0x4e0
         fs_reclaim_acquire.part.0+0x20/0x30
         kmem_cache_alloc_trace+0x2e/0x260
         mmio_diff_handler+0xc0/0x150
         intel_gvt_for_each_tracked_mmio+0x7b/0x140
         vgpu_mmio_diff_show+0x111/0x2e0
         seq_read+0x242/0x680
         full_proxy_read+0x95/0xc0
         vfs_read+0xc2/0x1b0
         ksys_read+0xc4/0x160
         do_syscall_64+0x63/0x290
         entry_SYSCALL_64_after_hwframe+0x49/0xb3
      
                     the dependencies between the lock to be acquired
       and SOFTIRQ-irq-unsafe lock:
      -> (fs_reclaim){+.+.}-{0:0} ops: 1999031 {
         HARDIRQ-ON-W at:
                          lock_acquire+0x175/0x4e0
                          fs_reclaim_acquire.part.0+0x20/0x30
                          kmem_cache_alloc_node_trace+0x2e/0x290
                          alloc_worker+0x2b/0xb0
                          init_rescuer.part.0+0x17/0xe0
                          workqueue_init+0x293/0x3bb
                          kernel_init_freeable+0x149/0x325
                          kernel_init+0x8/0x116
                          ret_from_fork+0x3a/0x50
         SOFTIRQ-ON-W at:
                          lock_acquire+0x175/0x4e0
                          fs_reclaim_acquire.part.0+0x20/0x30
                          kmem_cache_alloc_node_trace+0x2e/0x290
                          alloc_worker+0x2b/0xb0
                          init_rescuer.part.0+0x17/0xe0
                          workqueue_init+0x293/0x3bb
                          kernel_init_freeable+0x149/0x325
                          kernel_init+0x8/0x116
                          ret_from_fork+0x3a/0x50
         INITIAL USE at:
                         lock_acquire+0x175/0x4e0
                         fs_reclaim_acquire.part.0+0x20/0x30
                         kmem_cache_alloc_node_trace+0x2e/0x290
                         alloc_worker+0x2b/0xb0
                         init_rescuer.part.0+0x17/0xe0
                         workqueue_init+0x293/0x3bb
                         kernel_init_freeable+0x149/0x325
                         kernel_init+0x8/0x116
                         ret_from_fork+0x3a/0x50
       }
      __fs_reclaim_map+0x0/0x60
       ... acquired at:
         lock_acquire+0x175/0x4e0
         fs_reclaim_acquire.part.0+0x20/0x30
         kmem_cache_alloc_trace+0x2e/0x260
         mmio_diff_handler+0xc0/0x150
         intel_gvt_for_each_tracked_mmio+0x7b/0x140
         vgpu_mmio_diff_show+0x111/0x2e0
         seq_read+0x242/0x680
         full_proxy_read+0x95/0xc0
         vfs_read+0xc2/0x1b0
         ksys_read+0xc4/0x160
         do_syscall_64+0x63/0x290
         entry_SYSCALL_64_after_hwframe+0x49/0xb3
      
                     stack backtrace:
      CPU: 5 PID: 1439 Comm: cat Not tainted 5.7.0-rc2 #400
      Hardware name: Intel(R) Client Systems NUC8i7BEH/NUC8BEB, BIOS BECFL357.86A.0056.2018.1128.1717 11/28/2018
      Call Trace:
       dump_stack+0x97/0xe0
       check_irq_usage.cold+0x428/0x434
       ? check_usage_forwards+0x2c0/0x2c0
       ? class_equal+0x11/0x20
       ? __bfs+0xd2/0x2d0
       ? in_any_class_list+0xa0/0xa0
       ? check_path+0x22/0x40
       ? check_noncircular+0x150/0x2b0
       ? print_circular_bug.isra.0+0x1b0/0x1b0
       ? mark_lock+0x13d/0xc50
       ? __lock_acquire+0x1e32/0x39b0
       __lock_acquire+0x1e32/0x39b0
       ? timerqueue_add+0xc1/0x130
       ? register_lock_class+0xa60/0xa60
       ? mark_lock+0x13d/0xc50
       lock_acquire+0x175/0x4e0
       ? __zone_pcp_update+0x80/0x80
       ? check_flags.part.0+0x210/0x210
       ? mark_held_locks+0x65/0x90
       ? _raw_spin_unlock_irqrestore+0x32/0x40
       ? lockdep_hardirqs_on+0x190/0x290
       ? fwtable_read32+0x163/0x480
       ? mmio_diff_handler+0xc0/0x150
       fs_reclaim_acquire.part.0+0x20/0x30
       ? __zone_pcp_update+0x80/0x80
       kmem_cache_alloc_trace+0x2e/0x260
       mmio_diff_handler+0xc0/0x150
       ? vgpu_mmio_diff_open+0x30/0x30
       intel_gvt_for_each_tracked_mmio+0x7b/0x140
       vgpu_mmio_diff_show+0x111/0x2e0
       ? mmio_diff_handler+0x150/0x150
       ? rcu_read_lock_sched_held+0xa0/0xb0
       ? rcu_read_lock_bh_held+0xc0/0xc0
       ? kasan_unpoison_shadow+0x33/0x40
       ? __kasan_kmalloc.constprop.0+0xc2/0xd0
       seq_read+0x242/0x680
       ? debugfs_locked_down.isra.0+0x70/0x70
       full_proxy_read+0x95/0xc0
       vfs_read+0xc2/0x1b0
       ksys_read+0xc4/0x160
       ? kernel_write+0xb0/0xb0
       ? mark_held_locks+0x24/0x90
       do_syscall_64+0x63/0x290
       entry_SYSCALL_64_after_hwframe+0x49/0xb3
      RIP: 0033:0x7ffbe3e6efb2
      Code: c0 e9 c2 fe ff ff 50 48 8d 3d ca cb 0a 00 e8 f5 19 02 00 0f 1f 44 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 0f 05 <48> 3d 00 f0 ff ff 77 56 c3 0f 1f 44 00 00 48 83 ec 28 48 89 54 24
      RSP: 002b:00007ffd021c08a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
      RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007ffbe3e6efb2
      RDX: 0000000000020000 RSI: 00007ffbe34cd000 RDI: 0000000000000003
      RBP: 00007ffbe34cd000 R08: 00007ffbe34cc010 R09: 0000000000000000
      R10: 0000000000000022 R11: 0000000000000246 R12: 0000562b6f0a11f0
      R13: 0000000000000003 R14: 0000000000020000 R15: 0000000000020000
      ------------[ cut here ]------------
      Acked-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20200601035556.19999-1-colin.xu@intel.com
      a291e4fb
    • C
      drm/i915/gvt: Fix incorrect check of enabled bits in mask registers · fc1e3aa0
      Colin Xu 提交于
      Using _MASKED_BIT_ENABLE macro to set mask register bits is straight
      forward and not likely to go wrong. However when checking which bit(s)
      is(are) enabled, simply bitwise AND value and _MASKED_BIT_ENABLE() won't
      output expected result. Suppose the register write is disabling bit 1
      by setting 0xFFFF0000, however "& _MASKED_BIT_ENABLE(1)" outputs
      0x00010000, and the non-zero check will pass which cause the old code
      consider the new value set as an enabling operation.
      
      We found guest set 0x80008000 on boot, and set 0xffff8000 during resume.
      Both are legal settings but old code will block latter and force vgpu
      enter fail-safe mode.
      
      Introduce two new macro and make proper masked bit check in mmio handler:
      IS_MASKED_BITS_ENABLED()
      IS_MASKED_BITS_DISABLED()
      
      V2: Rebase.
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20200601030721.17129-1-colin.xu@intel.com
      fc1e3aa0
    • C
      drm/i915/gvt: Fix two CFL MMIO handling caused by regression. · fccd0f7c
      Colin Xu 提交于
      D_CFL was incorrectly removed for:
      GAMT_CHKN_BIT_REG
      GEN9_CTX_PREEMPT_REG
      
      V2: Update commit message.
      V3: Rebase and split Fixes and mis-handled MMIO.
      
      Fixes: 43226e6f (drm/i915/gvt: replaced register address with name)
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20200601030638.16002-1-colin.xu@intel.com
      fccd0f7c
    • C
      drm/i915/gvt: Add one missing MMIO handler for D_SKL_PLUS · 2de60af4
      Colin Xu 提交于
      _PLANE_CTL_3_A, _PLANE_CTL_3_B and _PLANE_SURF_3_A are handled, but
      miss _PLANE_SURF_3_B.
      Reviewed-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Signed-off-by: NColin Xu <colin.xu@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20200601030457.14002-1-colin.xu@intel.com
      2de60af4
    • L
      drm: mcde: Fix forgotten user of drm->dev_private · b48fd568
      Linus Walleij 提交于
      Unable to handle kernel NULL pointer dereference at virtual address 00000918
      pgd = (ptrval)
      [00000918] *pgd=00000000
      Internal error: Oops: 5 [#1] SMP ARM
      Modules linked in:
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.7.0-15001-gfa384b50b96b-dirty #514
      Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support)
      PC is at mcde_display_enable+0x78/0x7c0
      LR is at mcde_display_enable+0x78/0x7c0
      
      Fix this by using to_mcde() as in other functions.
      
      Fixes: fd7ee85c ("drm/mcde: Don't use drm_device->dev_private")
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200613223027.4189309-2-linus.walleij@linaro.org
      b48fd568
    • L
      drm: mcde: Fix display initialization problem · b984b6d8
      Linus Walleij 提交于
      The following bug appeared in the MCDE driver/display
      initialization during the recent merge window.
      
      First the place we call drm_fbdev_generic_setup() in the
      wrong place: this needs to be called AFTER calling
      drm_dev_register() else we get this splat:
      
       ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 1 at ../drivers/gpu/drm/drm_fb_helper.c:2198 drm_fbdev_generic_setup+0x164/0x1a8
      mcde a0350000.mcde: Device has not been registered.
      Modules linked in:
      Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support)
      [<c010e704>] (unwind_backtrace) from [<c010a86c>] (show_stack+0x10/0x14)
      [<c010a86c>] (show_stack) from [<c0414f38>] (dump_stack+0x9c/0xb0)
      [<c0414f38>] (dump_stack) from [<c0121c8c>] (__warn+0xb8/0xd0)
      [<c0121c8c>] (__warn) from [<c0121d18>] (warn_slowpath_fmt+0x74/0xb8)
      [<c0121d18>] (warn_slowpath_fmt) from [<c04b154c>] (drm_fbdev_generic_setup+0x164/0x1a8)
      [<c04b154c>] (drm_fbdev_generic_setup) from [<c04ed278>] (mcde_drm_bind+0xc4/0x160)
      [<c04ed278>] (mcde_drm_bind) from [<c04f06b8>] (try_to_bring_up_master+0x15c/0x1a4)
      (...)
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: NSam Ravnborg <sam@ravnborg.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20200613223027.4189309-1-linus.walleij@linaro.org
      b984b6d8
    • T
      drm/tegra: Add zpos property for cursor planes · fce3a51d
      Thierry Reding 提交于
      As of commit 4dc55525 ("drm: plane: Verify that no or all planes
      have a zpos property") a warning is emitted if there's a mix of planes
      with and without a zpos property.
      
      On Tegra, cursor planes are always composited on top of all other
      planes, which is why they never had a zpos property attached to them.
      However, since the composition order is fixed, this is trivial to
      remedy by simply attaching an immutable zpos property to them.
      
      v3: do not hardcode zpos for overlay planes used as cursor (Dmitry)
      v2: hardcode cursor plane zpos to 255 instead of 0 (Ville)
      Reported-by: NJonathan Hunter <jonathanh@nvidia.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      fce3a51d
  14. 16 6月, 2020 2 次提交