Skip to content
Snippets Groups Projects
  1. Apr 10, 2019
  2. Apr 08, 2019
  3. Apr 01, 2019
  4. Mar 27, 2019
  5. Mar 25, 2019
  6. Mar 20, 2019
    • Noralf Trønnes's avatar
      tinydrm/mipi-dbi: Use dma-safe buffers for all SPI transfers · a89bfc5d
      Noralf Trønnes authored
      
      Buffers passed to spi_sync() must be dma-safe even for tiny buffers since
      some SPI controllers use DMA for all transfers.
      
      Example splat with CONFIG_DMA_API_DEBUG enabled:
      
      [   23.750467] DMA-API: dw_dmac_pci 0000:00:15.0: device driver maps memory from stack [probable addr=000000001e49185d]
      [   23.750529] WARNING: CPU: 1 PID: 1296 at kernel/dma/debug.c:1161 check_for_stack+0xb7/0x190
      [   23.750533] Modules linked in: mmc_block(+) spi_pxa2xx_platform(+) pwm_lpss_pci pwm_lpss spi_pxa2xx_pci sdhci_pci cqhci intel_mrfld_pwrbtn extcon_intel_mrfld sdhci intel_mrfld_adc led_class mmc_core ili9341 mipi_dbi tinydrm backlight ti_ads7950 industrialio_triggered_buffer kfifo_buf intel_soc_pmic_mrfld hci_uart btbcm
      [   23.750599] CPU: 1 PID: 1296 Comm: modprobe Not tainted 5.0.0-rc7+ #236
      [   23.750605] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48
      [   23.750620] RIP: 0010:check_for_stack+0xb7/0x190
      [   23.750630] Code: 8b 6d 50 4d 85 ed 75 04 4c 8b 6d 10 48 89 ef e8 2f 8b 44 00 48 89 c6 4a 8d 0c 23 4c 89 ea 48 c7 c7 88 d0 82 b4 e8 40 7c f9 ff <0f> 0b 8b 05 79 00 4b 01 85 c0 74 07 5b 5d 41 5c 41 5d c3 8b 05 54
      [   23.750637] RSP: 0000:ffff97bbc0292fa0 EFLAGS: 00010286
      [   23.750646] RAX: 0000000000000000 RBX: ffff97bbc0290000 RCX: 0000000000000006
      [   23.750652] RDX: 0000000000000007 RSI: 0000000000000002 RDI: ffff94b33e115450
      [   23.750658] RBP: ffff94b33c8578b0 R08: 0000000000000002 R09: 00000000000201c0
      [   23.750664] R10: 00000006ecb0ccc6 R11: 0000000000034f38 R12: 000000000000316c
      [   23.750670] R13: ffff94b33c84b250 R14: ffff94b33dedd5a0 R15: 0000000000000001
      [   23.750679] FS:  0000000000000000(0000) GS:ffff94b33e100000(0063) knlGS:00000000f7faf690
      [   23.750686] CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
      [   23.750691] CR2: 00000000f7f54faf CR3: 000000000722c000 CR4: 00000000001006e0
      [   23.750696] Call Trace:
      [   23.750713]  debug_dma_map_sg+0x100/0x340
      [   23.750727]  ? dma_direct_map_sg+0x3b/0xb0
      [   23.750739]  spi_map_buf+0x25a/0x300
      [   23.750751]  __spi_pump_messages+0x2a4/0x680
      [   23.750762]  __spi_sync+0x1dd/0x1f0
      [   23.750773]  spi_sync+0x26/0x40
      [   23.750790]  mipi_dbi_typec3_command_read+0x14d/0x240 [mipi_dbi]
      [   23.750802]  ? spi_finalize_current_transfer+0x10/0x10
      [   23.750821]  mipi_dbi_typec3_command+0x1bc/0x1d0 [mipi_dbi]
      
      Reported-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
      Tested-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190222124329.23046-1-noralf@tronnes.org
      a89bfc5d
  7. Mar 14, 2019
  8. Mar 07, 2019
  9. Mar 05, 2019
  10. Mar 04, 2019
  11. Feb 28, 2019
  12. Feb 21, 2019
  13. Feb 20, 2019
    • Michael D Labriola's avatar
      drm: change func to better detect wether swiotlb is needed · 913b2cb7
      Michael D Labriola authored
      
      This commit fixes DRM failures on Xen PV systems that were introduced in
      v4.17 by the following commits:
      
      82626363 drm: add func to get max iomem address v2
      fd5fd480 drm/amdgpu: only enable swiotlb alloc when need v2
      1bc3d3cc drm/radeon: only enable swiotlb path when need v2
      
      The introduction of ->need_swiotlb to the ttm_dma_populate() conditionals
      in the radeon and amdgpu device drivers causes Gnome to immediately crash
      on Xen PV systems, returning the user to the login screen.  The following
      kernel errors get logged:
      
      [   28.554259] radeon_dp_aux_transfer_native: 200 callbacks suppressed
      [   31.219821] radeon 0000:01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
      [   31.220030] [drm:radeon_gem_object_create [radeon]] *ERROR* Failed to allocate GEM object (16384000, 2, 4096, -14)
      [   31.226109] radeon 0000:01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
      [   31.226300] [drm:radeon_gem_object_create [radeon]] *ERROR* Failed to allocate GEM object (16384000, 2, 4096, -14)
      [   31.300734] gnome-shell[1935]: segfault at 88 ip 00007f39151cd904 sp 00007ffc97611ad8 error 4 in libmutter-cogl.so[7f3915178000+aa000]
      [   31.300745] Code: 5f c3 0f 1f 40 00 48 8b 47 78 48 8b 40 40 ff e0 66 0f 1f 44 00 00 48 8b 47 78 48 8b 40 48 ff e0 66 0f 1f 44 00 00 48 8b 47 78 <48> 8b 80 88 00 00 00 ff e0 0f 1f 00 48 8b 47 78 48 8b 40 68 ff e0
      [   38.193302] radeon_dp_aux_transfer_native: 116 callbacks suppressed
      [   40.009317] radeon 0000:01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
      [   40.009488] [drm:radeon_gem_object_create [radeon]] *ERROR* Failed to allocate GEM object (16384000, 2, 4096, -14)
      [   40.015114] radeon 0000:01:00.0: swiotlb buffer is full (sz: 2097152 bytes)
      [   40.015297] [drm:radeon_gem_object_create [radeon]] *ERROR* Failed to allocate GEM object (16384000, 2, 4096, -14)
      [   40.028302] gnome-shell[2431]: segfault at 2dadf40 ip 0000000002dadf40 sp 00007ffcd24ea5f8 error 15
      [   40.028306] Code: 20 6e 31 00 00 00 00 00 00 00 00 37 e3 3d 2d 7f 00 00 80 f4 e6 3d 2d 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <00> 00 00 00 00 00 00 00 c1 00 00 00 00 00 00 00 80 e1 d2 03 00 00
      
      This commit renames drm_get_max_iomem() to drm_need_swiotlb(), adds a
      xen_pv_domain() check to it, and moves the bit shifting comparison that
      always follows its usage into the function (simplifying the drm driver
      code).
      
      Signed-off-by: default avatarMichael D Labriola <michael.d.labriola@gmail.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Link: https://patchwork.freedesktop.org/patch/286987/
      913b2cb7
  14. Feb 19, 2019
    • Uma Shankar's avatar
      drm: Add colorspace info to AVI Infoframe · 0d68b887
      Uma Shankar authored
      
      This adds colorspace information to HDMI AVI infoframe.
      A helper function is added to program the same.
      
      v2: Moved this to drm core instead of i915 driver.
      
      v3: Exported the helper function.
      
      v4: Added separate HDMI specific macro as per CTA spec.
      This is separate from user exposed enum values. This is
      as per Ville's suggestion.
      
      v5: Appended BT709 and SMPTE 170M with YCC information as per Ville's
      review comment to be clear and not to be confused with RGB.
      
      v6: Added bit wise macro for various fields of colorimetry for easier
      understanding and review as per Ville's comments. Moved the same out of
      header file to avoid any namespace issues.
      
      v7: Undef some macros to avoid any namespace collision as suggested by
      Ville. Added Ville's RB.
      
      Signed-off-by: default avatarUma Shankar <uma.shankar@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1550596381-993-3-git-send-email-uma.shankar@intel.com
      0d68b887
    • Uma Shankar's avatar
      drm: Add HDMI colorspace property · d2c6a405
      Uma Shankar authored
      
      Create a new connector property to program colorspace to sink
      devices. Modern sink devices support more than 1 type of
      colorspace like 601, 709, BT2020 etc. This helps to switch
      based on content type which is to be displayed. The decision
      lies with compositors as to in which scenarios, a particular
      colorspace will be picked.
      
      This will be helpful mostly to switch to higher gamut colorspaces
      like BT2020 when the media content is encoded as BT2020. Thereby
      giving a good visual experience to users.
      
      The expectation from userspace is that it should parse the EDID
      and get supported colorspaces. Use this property and switch to the
      one supported. Sink supported colorspaces should be retrieved by
      userspace from EDID and driver will not explicitly expose them.
      
      Basically the expectation from userspace is:
       - Set up CRTC DEGAMMA/CTM/GAMMA to convert to some sink
         colorspace
       - Set this new property to let the sink know what it
         converted the CRTC output to.
      
      v2: Addressed Maarten and Ville's review comments. Enhanced
      the colorspace enum to incorporate both HDMI and DP supported
      colorspaces. Also, added a default option for colorspace.
      
      v3: Removed Adobe references from enum definitions as per
      Ville, Hans Verkuil and Jonas Karlman suggestions. Changed
      Default to an unset state where driver will assign the colorspace
      is not chosen by user, suggested by Ville and Maarten. Addressed
      other misc review comments from Maarten. Split the changes to
      have separate colorspace property for DP and HDMI.
      
      v4: Addressed Chris and Ville's review comments, and created a
      common colorspace property for DP and HDMI, filtered the list
      based on the colorspaces supported by the respective protocol
      standard.
      
      v5: Made the property creation helper accept enum list based on
      platform capabilties as suggested by Shashank. Consolidated HDMI
      and DP property creation in the common helper.
      
      v6: Addressed Shashank's review comments.
      
      v7: Added defines instead of enum in uapi as per Brian Starkey's
      suggestion in order to go with string matching at userspace. Updated
      the commit message to add more details as well kernel docs.
      
      v8: Addressed Maarten's review comments.
      
      v9: Removed macro defines from uapi as per Brian Starkey and Daniel
      Stone's comments and moved to drm include file. Moved back to older
      design with exposing all HDMI colorspaces to userspace since infoframe
      capability is there even on legacy platforms, as per Ville's review
      comments.
      
      v10: Fixed sparse warnings, updated the RB from Maarten and Jani's ack.
      
      v11: Addressed Ville's review comments. Updated the Macro naming and
      added DCI-P3 colorspace as well, defined in CTA 861.G spec.
      
      v12: Appended BT709 and SMPTE 170M with YCC information as per Ville's
      review comment to be clear and not to be confused with RGB.
      
      v13: Reorder the colorspace macros.
      
      v14: Removed DP as of now, will be added later once full support is
      enabled, as per Ville's suggestion. Added Ville's RB.
      
      Signed-off-by: default avatarUma Shankar <uma.shankar@intel.com>
      Acked-by: default avatarJani Nikula <jani.nikula@intel.com>
      Reviewed-by: default avatarShashank Sharma <shashank.sharma@intel.com>
      Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/1550596381-993-2-git-send-email-uma.shankar@intel.com
      d2c6a405
    • Rob Herring's avatar
      drm: Add reservation_object to drm_gem_object · 1ba62714
      Rob Herring authored
      
      Many users of drm_gem_object embed a struct reservation_object into
      their subclassed struct, so let's add one to struct drm_gem_object.
      This will allow removing the reservation object from the subclasses
      and removing the ->gem_prime_res_obj callback.
      
      With the addition, add a drm_gem_reservation_object_wait() helper
      function for drivers to use in wait ioctls.
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190202154158.10443-2-robh@kernel.org
      
      
      Signed-off-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
      Unverified
      1ba62714
  15. Feb 13, 2019
  16. Feb 08, 2019
  17. Feb 07, 2019
  18. Feb 06, 2019
    • Ard Biesheuvel's avatar
      drm: disable uncached DMA optimization for ARM and arm64 · e02f5c1b
      Ard Biesheuvel authored
      
      The DRM driver stack is designed to work with cache coherent devices
      only, but permits an optimization to be enabled in some cases, where
      for some buffers, both the CPU and the GPU use uncached mappings,
      removing the need for DMA snooping and allocation in the CPU caches.
      
      The use of uncached GPU mappings relies on the correct implementation
      of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU
      will use cached mappings nonetheless. On x86 platforms, this does not
      seem to matter, as uncached CPU mappings will snoop the caches in any
      case. However, on ARM and arm64, enabling this optimization on a
      platform where NoSnoop is ignored results in loss of coherency, which
      breaks correct operation of the device. Since we have no way of
      detecting whether NoSnoop works or not, just disable this
      optimization entirely for ARM and arm64.
      
      Cc: Christian Koenig <christian.koenig@amd.com>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Cc: David Zhou <David1.Zhou@amd.com>
      Cc: Huang Rui <ray.huang@amd.com>
      Cc: Junwei Zhang <Jerry.Zhang@amd.com>
      Cc: Michel Daenzer <michel.daenzer@amd.com>
      Cc: David Airlie <airlied@linux.ie>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Maxime Ripard <maxime.ripard@bootlin.com>
      Cc: Sean Paul <sean@poorly.run>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
      Cc: dri-devel <dri-devel@lists.freedesktop.org>
      Reported-by: default avatarCarsten Haitzler <Carsten.Haitzler@arm.com>
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.kernel.org/patch/10778815/
      
      
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      e02f5c1b
  19. Feb 05, 2019
    • Lyude Paul's avatar
      drm/atomic: Add drm_atomic_state->duplicated · 022debad
      Lyude Paul authored
      
      Since
      
      commit 39b50c60 ("drm/atomic_helper: Stop modesets on unregistered
      connectors harder")
      
      We've been failing atomic checks if they try to enable new displays on
      unregistered connectors. This is fine except for the one situation that
      breaks atomic assumptions: suspend/resume. If a connector is
      unregistered before we attempt to restore the atomic state, something we
      end up failing the atomic check that happens when trying to restore the
      state during resume.
      
      Normally this would be OK: we try our best to make sure that the atomic
      state pre-suspend can be restored post-suspend, but failures at that
      point usually don't cause problems. That is of course, until we
      introduced the new atomic MST VCPI helpers:
      
      [drm:drm_atomic_helper_check_modeset [drm_kms_helper]] [CRTC:65:pipe B] active changed
      [drm:drm_atomic_helper_check_modeset [drm_kms_helper]] Updating routing for [CONNECTOR:123:DP-5]
      [drm:drm_atomic_helper_check_modeset [drm_kms_helper]] Disabling [CONNECTOR:123:DP-5]
      [drm:drm_atomic_get_private_obj_state [drm]] Added new private object 0000000025844636 state 000000009fd2899a to 000000003a13d7b8
      WARNING: CPU: 6 PID: 1070 at drivers/gpu/drm/drm_dp_mst_topology.c:3153 drm_dp_atomic_release_vcpi_slots+0xb9/0x200 [drm_kms_helper]
      Modules linked in: fuse vfat fat snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic joydev iTCO_wdt i915(O) wmi_bmof intel_rapl btusb btrtl x86_pkg_temp_thermal btbcm btintel coretemp i2c_algo_bit drm_kms_helper(O) crc32_pclmul snd_hda_intel syscopyarea sysfillrect snd_hda_codec sysimgblt snd_hda_core bluetooth fb_sys_fops snd_pcm pcspkr drm(O) psmouse snd_timer mei_me ecdh_generic i2c_i801 mei i2c_core ucsi_acpi typec_ucsi typec wmi thinkpad_acpi ledtrig_audio snd soundcore tpm_tis rfkill tpm_tis_core video tpm acpi_pad pcc_cpufreq uas usb_storage crc32c_intel nvme serio_raw xhci_pci nvme_core xhci_hcd
      CPU: 6 PID: 1070 Comm: gnome-shell Tainted: G        W  O      5.0.0-rc2Lyude-Test+ #1
      Hardware name: LENOVO 20L8S2N800/20L8S2N800, BIOS N22ET35W (1.12 ) 04/09/2018
      RIP: 0010:drm_dp_atomic_release_vcpi_slots+0xb9/0x200 [drm_kms_helper]
      Code: 00 4c 39 6d f0 74 49 48 8d 7b 10 48 89 f9 48 c1 e9 03 42 80 3c 21 00 0f 85 d2 00 00 00 48 8b 6b 10 48 8d 5d f0 49 39 ee 75 c5 <0f> 0b 48 c7 c7 c0 78 b3 a0 48 89 c2 4c 89 ee e8 03 6c aa ff b8 ea
      RSP: 0018:ffff88841235f268 EFLAGS: 00010246
      RAX: ffff88841bf12ab0 RBX: ffff88841bf12aa8 RCX: 1ffff110837e2557
      RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffffed108246bde0
      RBP: ffff88841bf12ab8 R08: ffffed1083db3c93 R09: ffffed1083db3c92
      R10: ffffed1083db3c92 R11: ffff88841ed9e497 R12: ffff888419555d80
      R13: ffff8883bc499100 R14: ffff88841bf12ab8 R15: 0000000000000000
      FS:  00007f16fbd4cd00(0000) GS:ffff88841ed80000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007f1687c9f000 CR3: 00000003ba3cc003 CR4: 00000000003606e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       drm_atomic_helper_check_modeset+0xf21/0x2f50 [drm_kms_helper]
       ? drm_atomic_helper_commit_modeset_enables+0xa90/0xa90 [drm_kms_helper]
       ? __printk_safe_exit+0x10/0x10
       ? save_stack+0x8c/0xb0
       ? vprintk_func+0x96/0x1bf
       ? __printk_safe_exit+0x10/0x10
       intel_atomic_check+0x234/0x4750 [i915]
       ? printk+0x9f/0xc5
       ? kmsg_dump_rewind_nolock+0xd9/0xd9
       ? _raw_spin_lock_irqsave+0xa4/0x140
       ? drm_atomic_check_only+0xb1/0x28b0 [drm]
       ? drm_dbg+0x186/0x1b0 [drm]
       ? drm_dev_dbg+0x200/0x200 [drm]
       ? intel_link_compute_m_n+0xb0/0xb0 [i915]
       ? drm_mode_put_tile_group+0x20/0x20 [drm]
       ? skl_plane_format_mod_supported+0x17f/0x1b0 [i915]
       ? drm_plane_check_pixel_format+0x14a/0x310 [drm]
       drm_atomic_check_only+0x13c4/0x28b0 [drm]
       ? drm_state_info+0x220/0x220 [drm]
       ? drm_atomic_helper_disable_plane+0x1d0/0x1d0 [drm_kms_helper]
       ? pick_single_encoder_for_connector+0xe0/0xe0 [drm_kms_helper]
       ? kasan_unpoison_shadow+0x35/0x40
       drm_atomic_commit+0x3b/0x100 [drm]
       drm_atomic_helper_set_config+0xd5/0x100 [drm_kms_helper]
       drm_mode_setcrtc+0x636/0x1660 [drm]
       ? vprintk_func+0x96/0x1bf
       ? drm_dev_dbg+0x200/0x200 [drm]
       ? drm_mode_getcrtc+0x790/0x790 [drm]
       ? printk+0x9f/0xc5
       ? mutex_unlock+0x1d/0x40
       ? drm_mode_addfb2+0x2e9/0x3a0 [drm]
       ? rcu_sync_dtor+0x2e0/0x2e0
       ? drm_dbg+0x186/0x1b0 [drm]
       ? set_page_dirty+0x271/0x4d0
       drm_ioctl_kernel+0x203/0x290 [drm]
       ? drm_mode_getcrtc+0x790/0x790 [drm]
       ? drm_setversion+0x7f0/0x7f0 [drm]
       ? __switch_to_asm+0x34/0x70
       ? __switch_to_asm+0x34/0x70
       drm_ioctl+0x445/0x950 [drm]
       ? drm_mode_getcrtc+0x790/0x790 [drm]
       ? drm_getunique+0x220/0x220 [drm]
       ? expand_files.part.10+0x920/0x920
       do_vfs_ioctl+0x1a1/0x13d0
       ? ioctl_preallocate+0x2b0/0x2b0
       ? __fget_light+0x2d6/0x390
       ? schedule+0xd7/0x2e0
       ? fget_raw+0x10/0x10
       ? apic_timer_interrupt+0xa/0x20
       ? apic_timer_interrupt+0xa/0x20
       ? rcu_cleanup_dead_rnp+0x2c0/0x2c0
       ksys_ioctl+0x60/0x90
       __x64_sys_ioctl+0x6f/0xb0
       do_syscall_64+0x136/0x440
       ? syscall_return_slowpath+0x2d0/0x2d0
       ? do_page_fault+0x89/0x330
       ? __do_page_fault+0x9c0/0x9c0
       ? prepare_exit_to_usermode+0x188/0x200
       ? perf_trace_sys_enter+0x1090/0x1090
       ? __x64_sys_sigaltstack+0x280/0x280
       ? __put_user_4+0x1c/0x30
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      RIP: 0033:0x7f16ff89a09b
      Code: 0f 1e fa 48 8b 05 ed bd 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d bd bd 0c 00 f7 d8 64 89 01 48
      RSP: 002b:00007fff001232b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      RAX: ffffffffffffffda RBX: 00007fff001232f0 RCX: 00007f16ff89a09b
      RDX: 00007fff001232f0 RSI: 00000000c06864a2 RDI: 000000000000000b
      RBP: 00007fff001232f0 R08: 0000000000000000 R09: 000055a79d484460
      R10: 000055a79d44e770 R11: 0000000000000246 R12: 00000000c06864a2
      R13: 000000000000000b R14: 0000000000000000 R15: 000055a79d44e770
      WARNING: CPU: 6 PID: 1070 at drivers/gpu/drm/drm_dp_mst_topology.c:3153 drm_dp_atomic_release_vcpi_slots+0xb9/0x200 [drm_kms_helper]
      ---[ end trace d536c05c13c83be2 ]---
      [drm:drm_dp_atomic_release_vcpi_slots [drm_kms_helper]] *ERROR* no VCPI for [MST PORT:00000000f9e2b143] found in mst state 000000009fd2899a
      
      This appears to be happening because we destroy the VCPI allocations
      when disabling all connected displays while suspending, and those VCPI
      allocations don't get restored on resume due to failing to restore the
      atomic state.
      
      So, fix this by introducing the suspending option to
      drm_atomic_helper_duplicate_state() and use that to indicate in the
      atomic state that it's being used for suspending or resuming the system,
      and thus needs to be fixed up by the driver. We can then use the new
      state->duplicated hook to tell update_connector_routing() in
      drm_atomic_check_modeset() to allow for modesets on unregistered
      connectors, which allows us to restore atomic states that contain MST
      topologies that were removed after the state was duplicated and thus:
      mostly fixing suspend and resume. This just leaves some issues that were
      introduced with nouveau, that will be addressed next.
      
      Changes since v3:
      * Remove ->duplicated hunks that I left in the VCPI helpers by accident.
        These don't need to be here, that was the supposed to be the purpose
        of the last revision
      Changes since v2:
      * Remove the changes in this patch to the VCPI helpers, they aren't
        needed anymore
      Changes since v1:
      * Rename suspend_or_resume to duplicated
      
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Fixes: eceae147 ("drm/dp_mst: Start tracking per-port VCPI allocations")
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190202002023.29665-4-lyude@redhat.com
      022debad
Loading