16 Jul, 2019

1 commit


18 Jun, 2019

2 commits

  • With the vmwgfx dirty tracking, the default TTM fault handler is not
    completely sufficient (vmwgfx need to modify the vma->vm_flags member,
    and also needs to restrict the number of prefaults).

    We also want to replicate the new ttm_bo_vm_reserve() functionality

    So start turning the TTM vm code into helpers: ttm_bo_vm_fault_reserved()
    and ttm_bo_vm_reserve(), and provide a default TTM fault handler for other
    drivers to use.

    Cc: "Christian König"

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: "Christian König" #v1

    Thomas Hellstrom
     
  • Add a pointer to the struct vm_operations_struct in the bo_device, and
    assign that pointer to the default value currently used.

    The driver can then optionally modify that pointer and the new value
    can be used for each new vma created.

    Cc: "Christian König"

    Signed-off-by: Thomas Hellstrom
    Reviewed-by: Christian König

    Thomas Hellstrom
     

06 Jun, 2019

1 commit


31 May, 2019

1 commit

  • We are already doing this for DMA-buf imports and also for
    amdgpu VM BOs for quite a while now.

    If this doesn't run into any problems we are probably going
    to stop removing BOs from the LRU altogether.

    v2: drop BUG_ON from ttm_bo_add_to_lru

    Signed-off-by: Christian König
    Reviewed-by: Chunming Zhou
    Tested-by: Pierre-Eric Pelloux-Prayer
    Signed-off-by: Alex Deucher

    Christian König
     

09 May, 2019

1 commit

  • Pull drm updates from Dave Airlie:
    "This has two exciting community drivers for ARM Mali accelerators.
    Since ARM has never been open source friendly on the GPU side of the
    house, the community has had to create open source drivers for the
    Mali GPUs. Lima covers the older t4xx and panfrost the newer 6xx/7xx
    series. Well done to all involved and hopefully this will help ARM
    head in the right direction.

    There is also now the ability if you don't have any of the legacy
    drivers enabled (pre-KMS) to remove all the pre-KMS support code from
    the core drm, this saves 10% or so in codesize on my machine.

    i915 also enable Icelake/Elkhart Lake Gen11 GPUs by default, vboxvideo
    moves out of staging.

    There are also some rcar-du patches which crossover with media tree
    but all should be acked by Mauro.

    Summary:

    uapi changes:
    - Colorspace connector property
    - fourcc - new YUV formts
    - timeline sync objects initially merged
    - expose FB_DAMAGE_CLIPS to atomic userspace

    new drivers:
    - vboxvideo: moved out of staging
    - aspeed: ASPEED SoC BMC chip display support
    - lima: ARM Mali4xx GPU acceleration driver support
    - panfrost: ARM Mali6xx/7xx Midgard/Bitfrost acceleration driver support

    core:
    - component helper docs
    - unplugging fixes
    - devm device init
    - MIPI/DSI rate control
    - shmem backed gem objects
    - connector, display_info, edid_quirks cleanups
    - dma_buf fence chain support
    - 64-bit dma-fence seqno comparison fixes
    - move initial fb config code to core
    - gem fence array helpers for Lima
    - ability to remove legacy support code if no drivers requires it (removes 10% of drm.ko size)
    - lease fixes

    ttm:
    - unified DRM_FILE_PAGE_OFFSET handling
    - Account for kernel allocations in kernel zone only

    panel:
    - OSD070T1718-19TS panel support
    - panel-tpo-td028ttec1 backlight support
    - Ronbo RB070D30 MIPI/DSI
    - Feiyang FY07024DI26A30-D MIPI-DSI panel
    - Rocktech jh057n00900 MIPI-DSI panel

    i915:
    - Comet Lake (Gen9) PCI IDs
    - Updated Icelake PCI IDs
    - Elkhartlake (Gen11) support
    - DP MST property addtions
    - plane and watermark fixes
    - Icelake port sync and VEBOX disable fixes
    - struct_mutex usage reduction
    - Icelake gamma fix
    - GuC reset fixes
    - make mmap more asynchronous
    - sound display power well race fixes
    - DDI/MIPI-DSI clocks for Icelake
    - Icelake RPS frequency changing support
    - Icelake workarounds

    amdgpu:
    - Use HMM for userptr
    - vega20 experimental smu11 support
    - RAS support for vega20
    - BACO support for vega12 + fixes for vega20
    - reworked IH interrupt handling
    - amdkfd RAS support
    - Freesync improvements
    - initial timeline sync object support
    - DC Z ordering fixes
    - NV12 planes support
    - colorspace properties for planes=
    - eDP opts if eDP already initialized

    nouveau:
    - misc fixes

    etnaviv:
    - misc fixes

    msm:
    - GPU zap shader support expansion
    - robustness ABI addition

    exynos:
    - Logging cleanups

    tegra:
    - Shared reset fix
    - CPU cache maintenance fix

    cirrus:
    - driver rewritten using simple helpers

    meson:
    - G12A support

    vmwgfx:
    - Resource dirtying management improvements
    - Userspace logging improvements

    virtio:
    - PRIME fixes

    rockchip:
    - rk3066 hdmi support

    sun4i:
    - DSI burst mode support

    vc4:
    - load tracker to detect underflow

    v3d:
    - v3d v4.2 support

    malidp:
    - initial Mali D71 support in komeda driver

    tfp410:
    - omap related improvement

    omapdrm:
    - drm bridge/panel support
    - drop some omap specific panels

    rcar-du:
    - Display writeback support"

    * tag 'drm-next-2019-05-09' of git://anongit.freedesktop.org/drm/drm: (1507 commits)
    drm/msm/a6xx: No zap shader is not an error
    drm/cma-helper: Fix drm_gem_cma_free_object()
    drm: Fix timestamp docs for variable refresh properties.
    drm/komeda: Mark the local functions as static
    drm/komeda: Fixed warning: Function parameter or member not described
    drm/komeda: Expose bus_width to Komeda-CORE
    drm/komeda: Add sysfs attribute: core_id and config_id
    drm: add non-desktop quirk for Valve HMDs
    drm/panfrost: Show stored feature registers
    drm/panfrost: Don't scream about deferred probe
    drm/panfrost: Disable PM on probe failure
    drm/panfrost: Set DMA masks earlier
    drm/panfrost: Add sanity checks to submit IOCTL
    drm/etnaviv: initialize idle mask before querying the HW db
    drm: introduce a capability flag for syncobj timeline support
    drm: report consistent errors when checking syncobj capibility
    drm/nouveau/nouveau: forward error generated while resuming objects tree
    drm/nouveau/fb/ramgk104: fix spelling mistake "sucessfully" -> "successfully"
    drm/nouveau/i2c: Disable i2c bus access after ->fini()
    drm/nouveau: Remove duplicate ACPI_VIDEO_NOTIFY_PROBE definition
    ...

    Linus Torvalds
     

