1. 14 Mar, 2018 16 commits
    • Christian König's avatar
      drm/ttm: move initializing ttm->sg into ttm_tt_init_fields · 536bbeba
      Christian König authored
      Better to set this with all other fields as well.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarRoger He <Hongbo.He@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      536bbeba
    • Christian König's avatar
      drm/ttm: add bo as parameter to the ttm_tt_create callback · dde5da23
      Christian König authored
      Instead of calculating the size in bytes just to recalculate the number
      of pages from it pass the BO directly to the function.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarRoger He <Hongbo.He@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      dde5da23
    • Christian König's avatar
      drm/ttm: add ttm_bo_pipeline_gutting · 5d951098
      Christian König authored
      Allows us to gut a BO of it's backing store when the driver says that it
      isn't needed any more.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Acked-by: default avatarRoger He <Hongbo.He@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      5d951098
    • Monk Liu's avatar
      drm/amdgpu: refactoring mailbox to fix TDR handshake bugs(v2) · 48527e52
      Monk Liu authored
      this patch actually refactor mailbox implmentations, and
      all below changes are needed together to fix all those mailbox
      handshake issues exposured by heavey TDR test.
      
      1)refactor all mailbox functions based on byte accessing for mb_control
      reason is to avoid touching non-related bits when writing trn/rcv part of
      mailbox_control, this way some incorrect INTR sent to hypervisor
      side could be avoided, and it fixes couple handshake bug.
      
      2)trans_msg function re-impled: put a invalid
      logic before transmitting message to make sure the ACK bit is in
      a clear status, otherwise there is chance that ACK asserted already
      before transmitting message and lead to fake ACK polling.
      (hypervisor side have some tricks to workaround ACK bit being corrupted
      by VF FLR which hase an side effects that may make guest side ACK bit
      asserted wrongly), and clear TRANS_MSG words after message transferred.
      
      3)for mailbox_flr_work, it is also re-worked: it takes the mutex lock
      first if invoked, to block gpu recover's participate too early while
      hypervisor side is doing VF FLR. (hypervisor sends FLR_NOTIFY to guest
      before doing VF FLR and sentds FLR_COMPLETE after VF FLR done, and
      the FLR_NOTIFY will trigger interrupt to guest which lead to
      mailbox_flr_work being invoked)
      
      This can avoid the issue that mailbox trans msg being cleared by its VF FLR.
      
      4)for mailbox_rcv_irq IRQ routine, it should only peek msg and schedule
      mailbox_flr_work, instead of ACK to hypervisor itself, because FLR_NOTIFY
      msg sent from hypervisor side doesn't need VF's ACK (this is because
      VF's ACK would lead to hypervisor clear its trans_valid/msg, and this
      would cause handshake bug if trans_valid/msg is cleared not due to
      correct VF ACK but from a wrong VF ACK like this "FLR_NOTIFY" one)
      
      This fixed handshake bug that sometimes GUEST always couldn't receive
      "READY_TO_ACCESS_GPU" msg from hypervisor.
      
      5)seperate polling time limite accordingly:
      POLL ACK cost no more than 500ms
      POLL MSG cost no more than 12000ms
      POLL FLR finish cost no more than 500ms
      
      6) we still need to set adev into in_gpu_reset mode after we received
      FLR_NOTIFY from host side, this can prevent innocent app wrongly succesed
      to open amdgpu dri device.
      
      FLR_NOFITY is received due to an IDLE hang detected from hypervisor side
      which indicating GPU is already die in this VF.
      
      v2:
      use MACRO as the offset of mailbox_control register
      don't test if NOTIFY_CMPL event in rcv_msg since it won't
      recieve that message anymore
      Signed-off-by: default avatarMonk Liu <Monk.Liu@amd.com>
      Reviewed-by: default avatarPixel Ding <Pixel.Ding@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      48527e52
    • Monk Liu's avatar
      drm/amdgpu: implement mmio byte access helper for MB · 421a2a30
      Monk Liu authored
      mailbox registers can be accessed with a byte boundry according
      to BIF team, so this patch prepares register byte access
      and will be used by following patches.
      
      Actually, for mailbox registers once the byte field is touched even not changed,
      the mailbox behaves, so we need the byte width accessing to those sort of regs.
      Signed-off-by: default avatarMonk Liu <Monk.Liu@amd.com>
      Reviewed-by: default avatarPixel Ding <Pixel.Ding@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      421a2a30
    • Hawking Zhang's avatar
      drm/amdgpu: query vram type from atombios · 1e09b053
      Hawking Zhang authored
      The vram type for dGPU is stored in umc_info while sys mem type
      for APU is stored in integratedsysteminfo
      Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      1e09b053
    • Tom St Denis's avatar
      drm/amd/amdgpu: Add missing "DDR4" label · bc227cfa
      Tom St Denis authored
      The commit d296278fd372003fc69588acfd0c0c5edbdf4874 added support for
      detecting DDR4 but omitted the label that is printed out in
      amdgpu_bo_init() resulting in a KASAN error.
      Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      bc227cfa
    • Emily Deng's avatar
      drm/amdgpu: Correct the amdgpu_ucode_fini_bo place for Tonga · edc3d27c
      Emily Deng authored
      The amdgpu_ucode_fini_bo should be called after gfx_v8_0_hw_fini,
      or it will have KCQ disable failed issue.
      
      For Tonga, as it firstly finishes SMC block, and the SMC hw fini
      will call amdgpu_ucode_fini, which will lead the amdgpu_ucode_fini_bo
      called before gfx_v8_0_hw_fini, this is incorrect.
      Signed-off-by: default avatarEmily Deng <Emily.Deng@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      edc3d27c
    • Emily Deng's avatar
      drm/amdgpu: Correct the place of amdgpu_pm_sysfs_fini · 58e955d9
      Emily Deng authored
      The amdgpu_pm_sysfs_fini should call before amdgpu_device_ip_fini,
      or the adev->pm.dpm_enabled would be set to 0, then the device files
      related to pp won't be removed by amdgpu_pm_sysfs_fini when unload
      driver.
      Signed-off-by: default avatarEmily Deng <Emily.Deng@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      58e955d9
    • Christian König's avatar
      drm/amdgpu: stop allocating a page array for prime shared BOs · e89d0d33
      Christian König authored
      We don't need the page array for prime shared BOs, stop allocating it.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarRoger He <Hongbo.He@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      e89d0d33
    • Christian König's avatar
      drm/ttm: add ttm_sg_tt_init · 75a57669
      Christian König authored
      This allows drivers to only allocate dma addresses, but not a page
      array.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarRoger He <Hongbo.He@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      75a57669
    • Christian König's avatar
      drm/ttm: move ttm_tt defines into ttm_tt.h · 81f5ec02
      Christian König authored
      Let's stop mangling everything in a single header and create one header
      per object instead.
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarRoger He <Hongbo.He@amd.com>
      Acked-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      81f5ec02
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2018-03-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-next · 963976cf
      Dave Airlie authored
      UAPI Changes:
      
      - Query uAPI interface (used for GPU topology information currently)
      	* Mesa: https://patchwork.freedesktop.org/series/38795/
      
      Driver Changes:
      
      - Increase PSR2 size for CNL (DK)
      - Avoid retraining LSPCON link unnecessarily (Ville)
      - Decrease request signaling latency (Chris)
      - GuC error capture fix (Daniele)
      
      * tag 'drm-intel-next-2018-03-08' of git://anongit.freedesktop.org/drm/drm-intel: (127 commits)
        drm/i915: Update DRIVER_DATE to 20180308
        drm/i915: add schedule out notification of preempted but completed request
        drm/i915: expose rcs topology through query uAPI
        drm/i915: add query uAPI
        drm/i915: add rcs topology to error state
        drm/i915/debugfs: add rcs topology entry
        drm/i915/debugfs: reuse max slice/subslices already stored in sseu
        drm/i915: store all subslice masks
        drm/i915/guc: work around gcc-4.4.4 union initializer issue
        drm/i915/cnl: Add Wa_2201832410
        drm/i915/icl: Gen11 forcewake support
        drm/i915/icl: Add Indirect Context Offset for Gen11
        drm/i915/icl: Enhanced execution list support
        drm/i915/icl: new context descriptor support
        drm/i915/icl: Correctly initialize the Gen11 engines
        drm/i915: Assert that the request is indeed complete when signaled from irq
        drm/i915: Handle changing enable_fbc parameter at runtime better.
        drm/i915: Track whether the DP link is trained or not
        drm/i915: Nuke intel_dp->channel_eq_status
        drm/i915: Move SST DP link retraining into the ->post_hotplug() hook
        ...
      963976cf
    • Dave Airlie's avatar
      Merge tag 'drm-amdkfd-next-2018-03-11' of git://people.freedesktop.org/~gabbayo/linux into drm-next · 6fa7324a
      Dave Airlie authored
      Major points for this pull request:
      - Add dGPU support for amdkfd initialization code and queue handling. It's
        not complete support since the GPUVM part is missing (the under debate stuff).
      - Enable PCIe atomics for dGPU if present
      - Various adjustments to the amdgpu<-->amdkfd interface for dGPUs
      - Refactor IOMMUv2 code to allow loading amdkfd without IOMMUv2 in the system
      - Add HSA process eviction code in case of system memory pressure
      - Various fixes and small changes
      
      * tag 'drm-amdkfd-next-2018-03-11' of git://people.freedesktop.org/~gabbayo/linux: (24 commits)
        uapi: Fix type used in ioctl parameter structures
        drm/amdkfd: Implement KFD process eviction/restore
        drm/amdkfd: Add GPUVM virtual address space to PDD
        drm/amdkfd: Remove unaligned memory access
        drm/amdkfd: Centralize IOMMUv2 code and make it conditional
        drm/amdgpu: Add submit IB function for KFD
        drm/amdgpu: Add GPUVM memory management functions for KFD
        drm/amdgpu: add amdgpu_sync_clone
        drm/amdgpu: Update kgd2kfd_shared_resources for dGPU support
        drm/amdgpu: Add KFD eviction fence
        drm/amdgpu: Remove unused kfd2kgd interface
        drm/amdgpu: Fix wrong mask in get_atc_vmid_pasid_mapping_pasid
        drm/amdgpu: Fix header file dependencies
        drm/amdgpu: Replace kgd_mem with amdgpu_bo for kernel pinned gtt mem
        drm/amdgpu: remove useless BUG_ONs
        drm/amdgpu: Enable KFD initialization on dGPUs
        drm/amdkfd: Add dGPU device IDs and device info
        drm/amdkfd: Add dGPU support to kernel_queue_init
        drm/amdkfd: Add dGPU support to the MQD manager
        drm/amdkfd: Add dGPU support to the device queue manager
        ...
      6fa7324a
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-2018-03-09-3' of git://anongit.freedesktop.org/drm/drm-misc into drm-next · 0b8eeac5
      Dave Airlie authored
      drm-misc-next for 4.17:
      
      UAPI Changes:
       plane: Add color encoding/range properties (Jyri)
       nouveau: Replace iturbt_709 property with color_encoding property (Ville)
      
      Core Changes:
       atomic: Move plane clipping into plane check helper (Ville)
       property: Multiple new property checks/verification (Ville)
      
      Driver Changes:
       rockchip: Fixes & improvements for rk3399/chromebook plus (various)
       sun4i: Add H3/H5 HDMI support (Jernej)
       i915: Add support for limited/full-range ycbcr toggling (Ville)
       pl111: Add bandwidth checking/limiting (Linus)
      
      Cc: Jernej Skrabec <jernej.skrabec@siol.net>
      Cc: Jyri Sarha <jsarha@ti.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      
      * tag 'drm-misc-next-2018-03-09-3' of git://anongit.freedesktop.org/drm/drm-misc: (85 commits)
        drm/rockchip: Don't use atomic constructs for psr
        drm/rockchip: analogix_dp: set psr activate/deactivate when enable/disable bridge
        drm/rockchip: dw_hdmi: Move HDMI vpll clock enable to bind()
        drm/rockchip: inno_hdmi: reorder clk_disable_unprepare call in unbind
        drm/rockchip: inno_hdmi: Fix error handling path.
        drm/rockchip: dw-mipi-dsi: Fix connector and encoder cleanup.
        drm/nouveau: Replace the iturbt_709 prop with the standard COLOR_ENCODING prop
        drm/pl111: Use max memory bandwidth for resolution
        drm/bridge: sii902x: Retry status read after DDI I2C
        drm/pl111: Handle the RealView variant separately
        drm/pl111: Make the default BPP a per-variant variable
        drm: simple_kms_helper: Fix .mode_valid() documentation
        bridge: Elaborate a bit on dumb VGA bridges in Kconfig
        drm/atomic: Add new reverse iterator over all plane state (V2)
        drm: Reject bad property flag combinations
        drm: Make property flags u32
        drm/uapi: Deprecate DRM_MODE_PROP_PENDING
        drm: WARN when trying to add enum value > 63 to a bitmask property
        drm: WARN when trying add enum values to non-enum/bitmask properties
        drm: Reject replacing property enum values
        ...
      0b8eeac5
    • Dave Airlie's avatar
      drm/amd/pp: fix missing CONFIG_ACPI. · 62ccb653
      Dave Airlie authored
      This was stopping me building on ARM after last pull.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      62ccb653
  2. 09 Mar, 2018 2 commits
    • Dave Airlie's avatar
      Merge branch 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux into drm-next · 128cccea
      Dave Airlie authored
      More stuff for 4.17. Highlights:
      - More fixes for "wattman" like functionality (fine grained clk/voltage control)
      - Add more power profile infrastucture (context based dpm)
      - SR-IOV fixes
      - Add iomem debugging interface for use with umr
      - Powerplay and cgs cleanups
      - DC fixes and cleanups
      - ttm improvements
      - Misc cleanups all over
      
      * 'drm-next-4.17' of git://people.freedesktop.org/~agd5f/linux: (143 commits)
        drm/amdgpu:Always save uvd vcpu_bo in VM Mode
        drm/amdgpu:Correct max uvd handles
        drm/amdgpu: replace iova debugfs file with iomem (v3)
        drm/amd/display: validate plane format on primary plane
        drm/amdgpu: Clean sdma wptr register when only enable wptr polling
        drm/amd/amdgpu: re-add missing GC 9.1 and SDMA0 4.1 sh_mask header files
        drm/amdgpu: give warning before sleep in kiq_r/wreg
        drm/amdgpu: further mitigate workaround for i915
        drm/amdgpu: drop gtt->adev
        drm/amdgpu: add amdgpu_evict_gtt debugfs entry
        drm/amd/pp: Add #ifdef checks for CONFIG_ACPI
        drm/amd/pp: fix "Delete the wrapper layer of smu_allocate/free_memory"
        drm/amd/pp: Drop wrapper functions for upper/lower_32_bits
        drm/amdgpu: Delete cgs wrapper functions for gpu memory manager
        drm/amd/pp: Delete the wrapper layer of smu_allocate/free_memory
        drm/amd/pp: Remove cgs wrapper function for temperature update
        Revert "drm/amd/pp: Add a pp feature mask bit for AutoWattman feature"
        drm/amd/pp: Add auto power profilng switch based on workloads (v2)
        drm/amd/pp: Revert gfx/compute profile switch sysfs
        drm/amd/pp: Fix sclk in highest two levels when compute on smu7
        ...
      128cccea
    • Dave Airlie's avatar
      Merge branch 'drm/next/du' of git://linuxtv.org/pinchartl/media into drm-next · 2ec360bb
      Dave Airlie authored
      - Convert LVDS support to a drm_bridge driver
      - Add DT bindings for the R8A77995 SoC
      - Add DT bindings and driver support for the R8A77970 SoC
      
      Note that the LVDS conversion depends on a patch series from Frank Rowand that
      will make it upstream through Rob Herring's tree. Frank has provided a stable
      branch based on v4.16-rc1 with the patches, and both Rob and I have merged it
      into our trees. This should thus generate no conflict when reaching -next.
      
      * 'drm/next/du' of git://linuxtv.org/pinchartl/media:
        dt-bindings: display: renesas: lvds: Document r8a77995 bindings
        dt-bindings: display: renesas: du: Document r8a77995 bindings
        drm: rcar-du: lvds: Add R8A77970 support
        drm: rcar-du: Add R8A77970 support
        dt-bindings: display: renesas: lvds: Document R8A77970 bindings
        dt-bindings: display: renesas: du: Document R8A77970 bindings
        drm: rcar-du: Convert LVDS encoder code to bridge driver
        drm: rcar-du: Fix legacy DT to create LVDS encoder nodes
        dt-bindings: display: renesas: Deprecate LVDS support in the DU bindings
        dt-bindings: display: renesas: Add R-Car LVDS encoder DT bindings
        of: improve reporting invalid overlay target path
        of: convert unittest overlay devicetree source to sugar syntax
        of: Documentation: of_overlay_apply() replaced by of_overlay_fdt_apply()
        of: change overlay apply input data from unflattened to FDT
        x86: devicetree: fix config option around x86_flattree_get_config()
      2ec360bb
  3. 08 Mar, 2018 17 commits
  4. 07 Mar, 2018 5 commits