Skip to content
  1. May 10, 2018
    • Dave Airlie's avatar
      Merge branch 'linux-4.17' of git://github.com/skeggsb/linux into drm-fixes · 7c2b1341
      Dave Airlie authored
      Two nouveau crasher/deadlock fixes.
      
      * 'linux-4.17' of git://github.com/skeggsb/linux:
        drm/nouveau: Fix deadlock in nv50_mstm_register_connector()
        drm/nouveau/ttm: don't dereference nvbo::cli, it can outlive client
      7c2b1341
    • Lyude Paul's avatar
      drm/nouveau: Fix deadlock in nv50_mstm_register_connector() · 352672db
      Lyude Paul authored
      
      
      Currently; we're grabbing all of the modesetting locks before adding MST
      connectors to fbdev. This isn't actually necessary, and causes a
      deadlock as well:
      
      ======================================================
      WARNING: possible circular locking dependency detected
      4.17.0-rc3Lyude-Test+ #1 Tainted: G           O
      ------------------------------------------------------
      kworker/1:0/18 is trying to acquire lock:
      00000000c832f62d (&helper->lock){+.+.}, at: drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
      
      but task is already holding lock:
      00000000942e28e2 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_backoff+0x8e/0x1c0 [drm]
      
      which lock already depends on the new lock.
      
      the existing dependency chain (in reverse order) is:
      
      -> #3 (crtc_ww_class_mutex){+.+.}:
             ww_mutex_lock+0x43/0x80
             drm_modeset_lock+0x71/0x130 [drm]
             drm_helper_probe_single_connector_modes+0x7d/0x6b0 [drm_kms_helper]
             drm_setup_crtcs+0x15e/0xc90 [drm_kms_helper]
             __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper]
             nouveau_fbcon_init+0x138/0x1a0 [nouveau]
             nouveau_drm_load+0x173/0x7e0 [nouveau]
             drm_dev_register+0x134/0x1c0 [drm]
             drm_get_pci_dev+0x8e/0x160 [drm]
             nouveau_drm_probe+0x1a9/0x230 [nouveau]
             pci_device_probe+0xcd/0x150
             driver_probe_device+0x30b/0x480
             __driver_attach+0xbc/0xe0
             bus_for_each_dev+0x67/0x90
             bus_add_driver+0x164/0x260
             driver_register+0x57/0xc0
             do_one_initcall+0x4d/0x323
             do_init_module+0x5b/0x1f8
             load_module+0x20e5/0x2ac0
             __do_sys_finit_module+0xb7/0xd0
             do_syscall_64+0x60/0x1b0
             entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      -> #2 (crtc_ww_class_acquire){+.+.}:
             drm_helper_probe_single_connector_modes+0x58/0x6b0 [drm_kms_helper]
             drm_setup_crtcs+0x15e/0xc90 [drm_kms_helper]
             __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper]
             nouveau_fbcon_init+0x138/0x1a0 [nouveau]
             nouveau_drm_load+0x173/0x7e0 [nouveau]
             drm_dev_register+0x134/0x1c0 [drm]
             drm_get_pci_dev+0x8e/0x160 [drm]
             nouveau_drm_probe+0x1a9/0x230 [nouveau]
             pci_device_probe+0xcd/0x150
             driver_probe_device+0x30b/0x480
             __driver_attach+0xbc/0xe0
             bus_for_each_dev+0x67/0x90
             bus_add_driver+0x164/0x260
             driver_register+0x57/0xc0
             do_one_initcall+0x4d/0x323
             do_init_module+0x5b/0x1f8
             load_module+0x20e5/0x2ac0
             __do_sys_finit_module+0xb7/0xd0
             do_syscall_64+0x60/0x1b0
             entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      -> #1 (&dev->mode_config.mutex){+.+.}:
             drm_setup_crtcs+0x10c/0xc90 [drm_kms_helper]
             __drm_fb_helper_initial_config_and_unlock+0x29/0x480 [drm_kms_helper]
             nouveau_fbcon_init+0x138/0x1a0 [nouveau]
             nouveau_drm_load+0x173/0x7e0 [nouveau]
             drm_dev_register+0x134/0x1c0 [drm]
             drm_get_pci_dev+0x8e/0x160 [drm]
             nouveau_drm_probe+0x1a9/0x230 [nouveau]
             pci_device_probe+0xcd/0x150
             driver_probe_device+0x30b/0x480
             __driver_attach+0xbc/0xe0
             bus_for_each_dev+0x67/0x90
             bus_add_driver+0x164/0x260
             driver_register+0x57/0xc0
             do_one_initcall+0x4d/0x323
             do_init_module+0x5b/0x1f8
             load_module+0x20e5/0x2ac0
             __do_sys_finit_module+0xb7/0xd0
             do_syscall_64+0x60/0x1b0
             entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      -> #0 (&helper->lock){+.+.}:
             __mutex_lock+0x70/0x9d0
             drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
             nv50_mstm_register_connector+0x2c/0x50 [nouveau]
             drm_dp_add_port+0x2f5/0x420 [drm_kms_helper]
             drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
             drm_dp_add_port+0x33f/0x420 [drm_kms_helper]
             drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
             drm_dp_check_and_send_link_address+0x87/0xd0 [drm_kms_helper]
             drm_dp_mst_link_probe_work+0x4d/0x80 [drm_kms_helper]
             process_one_work+0x20d/0x650
             worker_thread+0x3a/0x390
             kthread+0x11e/0x140
             ret_from_fork+0x3a/0x50
      
      other info that might help us debug this:
      Chain exists of:
        &helper->lock --> crtc_ww_class_acquire --> crtc_ww_class_mutex
       Possible unsafe locking scenario:
             CPU0                    CPU1
             ----                    ----
        lock(crtc_ww_class_mutex);
                                     lock(crtc_ww_class_acquire);
                                     lock(crtc_ww_class_mutex);
        lock(&helper->lock);
      
       *** DEADLOCK ***
      5 locks held by kworker/1:0/18:
       #0: 000000004a05cd50 ((wq_completion)"events_long"){+.+.}, at: process_one_work+0x187/0x650
       #1: 00000000601c11d1 ((work_completion)(&mgr->work)){+.+.}, at: process_one_work+0x187/0x650
       #2: 00000000586ca0df (&dev->mode_config.mutex){+.+.}, at: drm_modeset_lock_all+0x3a/0x1b0 [drm]
       #3: 00000000d3ca0ffa (crtc_ww_class_acquire){+.+.}, at: drm_modeset_lock_all+0x44/0x1b0 [drm]
       #4: 00000000942e28e2 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_backoff+0x8e/0x1c0 [drm]
      
      stack backtrace:
      CPU: 1 PID: 18 Comm: kworker/1:0 Tainted: G           O      4.17.0-rc3Lyude-Test+ #1
      Hardware name: Gateway FX6840/FX6840, BIOS P01-A3         05/17/2010
      Workqueue: events_long drm_dp_mst_link_probe_work [drm_kms_helper]
      Call Trace:
       dump_stack+0x85/0xcb
       print_circular_bug.isra.38+0x1ce/0x1db
       __lock_acquire+0x128f/0x1350
       ? lock_acquire+0x9f/0x200
       ? lock_acquire+0x9f/0x200
       ? __ww_mutex_lock.constprop.13+0x8f/0x1000
       lock_acquire+0x9f/0x200
       ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       __mutex_lock+0x70/0x9d0
       ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       ? ww_mutex_lock+0x43/0x80
       ? _cond_resched+0x15/0x30
       ? ww_mutex_lock+0x43/0x80
       ? drm_modeset_lock+0xb2/0x130 [drm]
       ? drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       drm_fb_helper_add_one_connector+0x2a/0x60 [drm_kms_helper]
       nv50_mstm_register_connector+0x2c/0x50 [nouveau]
       drm_dp_add_port+0x2f5/0x420 [drm_kms_helper]
       ? mark_held_locks+0x50/0x80
       ? kfree+0xcf/0x2a0
       ? drm_dp_check_mstb_guid+0xd6/0x120 [drm_kms_helper]
       ? trace_hardirqs_on_caller+0xed/0x180
       ? drm_dp_check_mstb_guid+0xd6/0x120 [drm_kms_helper]
       drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
       drm_dp_add_port+0x33f/0x420 [drm_kms_helper]
       ? nouveau_connector_aux_xfer+0x7c/0xb0 [nouveau]
       ? find_held_lock+0x2d/0x90
       ? drm_dp_dpcd_access+0xd9/0xf0 [drm_kms_helper]
       ? __mutex_unlock_slowpath+0x3b/0x280
       ? drm_dp_dpcd_access+0xd9/0xf0 [drm_kms_helper]
       drm_dp_send_link_address+0x155/0x1e0 [drm_kms_helper]
       drm_dp_check_and_send_link_address+0x87/0xd0 [drm_kms_helper]
       drm_dp_mst_link_probe_work+0x4d/0x80 [drm_kms_helper]
       process_one_work+0x20d/0x650
       worker_thread+0x3a/0x390
       ? process_one_work+0x650/0x650
       kthread+0x11e/0x140
       ? kthread_create_worker_on_cpu+0x50/0x50
       ret_from_fork+0x3a/0x50
      
      Taking example from i915, the only time we need to hold any modesetting
      locks is when changing the port on the mstc, and in that case we only
      need to hold the connection mutex.
      
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Cc: Karol Herbst <kherbst@redhat.com>
      Cc: stable@vger.kernel.org
      
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      352672db
    • Ben Skeggs's avatar
      drm/nouveau/ttm: don't dereference nvbo::cli, it can outlive client · 0d5a03c3
      Ben Skeggs authored
      
      
      Potentially responsible for some random OOPSes.
      
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      Cc: stable@vger.kernel.org [v4.15+]
      0d5a03c3
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · 5c0e0b45
      Dave Airlie authored
      A little bigger than normal since this is two weeks of fixes.
      - Atom firmware table updates for vega12
      - Fix fallout from huge page support
      - Fix up smu7 power profile interface to be consistent with vega
      - Misc other fixes
      
      * 'drm-fixes-4.17' of git://people.freedesktop.org/~agd5f/linux:
        drm/amd/pp: Refine the output of pp_power_profile_mode on VI
        drm/amdgpu: Switch to interruptable wait to recover from ring hang.
        drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages
        drm/amd/display: Use kvzalloc for potentially large allocations
        drm/amd/display: Don't return ddc result and read_bytes in same return value
        drm/amd/display: Add get_firmware_info_v3_2 for VG12
        drm/amd: Add BIOS smu_info v3_3 required struct def.
        drm/amd/display: Add VG12 ASIC IDs
      5c0e0b45
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 44ef02c2
      Dave Airlie authored
      atomic: Clear state pointers on clear (Ville)
      vc4: Fix oops in dpi disable (Eric)
      omap: Various error-checking + uninitialized var fixes (Tomi)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
      
      * tag 'drm-misc-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-misc:
        drm/vc4: Fix scaling of uni-planar formats
        drm/bridge/sii8620: add Kconfig dependency on extcon
        drm/omap: handle alloc failures in omap_connector
        drm/omap: add missing linefeeds to prints
        drm/omap: handle error if scale coefs are not found
        drm/omap: check return value from soc_device_match
        drm/omap: fix possible NULL ref issue in tiler_reserve_2d
        drm/omap: fix uninitialized ret variable
        drm/omap: silence unititialized variable warning
        drm/vc4: Fix oops dereferencing DPI's connector since panel_bridge.
        drm/atomic: Clean private obj old_state/new_state in drm_atomic_state_default_clear()
        drm/atomic: Clean old_state/new_state in drm_atomic_state_default_clear()
      44ef02c2
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2018-05-09' of... · 03a0a3e5
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      - Increase LVDS panel timeout to 5s to avoid spurious *ERROR*
      - Fix 2 WARNS: BIOS framebuffer related (FDO #105992) and eDP cdclk mismatch
      
      * tag 'drm-intel-fixes-2018-05-09' of git://anongit.freedesktop.org/drm/drm-intel:
        drm/i915: Fix drm:intel_enable_lvds ERROR message in kernel log
        drm/i915: Correctly populate user mode h/vdisplay with pipe src size during readout
        drm/i915: Adjust eDP's logical vco in a reliable place.
      03a0a3e5
    • Dave Airlie's avatar
      Merge tag 'exynos-drm-fixes-for-v4.17-rc5' of... · 87bf742b
      Dave Airlie authored
      Merge tag 'exynos-drm-fixes-for-v4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes
      
      Fixup pagefault issue of mixer driver
      - it makes sure to check shadow register for interlace scan.
      - it corrects chroma_addr[1], height and vertical position values.
      And trivial cleanup
      - it just removes duplicated drm_bridge_attach.
      
      * tag 'exynos-drm-fixes-for-v4.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
        drm/exynos: hdmi: avoid duplicating drm_bridge_attach
        drm/exynos: mixer: avoid Oops in vp_video_buffer()
        drm/exynos/mixer: fix synchronization check in interlaced mode
      87bf742b
    • Mathieu Malaterre's avatar
      agp: uninorth: make two functions static · dec60f3a
      Mathieu Malaterre authored
      
      
      Both ‘uninorth_remove_memory’ and ‘null_cache_flush’ can be made
      static. So make them.
      
      Silence the following gcc warning (W=1):
      
        drivers/char/agp/uninorth-agp.c:198:5: warning: no previous prototype for ‘uninorth_remove_memory’ [-Wmissing-prototypes]
      
      and
      
        drivers/char/agp/uninorth-agp.c:473:6: warning: no previous prototype for ‘null_cache_flush’ [-Wmissing-prototypes]
      
      Signed-off-by: default avatarMathieu Malaterre <malat@debian.org>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      dec60f3a
    • Rex Zhu's avatar
      drm/amd/pp: Refine the output of pp_power_profile_mode on VI · 639f7902
      Rex Zhu authored
      
      
      In order to keep consist with Vega,
      the output format of the pp_power_profile_mode would be
      <integer><mode name string>< “*” for current profile>:"detail settings"
      and remove the "CURRENT" mode line.
      
      for example:
      NUM        MODE_NAME     SCLK_UP_HYST   SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL     MCLK_UP_HYST   MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL
        0   3D_FULL_SCREEN:        0              100               30                0              100               10
        1     POWER_SAVING:       10                0               30                -                -                -
        2            VIDEO:        -                -                -               10               16               31
        3               VR:        0               11               50                0              100               10
        4          COMPUTE:        0                5               30                -                -                -
        5         CUSTOM *:        0                5               30                0              100               10
      NUM        MODE_NAME     SCLK_UP_HYST   SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL     MCLK_UP_HYST   MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL
        0   3D_FULL_SCREEN:        0              100               30                0              100               10
        1   POWER_SAVING *:       10                0               30                0              100               10
        2            VIDEO:        -                -                -               10               16               31
        3               VR:        0               11               50                0              100               10
        4          COMPUTE:        0                5               30                -                -                -
        5           CUSTOM:        -                -                -                -                -                -
      
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      639f7902
    • Andrey Grodzovsky's avatar
      drm/amdgpu: Switch to interruptable wait to recover from ring hang. · e6a5b9f9
      Andrey Grodzovsky authored
      
      
      v2:
      Use dma_fence_wait instead of dma_fence_wait_timeout(...,MAX_SCHEDULE_TIMEOUT)
      Avoid printing error message for ERESTARTSYS
      
      Originally-by: default avatarDavid Panariti <David.Panariti@amd.com>
      Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      e6a5b9f9
    • Michel Dänzer's avatar
      drm/ttm: Use GFP_TRANSHUGE_LIGHT for allocating huge pages · da291320
      Michel Dänzer authored
      
      
      GFP_TRANSHUGE tries very hard to allocate huge pages, which can result
      in long delays with high memory pressure. I have observed firefox
      freezing for up to around a minute due to this while restic was taking
      a full system backup.
      
      Since we don't really need huge pages, use GFP_TRANSHUGE_LIGHT |
      __GFP_NORETRY instead, in order to fail quickly when there are no huge
      pages available.
      
      Set __GFP_KSWAPD_RECLAIM as well, in order for huge pages to be freed
      up in the background if necessary.
      
      With these changes, I'm no longer seeing freezes during a restic backup.
      
      Cc: stable@vger.kernel.org
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      da291320
    • Michel Dänzer's avatar
      drm/amd/display: Use kvzalloc for potentially large allocations · bd4caed4
      Michel Dänzer authored
      
      
      Allocating up to 32 physically contiguous pages can easily fail (and has
      failed for me), and isn't necessary anyway.
      
      Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
      Signed-off-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      bd4caed4
    • Harry Wentland's avatar
    • Harry Wentland's avatar
    • Jerry (Fangzhi) Zuo's avatar
    • Harry Wentland's avatar
  2. May 09, 2018
  3. May 08, 2018
    • Florent Flament's avatar
      drm/i915: Fix drm:intel_enable_lvds ERROR message in kernel log · e8f48f96
      Florent Flament authored
      
      
      Fix `[drm:intel_enable_lvds] *ERROR* timed out waiting for panel to
      power on` in kernel log at boot time.
      
      Toshiba Satellite Z930 laptops needs between 1 and 2 seconds to power
      on its screen during Intel i915 DRM initialization. This currently
      results in a `[drm:intel_enable_lvds] *ERROR* timed out waiting for
      panel to power on` message appearing in the kernel log during boot
      time and when stopping the machine.
      
      This change increases the timeout of the `intel_enable_lvds` function
      from 1 to 5 seconds, letting enough time for the Satellite 930 LCD
      screen to power on, and suppressing the error message from the kernel
      log.
      
      This patch has been successfully tested on Linux 4.14 running on a
      Toshiba Satellite Z930.
      
      [vsyrjala: bump the timeout from 2 to 5 seconds to match the DP
       code and properly cover the max hw timeout of ~4 seconds, and
       drop the comment about the specific machine since this is not
       a particulary surprising issue, nor specific to that one machine]
      
      Signed-off-by: default avatarFlorent Flament <contact@florentflament.com>
      Cc: stable@vger.kernel.org
      Cc: Pavel Petrovic <ppetrovic@acm.org>
      Cc: Sérgio M. Basto <sergio@serjux.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103414
      References: https://bugzilla.kernel.org/show_bug.cgi?id=57591
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180419160700.19828-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
      (cherry picked from commit 280b54ad
      
      )
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      e8f48f96
    • Ville Syrjälä's avatar
      drm/i915: Correctly populate user mode h/vdisplay with pipe src size during readout · 660d88e7
      Ville Syrjälä authored
      During state readout we first read out the pipe src size, store
      that information in the user mode h/vdisplay, but later on we overwrite
      that with the actual crtc timings. That makes our read out crtc state
      inconsistent with itself when the BIOS has enabled the panel fitter to
      scale the pipe contents. Let's preserve the pipe src size based
      information in the user mode to make things consistent again.
      
      This fixes a problem introduced by commit a2936e3d
      
       ("drm/i915:
      Use drm_mode_get_hv_timing() to populate plane clip rectangle")
      where the inconsistent state is now leading the plane clipping code
      to report a failure on account the plane dst coordinates not matching
      the user mode size. Previously we did the plane clipping based on
      the pipe src size instead and thus never noticed the inconsistency.
      
      The failure manifests as a WARN:
      [    0.762117] [drm:intel_dump_pipe_config [i915]] requested mode:
      [    0.762142] [drm:drm_mode_debug_printmodeline [drm]] Modeline 0:"1366x768" 60 72143 1366 1414 1446 1526 768 771 777 784 0x40 0xa
      ...
      [    0.762327] [drm:intel_dump_pipe_config [i915]] port clock: 72143, pipe src size: 1024x768, pixel rate 72143
      ...
      [    0.764666] [drm:drm_atomic_helper_check_plane_state [drm_kms_helper]] Plane must cover entire CRTC
      [    0.764690] [drm:drm_rect_debug_print [drm]] dst: 1024x768+0+0
      [    0.764711] [drm:drm_rect_debug_print [drm]] clip: 1366x768+0+0
      [    0.764713] ------------[ cut here ]------------
      [    0.764714] Could not determine valid watermarks for inherited state
      [    0.764792] WARNING: CPU: 4 PID: 159 at drivers/gpu/drm/i915/intel_display.c:14584 intel_modeset_init+0x3ce/0x19d0 [i915]
      ...
      
      Cc: FadeMind <fademind@gmail.com>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reported-by: default avatarFadeMind <fademind@gmail.com>
      Reported-by: default avatarDave Jones <davej@codemonkey.org.uk>
      Tested-by: default avatarDave Jones <davej@codemonkey.org.uk>
      References: https://lists.freedesktop.org/archives/intel-gfx/2018-April/163186.html
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105992
      Fixes: a2936e3d
      
       ("drm/i915: Use drm_mode_get_hv_timing() to populate plane clip rectangle")
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180426163015.14232-1-ville.syrjala@linux.intel.com
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Tested-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Tested-by: default avatarFadeMind <fademind@gmail.com>
      (cherry picked from commit bd4cd03c
      
      )
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      660d88e7
    • Rodrigo Vivi's avatar
      drm/i915: Adjust eDP's logical vco in a reliable place. · 9d219554
      Rodrigo Vivi authored
      
      
      On intel_dp_compute_config() we were calculating the needed vco
      for eDP on gen9 and we stashing it in
      intel_atomic_state.cdclk.logical.vco
      
      However few moments later on intel_modeset_checks() we fully
      replace entire intel_atomic_state.cdclk.logical with
      dev_priv->cdclk.logical fully overwriting the logical desired
      vco for eDP on gen9.
      
      So, with wrong VCO value we end up with wrong desired cdclk, but
      also it will raise a lot of WARNs: On gen9, when we read
      CDCLK_CTL to verify if we configured properly the desired
      frequency the CD Frequency Select bits [27:26] == 10b can mean
      337.5 or 308.57 MHz depending on the VCO. So if we have wrong
      VCO value stashed we will believe the frequency selection didn't
      stick and start to raise WARNs of cdclk mismatch.
      
      [   42.857519] [drm:intel_dump_cdclk_state [i915]] Changing CDCLK to 308571 kHz, VCO 8640000 kHz, ref 24000 kHz, bypass 24000 kHz, voltage level 0
      [   42.897269] cdclk state doesn't match!
      [   42.901052] WARNING: CPU: 5 PID: 1116 at drivers/gpu/drm/i915/intel_cdclk.c:2084 intel_set_cdclk+0x5d/0x110 [i915]
      [   42.938004] RIP: 0010:intel_set_cdclk+0x5d/0x110 [i915]
      [   43.155253] WARNING: CPU: 5 PID: 1116 at drivers/gpu/drm/i915/intel_cdclk.c:2084 intel_set_cdclk+0x5d/0x110 [i915]
      [   43.170277] [drm:intel_dump_cdclk_state [i915]] [hw state] 337500 kHz, VCO 8100000 kHz, ref 24000 kHz, bypass 24000 kHz, voltage level 0
      [   43.182566] [drm:intel_dump_cdclk_state [i915]] [sw state] 308571 kHz, VCO 8640000 kHz, ref 24000 kHz, bypass 24000 kHz, voltage level 0
      
      v2: Move the entire eDP's vco logical adjustment to inside
          the skl_modeset_calc_cdclk as suggested by Ville.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Fixes: bb0f4aab ("drm/i915: Track full cdclk state for the logical and actual cdclk frequencies")
      Cc: <stable@vger.kernel.org> # v4.12+
      Link: https://patchwork.freedesktop.org/patch/msgid/20180502175255.5344-1-rodrigo.vivi@intel.com
      (cherry picked from commit 3297234a
      
      )
      Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      9d219554
  4. May 07, 2018
  5. May 06, 2018
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 701e39d0
      Linus Torvalds authored
      Pll KVM fixes from Radim Krčmář:
       "ARM:
         - Fix proxying of GICv2 CPU interface accesses
         - Fix crash when switching to BE
         - Track source vcpu git GICv2 SGIs
         - Fix an outdated bit of documentation
      
        x86:
         - Speed up injection of expired timers (for stable)"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: x86: remove APIC Timer periodic/oneshot spikes
        arm64: vgic-v2: Fix proxying of cpuif access
        KVM: arm/arm64: vgic_init: Cleanup reference to process_maintenance
        KVM: arm64: Fix order of vcpu_write_sys_reg() arguments
        KVM: arm/arm64: vgic: Fix source vcpu issues for GICv2 SGI
      701e39d0
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 772d4f84
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - fix a compile warning in the AMD IOMMU driver with irq remapping
         disabled
      
       - fix for VT-d interrupt remapping and invalidation size (caused a
         BUG_ON when trying to invalidate more than 4GB)
      
       - build fix and a regression fix for broken graphics with old DTS for
         the rockchip iommu driver
      
       - a revert in the PCI window reservation code which fixes a regression
         with VFIO.
      
      * tag 'iommu-fixes-v4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu: rockchip: fix building without CONFIG_OF
        iommu/vt-d: Use WARN_ON_ONCE instead of BUG_ON in qi_flush_dev_iotlb()
        iommu/vt-d: fix shift-out-of-bounds in bug checking
        iommu/dma: Move PCI window region reservation back into dma specific path.
        iommu/rockchip: Make clock handling optional
        iommu/amd: Hide unused iommu_table_lock
        iommu/vt-d: Fix usage of force parameter in intel_ir_reconfigure_irte()
      772d4f84
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9c48eb6a
      Linus Torvalds authored
      Pull x86 fix from Thomas Gleixner:
       "Unbreak the CPUID CPUID_8000_0008_EBX reload which got dropped when
        the evaluation of physical and virtual bits which uses the same CPUID
        leaf was moved out of get_cpu_cap()"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Restore CPUID_8000_0008_EBX reload
      9c48eb6a
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fe282c60
      Linus Torvalds authored
      Pull clocksource fixes from Thomas Gleixner:
       "The recent addition of the early TSC clocksource breaks on machines
        which have an unstable TSC because in case that TSC is disabled, then
        the clocksource selection logic falls back to the early TSC which is
        obviously bogus.
      
        That also unearthed a few robustness issues in the clocksource
        derating code which are addressed as well"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource: Rework stale comment
        clocksource: Consistent de-rate when marking unstable
        x86/tsc: Fix mark_tsc_unstable()
        clocksource: Initialize cs->wd_list
        clocksource: Allow clocksource_mark_unstable() on unregistered clocksources
        x86/tsc: Always unregister clocksource_tsc_early
      fe282c60
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 03b5f0c1
      Linus Torvalds authored
      Pull irq fix from Thomas Gleixner:
       "A single fix to prevent false positives in the spurious interrupt
        detector when more than a single demultiplex register is evaluated in
        the Qualcom irq combiner driver"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/qcom: Fix check for spurious interrupts
      03b5f0c1
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v4.17-2' of git://git.infradead.org/linux-platform-drivers-x86 · ee946c36
      Linus Torvalds authored
      Pull x86 platform driver fixes from Darren Hart:
      
       - We missed a case in the Dell config dependencies resulting in a
         possible bad configuration, resolve it by giving up on trying to keep
         DELL_LAPTOP visible in the menu and make it depend on DELL_SMBIOS.
      
       - Fix a null pointer dereference at module unload for the asus-wireless
         driver.
      
      * tag 'platform-drivers-x86-v4.17-2' of git://git.infradead.org/linux-platform-drivers-x86:
        platform/x86: Kconfig: Fix dell-laptop dependency chain.
        platform/x86: asus-wireless: Fix NULL pointer dereference
      ee946c36
    • Linus Torvalds's avatar
      Merge tag 'usb-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 8e95cb33
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some USB driver fixes for 4.17-rc4.
      
        The majority of them are some USB gadget fixes that missed my last
        pull request. The "largest" patch in here is a fix for the old visor
        driver that syzbot found 6 months or so ago and I finally remembered
        to fix it.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-4.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        Revert "usb: host: ehci: Use dma_pool_zalloc()"
        usb: typec: tps6598x: handle block reads separately with plain-I2C adapters
        usb: typec: tcpm: Release the role mux when exiting
        USB: Accept bulk endpoints with 1024-byte maxpacket
        xhci: Fix use-after-free in xhci_free_virt_device
        USB: serial: visor: handle potential invalid device configuration
        USB: serial: option: adding support for ublox R410M
        usb: musb: trace: fix NULL pointer dereference in musb_g_tx()
        usb: musb: host: fix potential NULL pointer dereference
        usb: gadget: composite Allow for larger configuration descriptors
        usb: dwc3: gadget: Fix list_del corruption in dwc3_ep_dequeue
        usb: dwc3: gadget: dwc3_gadget_del_and_unmap_request() can be static
        usb: dwc2: pci: Fix error return code in dwc2_pci_probe()
        usb: dwc2: WA for Full speed ISOC IN in DDMA mode.
        usb: dwc2: dwc2_vbus_supply_init: fix error check
        usb: gadget: f_phonet: fix pn_net_xmit()'s return type
      8e95cb33