20 Apr, 2019

1 commit

  • When a driver unloads without unloading TTM we don't correctly
    clear the global structures leading to errors on re-init.

    Next step should probably be to remove the global structures and
    kobjs all together, but this is tricky since we need to maintain
    backward compatibility.

    Signed-off-by: Christian König
    Reviewed-by: Karol Herbst
    Tested-by: Karol Herbst
    CC: stable@vger.kernel.org # 5.0.x
    Signed-off-by: Alex Deucher

    Christian König
     

20 Mar, 2019

3 commits


11 Feb, 2019

1 commit


04 Feb, 2019

1 commit

  • Most of these are just cases where code comments used contractions
    (it's, who's) where they actually mean to use a possessive pronoun (its,
    whose) or vice-versa.

    Signed-off-by: Matt Roper
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20190202012326.20096-1-matthew.d.roper@intel.com

    Matt Roper
     

29 Jan, 2019

1 commit


26 Jan, 2019

1 commit


08 Dec, 2018

1 commit


06 Nov, 2018

7 commits


28 Sep, 2018

1 commit


27 Sep, 2018

1 commit


28 Aug, 2018

3 commits

  • This function allow us to bulk move a group of BOs to the tail of their LRU.
    The positions of group of BOs are stored on the (first, last) bulk_move_pos
    structure.

    Signed-off-by: Christian König
    Signed-off-by: Huang Rui
    Tested-by: Mike Lothian
    Tested-by: Dieter Nützel
    Acked-by: Chunming Zhou
    Reviewed-by: Junwei Zhang
    Signed-off-by: Alex Deucher

    Huang Rui
     
  • When move a BO to the end of LRU, it need remember the BO positions.
    Make sure all moved bo in between "first" and "last". And they will be bulk
    moving together.

    Signed-off-by: Christian König
    Signed-off-by: Huang Rui
    Tested-by: Mike Lothian
    Tested-by: Dieter Nützel
    Acked-by: Chunming Zhou
    Reviewed-by: Junwei Zhang
    Signed-off-by: Alex Deucher

    Christian König
     
  • Add bulk move pos to store the pointer of first and last buffer object.
    The list in between will be bulk moved on lru list.

    Signed-off-by: Christian König
    Signed-off-by: Huang Rui
    Tested-by: Mike Lothian
    Tested-by: Dieter Nützel
    Acked-by: Chunming Zhou
    Reviewed-by: Junwei Zhang
    Signed-off-by: Alex Deucher

    Christian König
     

