1. 20 3月, 2018 1 次提交
  2. 16 3月, 2018 3 次提交
    • K
      drm/nouveau/bl: fix backlight regression · 9e75dc61
      Karol Herbst 提交于
      Fixes: 3c66c87d ("drm/nouveau/disp: remove hw-specific customisation
      of output paths")
      Suggested-by: NBen Skeggs <skeggsb@redhat.com>
      Signed-off-by: NKarol Herbst <kherbst@redhat.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      9e75dc61
    • L
      drm/nouveau/bl: Fix oops on driver unbind · 76f2e2bc
      Lukas Wunner 提交于
      Unbinding nouveau on a dual GPU MacBook Pro oopses because we iterate
      over the bl_connectors list in nouveau_backlight_exit() but skipped
      initializing it in nouveau_backlight_init().  Stacktrace for posterity:
      
          BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
          IP: nouveau_backlight_exit+0x2b/0x70 [nouveau]
          nouveau_display_destroy+0x29/0x80 [nouveau]
          nouveau_drm_unload+0x65/0xe0 [nouveau]
          drm_dev_unregister+0x3c/0xe0 [drm]
          drm_put_dev+0x2e/0x60 [drm]
          nouveau_drm_device_remove+0x47/0x70 [nouveau]
          pci_device_remove+0x36/0xb0
          device_release_driver_internal+0x157/0x220
          driver_detach+0x39/0x70
          bus_remove_driver+0x51/0xd0
          pci_unregister_driver+0x2a/0xa0
          nouveau_drm_exit+0x15/0xfb0 [nouveau]
          SyS_delete_module+0x18c/0x290
          system_call_fast_compare_end+0xc/0x6f
      
      Fixes: b53ac1ee ("drm/nouveau/bl: Do not register interface if Apple GMUX detected")
      Cc: stable@vger.kernel.org # v4.10+
      Cc: Pierre Moreau <pierre.morrow@free.fr>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      76f2e2bc
    • M
      drm/nouveau/mmu: ALIGN_DOWN correct variable · da5e45e6
      Māris Nartišs 提交于
      Commit 7110c89bb8852ff8b0f88ce05b332b3fe22bd11e ("mmu: swap out round
      for ALIGN") replaced two calls to round/rounddown with ALIGN/ALIGN_DOWN,
      but erroneously applied ALIGN_DOWN to a different variable (addr) and left
      intended variable (tail) not rounded/ALIGNed.
      
      As a result screen corruption, X lockups are observable. An example of kernel
      log of affected system with NV98 card where it was bisected:
      
      nouveau 0000:01:00.0: gr: TRAP_M2MF 00000002 [IN]
      nouveau 0000:01:00.0: gr: TRAP_M2MF 00320951 400007c0 00000000 04000000
      nouveau 0000:01:00.0: gr: 00200000 [] ch 1 [000fbbe000 DRM] subc 4 class 5039
      mthd 0100 data 00000000
      nouveau 0000:01:00.0: fb: trapped read at 0040000000 on channel 1
      [0fbbe000 DRM]
      engine 00 [PGRAPH] client 03 [DISPATCH] subclient 04 [M2M_IN] reason 00000006
      [NULL_DMAOBJ]
      
      Fixes bug 105173 ("[MCP79][Regression] Unhandled NULL pointer dereference in
      nvkm_object_unmap since kernel 4.15")
      https://bugs.freedesktop.org/show_bug.cgi?id=105173
      
      Fixes: 7110c89bb885 ("mmu: swap out round for ALIGN ")
      Tested-by: NPierre Moreau <pierre.morrow@free.fr>
      Reviewed-by: NPierre Moreau <pierre.morrow@free.fr>
      Signed-off-by: NMaris Nartiss <maris.nartiss@gmail.com>
      Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
      Cc: stable@vger.kernel.org # v4.15+
      da5e45e6
  3. 15 3月, 2018 6 次提交
    • Z
      drm/i915/gvt: fix user copy warning by whitelist workload rb_tail field · 850555d1
      Zhenyu Wang 提交于
      This is to fix warning got as:
      
      [ 6730.476938] ------------[ cut here ]------------
      [ 6730.476979] Bad or missing usercopy whitelist? Kernel memory exposure attempt detected from SLAB object 'gvt-g_vgpu_workload' (offset 120, size 4)!
      [ 6730.477021] WARNING: CPU: 2 PID: 441 at mm/usercopy.c:81 usercopy_warn+0x7e/0xa0
      [ 6730.477042] Modules linked in: tun(E) bridge(E) stp(E) llc(E) kvmgt(E) x86_pkg_temp_thermal(E) vfio_mdev(E) intel_powerclamp(E) mdev(E) coretemp(E) vfio_iommu_type1(E) vfio(E) kvm_intel(E) kvm(E) hid_generic(E) irqbypass(E) crct10dif_pclmul(E) crc32_pclmul(E) usbhid(E) i915(E) crc32c_intel(E) hid(E) ghash_clmulni_intel(E) pcbc(E) aesni_intel(E) aes_x86_64(E) crypto_simd(E) cryptd(E) glue_helper(E) intel_cstate(E) idma64(E) evdev(E) virt_dma(E) iTCO_wdt(E) intel_uncore(E) intel_rapl_perf(E) intel_lpss_pci(E) sg(E) shpchp(E) mei_me(E) pcspkr(E) iTCO_vendor_support(E) intel_lpss(E) intel_pch_thermal(E) prime_numbers(E) mei(E) mfd_core(E) video(E) acpi_pad(E) button(E) binfmt_misc(E) ip_tables(E) x_tables(E) autofs4(E) ext4(E) crc16(E) mbcache(E) jbd2(E) fscrypto(E) sd_mod(E) e1000e(E) xhci_pci(E) sdhci_pci(E)
      [ 6730.477244]  ptp(E) cqhci(E) xhci_hcd(E) pps_core(E) sdhci(E) mmc_core(E) i2c_i801(E) usbcore(E) thermal(E) fan(E)
      [ 6730.477276] CPU: 2 PID: 441 Comm: gvt workload 0 Tainted: G            E    4.16.0-rc1-gvt-staging-0213+ #127
      [ 6730.477303] Hardware name:  /NUC6i5SYB, BIOS SYSKLi35.86A.0039.2016.0316.1747 03/16/2016
      [ 6730.477326] RIP: 0010:usercopy_warn+0x7e/0xa0
      [ 6730.477340] RSP: 0018:ffffba6301223d18 EFLAGS: 00010286
      [ 6730.477355] RAX: 0000000000000000 RBX: ffff8f41caae9838 RCX: 0000000000000006
      [ 6730.477375] RDX: 0000000000000007 RSI: 0000000000000082 RDI: ffff8f41dad166f0
      [ 6730.477395] RBP: 0000000000000004 R08: 0000000000000576 R09: 0000000000000000
      [ 6730.477415] R10: ffffffffb1293fb2 R11: 00000000ffffffff R12: 0000000000000001
      [ 6730.477447] R13: ffff8f41caae983c R14: ffff8f41caae9838 R15: 00007f183ca2b000
      [ 6730.477467] FS:  0000000000000000(0000) GS:ffff8f41dad00000(0000) knlGS:0000000000000000
      [ 6730.477489] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 6730.477506] CR2: 0000559462817291 CR3: 000000028b46c006 CR4: 00000000003626e0
      [ 6730.477526] Call Trace:
      [ 6730.477537]  __check_object_size+0x9c/0x1a0
      [ 6730.477562]  __kvm_write_guest_page+0x45/0x90 [kvm]
      [ 6730.477585]  kvm_write_guest+0x46/0x80 [kvm]
      [ 6730.477599]  kvmgt_rw_gpa+0x9b/0xf0 [kvmgt]
      [ 6730.477642]  workload_thread+0xa38/0x1040 [i915]
      [ 6730.477659]  ? do_wait_intr_irq+0xc0/0xc0
      [ 6730.477673]  ? finish_wait+0x80/0x80
      [ 6730.477707]  ? clean_workloads+0x120/0x120 [i915]
      [ 6730.477722]  kthread+0x111/0x130
      [ 6730.477733]  ? _kthread_create_worker_on_cpu+0x60/0x60
      [ 6730.477750]  ? exit_to_usermode_loop+0x6f/0xb0
      [ 6730.477766]  ret_from_fork+0x35/0x40
      [ 6730.477777] Code: 48 c7 c0 20 e3 25 b1 48 0f 44 c2 41 50 51 41 51 48 89 f9 49 89 f1 4d 89 d8 4c 89 d2 48 89 c6 48 c7 c7 78 e3 25 b1 e8 b2 bc e4 ff <0f> ff 48 83 c4 18 c3 48 c7 c6 09 d0 26 b1 49 89 f1 49 89 f3 eb
      [ 6730.477849] ---[ end trace cae869c1c323e45a ]---
      
      By whitelist guest page write from workload struct allocated from kmem cache.
      Reviewed-by: NHang Yuan <hang.yuan@linux.intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      (cherry picked from commit 5627705406874df57fdfad3b4e0c9aedd3b007df)
      850555d1
    • F
      drm/i915/gvt: Correct the privilege shadow batch buffer address · ef75c685
      fred gao 提交于
      Once the ring buffer is copied to ring_scan_buffer and scanned,
      the shadow batch buffer start address is only updated into
      ring_scan_buffer, not the real ring address allocated through
      intel_ring_begin in later copy_workload_to_ring_buffer.
      
      This patch is only to set the right shadow batch buffer address
      from Ring buffer, not include the shadow_wa_ctx.
      
      v2:
      - refine some comments. (Zhenyu)
      v3:
      - fix typo in title. (Zhenyu)
      v4:
      - remove the unnecessary comments. (Zhenyu)
      - add comments in bb_start_cmd_va update. (Zhenyu)
      
      Fixes: 0a53bc07 ("drm/i915/gvt: Separate cmd scan from request allocation")
      Cc: stable@vger.kernel.org  # v4.15
      Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
      Cc: Yulei Zhang <yulei.zhang@intel.com>
      Signed-off-by: Nfred gao <fred.gao@intel.com>
      Signed-off-by: NZhenyu Wang <zhenyuw@linux.intel.com>
      ef75c685
    • M
      drm/amdgpu/dce: Don't turn off DP sink when disconnected · 7d617264
      Michel Dänzer 提交于
      Turning off the sink in this case causes various issues, because
      userspace expects it to stay on until it turns it off explicitly.
      
      Instead, turn the sink off and back on when a display is connected
      again. This dance seems necessary for link training to work correctly.
      
      Bugzilla: https://bugs.freedesktop.org/105308
      Cc: stable@vger.kernel.org
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      7d617264
    • A
      drm/amdgpu: save/restore backlight level in legacy dce code · b5e32413
      Alex Deucher 提交于
      Save/restore the backlight level scratch register in S3/S4 so the
      backlight level comes back at the previously requested level.
      
      Bug: https://bugzilla.kernel.org/show_bug.cgi?id=199047
      Fixes: 4ec6ecf4 (drm/amdgpu: drop scratch regs save and restore from S3/S4 handling)
      Acked-by: NMichel Dänzer <michel.daenzer@amd.com>
      Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      b5e32413
    • C
      drm/radeon: fix prime teardown order · 0f4f715b
      Christian König 提交于
      We unmapped imported DMA-bufs when the GEM handle was dropped, not when the
      hardware was done with the buffere.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      0f4f715b
    • C
      drm/amdgpu: fix prime teardown order · 342038d9
      Christian König 提交于
      We unmapped imported DMA-bufs when the GEM handle was dropped, not when the
      hardware was done with the buffere.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NMichel Dänzer <michel.daenzer@amd.com>
      CC: stable@vger.kernel.org
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      342038d9
  4. 13 3月, 2018 3 次提交
  5. 09 3月, 2018 2 次提交
    • M
      drm/i915/gvt: keep oa config in shadow ctx · fa3dd623
      Min He 提交于
      When populating shadow ctx from guest, we should handle oa related
      registers in hw ctx, so that they will not be overlapped by guest oa
      configs. This patch made it possible to capture oa data from host for
      both host and guests.
      Signed-off-by: NMin He <min.he@intel.com>
      Signed-off-by: NZhi Wang <zhi.a.wang@intel.com>
      fa3dd623
    • X
      drm/i915/gvt: Add runtime_pm_get/put into gvt_switch_mmio · b24881e0
      Xiong Zhang 提交于
      If user continuously create vgpu, boot guest, shoutdown guest and destroy
      vgpu from remote, the following calltrace exists in dmesg sometimes:
      [ 6412.954721] RPM wakelock ref not held during HW access
      [ 6412.954795] WARNING: CPU: 7 PID: 11941 at
      linux/drivers/gpu/drm/i915/intel_drv.h:1800
      intel_uncore_forcewake_get.part.7+0x96/0xa0 [i915]
      [ 6412.954915] Call Trace:
      [ 6412.954951] intel_uncore_forcewake_get+0x18/0x20 [i915]
      [ 6412.954989] intel_gvt_switch_mmio+0x8e/0x770 [i915]
      [ 6412.954996] ? __slab_free+0x14d/0x2c0
      [ 6412.955001] ? __slab_free+0x14d/0x2c0
      [ 6412.955006] ? __slab_free+0x14d/0x2c0
      [ 6412.955041] intel_vgpu_stop_schedule+0x92/0xd0 [i915]
      [ 6412.955073] intel_gvt_deactivate_vgpu+0x48/0x60 [i915]
      [ 6412.955078] __intel_vgpu_release+0x55/0x260 [kvmgt]
      
      when this happens, gvt_switch_mmio is called at vgpu destroy, host i915 is
      idle and doesn't hold RPM wakelock, igd is in powersave mode, but
      gvt_switch_mmio require igd power on to access register, so
      intel_runtime_pm_get should be added to make sure igd power on before
      gvt_switch_mmio.
      
      v2: Move runtime_pm_get/put into gvt_switch_mmio.(Zhenyu)
      Signed-off-by: NXiong Zhang <xiong.y.zhang@intel.com>
      Signed-off-by: NZhi Wang <zhi.a.wang@intel.com>
      b24881e0
  6. 08 3月, 2018 25 次提交