02 Aug, 2018

1 commit


28 Jul, 2018

1 commit

  • This patch moves all non-x86 abstraction to the ttm_set_memory header.
    It is to make function calling more clearly.

    (v2): add ttm_ prefix.

    Suggested-by: Christian König
    Signed-off-by: Huang Rui
    Reviewed-by: Bas Nieuwenhuizen
    Reviewed-by: Christian König
    Signed-off-by: Alex Deucher

    Huang Rui
     

11 Jul, 2018

1 commit

  • The TTM buffer-object interface provides ttm_bo_reference() and
    ttm_bo_unref() for managing reference counts. Replacing them with
    ttm_bo_get() and ttm_bo_put() aligns the API with conventions used
    throughout the Linux kernel.

    The implementation of ttm_bo_unref() clears the supplied pointer
    to NULL. This leads to workarounds where the caller saves the
    pointer's value before de-referencing the BO. ttm_bo_put() does
    not clear the supplied pointer.

    Signed-off-by: Thomas Zimmermann
    Reviewed-by: Christian König
    Signed-off-by: Alex Deucher

    Thomas Zimmermann
     

22 Mar, 2018

1 commit


15 Mar, 2018

4 commits


27 Feb, 2018

5 commits

  • Rename ttm_bo_add_ttm to ttm_tt_create and move it into ttm_tt.c.

    v2: separate the cleanup.

    Signed-off-by: Christian König
    Reviewed-by: Michel Dänzer
    Reviewed-by: Roger He
    Signed-off-by: Alex Deucher

    Christian König
     
  • the free mem space and the lower limit both include two parts:
    system memory and swap space.

    For the OOM triggered by TTM, that is the case as below:
    first swap space is full of swapped out pages and soon
    system memory also is filled up with ttm pages. and then
    any memory allocation request will run into OOM.

    to cover two cases:
    a. if no swap disk at all or free swap space is under swap mem
    limit but available system mem is bigger than sys mem limit,
    allow TTM allocation;

    b. if the available system mem is less than sys mem limit but
    free swap space is bigger than swap mem limit, allow TTM
    allocation.

    v2: merge two memory limit(swap and system) into one
    v3: keep original behavior except ttm_opt_ctx->flags with
    TTM_OPT_FLAG_FORCE_ALLOC
    v4: always set force_alloc as tx->flags & TTM_OPT_FLAG_FORCE_ALLOC
    v5: add an attribute for lower_mem_limit
    v6: set lower_mem_limit as 0 to keep original behavior

    Signed-off-by: Roger He
    Reviewed-by: Christian König
    Signed-off-by: Alex Deucher

    Roger He
     
  • Never used as parameter, the only driver actually using this is nouveau
    and there it is initialized after the BO is initialized.

    Signed-off-by: Christian König
    Reviewed-by: Michel Dänzer
    Signed-off-by: Alex Deucher

    Christian König
     
  • Only used by the AGP backend and there it can be easily accessed using
    ttm->bdev->glob.

    Signed-off-by: Christian König
    Reviewed-by: Michel Dänzer
    Signed-off-by: Alex Deucher

    Christian König
     
  • The pointer is available as ttm->bdev->glob as well.

    Signed-off-by: Christian König
    Reviewed-by: Michel Dänzer
    Signed-off-by: Alex Deucher

    Christian König