From patchwork Sat Jul 28 12:23:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oded Gabbay X-Patchwork-Id: 10547957 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 348D513BB for ; Sat, 28 Jul 2018 12:23:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 21B5A284C5 for ; Sat, 28 Jul 2018 12:23:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 160A52B545; Sat, 28 Jul 2018 12:23:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9C79B284C5 for ; Sat, 28 Jul 2018 12:23:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E51B36E117; Sat, 28 Jul 2018 12:23:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by gabe.freedesktop.org (Postfix) with ESMTPS id E7D6A6E032; Sat, 28 Jul 2018 12:23:09 +0000 (UTC) Received: by mail-wr1-x431.google.com with SMTP id j5-v6so7713296wrr.8; Sat, 28 Jul 2018 05:23:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=CbU0lGf4adZOainn4YCG3fIj5RGmzFrnhEhdUjz8d78=; b=IniC7ZdRTTU71s3sA/gV7XpWeskpy28TdWWXn97tHIhoISxVq0uE/Hylbo00JjrM/t J/ujL1DMpZuGkXRCtBXHbmsbtXqwQ/J5MbAvmt+fHQfYjuuXPtRtng4BNRPORMG6y7Ra JYwUYlj6IXCm/7yLDKATcqsePpVcUXzokYzzSbMmP8b37C/+S0e2inYgDrsZ1SxGukvr k/9FdSHXvUFJqiKEo401+mZq3rUoGDZlxep3qjeHf65OfdgxPgQrFjo0/2bOVWiaB6Nt rFjT2/nUp9KOno2z5NAvH3yz5IRIuyZ+2VbD2DMBL8MEweryCsrVNfNYbYwXgHZWe55s PDIQ== X-Gm-Message-State: AOUpUlHQXUqdlgjjOE8eNiSSfLI+ExV0WKhaXb0QzpJT9TwT4l444Cbq xIvdvZoSOiHxmmVW5h8wxMs= X-Google-Smtp-Source: AAOMgpeIAUZOMDbVQSGuNLrAkI1DymybOx6aQLCXO0wfhgj5DoAUwg5hMLjyePsiN54rS3nhbd+viQ== X-Received: by 2002:adf:e405:: with SMTP id g5-v6mr9249921wrm.96.1532780588475; Sat, 28 Jul 2018 05:23:08 -0700 (PDT) Received: from ogabbay-vm ([31.154.190.6]) by smtp.gmail.com with ESMTPSA id g15-v6sm8579135wrh.48.2018.07.28.05.23.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Jul 2018 05:23:08 -0700 (PDT) Date: Sat, 28 Jul 2018 15:23:06 +0300 From: Oded Gabbay To: airlied@gmail.com Subject: [git pull] amdkfd next 4.19 Message-ID: <20180728122306.GA5235@ogabbay-vm> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi Dave, This is amdkfd pull for 4.19. The major changes are: - Add Raven support. Raven refers to Ryzen APUs with integrated GFXv9 GPU. - Integrate GPU reset support In addition, there are a couple of small fixes and improvements, such as: - Better handling and reporting to user of VM faults - Fix race upon context restore - Allow the user to use specific Compute Units - Basic power management Thanks, Oded The following changes since commit 6d52aacd92c60331ec8c3117522f4301b5195e28: Merge branch 'drm-next-4.19' of git://people.freedesktop.org/~agd5f/linux into drm-next (2018-07-27 12:31:48 +1000) are available in the git repository at: git://people.freedesktop.org/~gabbayo/linux tags/drm-amdkfd-next-2018-07-28 for you to fetch changes up to b5aa3f4aef724e9c0f626dcf69948b22efcc5176: drm/amdkfd: Call kfd2kgd.set_compute_idle (2018-07-16 19:10:37 -0400) ---------------------------------------------------------------- Arnd Bergmann (1): drm/admkfd use modern ktime accessors Felix Kuehling (6): drm/amdkfd: Reliably prevent reclaim-FS while holding DQM lock drm/amdkfd: Stop using GFP_NOIO explicitly drm/amd: Add CU-masking ioctl definition to kfd_ioctl.h drm/amdkfd: Add CU-masking ioctl to KFD drm/amdgpu: Add kfd2kgd.set_compute_idle interface drm/amdkfd: Call kfd2kgd.set_compute_idle Jay Cornwall (1): drm/amdkfd: Fix race between scheduler and context restore Lan Xiao (1): drm/amdkfd: fix zero reading of VMID and PASID for Hawaii Moses Reuben (1): drm/amdkfd: send SIGSEGV to process upon KFD_EVENT_TYPE_MEMORY Shaoyun Liu (13): drm/amd: Add gpu reset interfaces between amdgpu and amdkfd drm/amd: Add kfd ioctl defines for hw_exception event drm/amdkfd: Add gpu reset interface and place holder drm/amdgpu: Call KFD reset handlers during GPU reset drm/amdkfd: Implement GPU reset handlers in KFD drm/amdgpu: Enable the gpu reset from KFD drm/amdkfd: Implement hang detection in KFD and call amdgpu drm/amdgpu: Don't use shadow BO for compute context drm/amdgpu: Check NULL pointer for job before reset job's ring drm/amdkfd: Fix kernel queue 64 bit doorbell offset calculation drm/amdgpu: Avoid invalidate tlbs when gpu is on reset drm/amdgpu: Avoid destroy hqd when GPU is on reset drm/amdkfd: Add debugfs interface to trigger HWS hang Wei Lu (1): drm/amdkfd: Fix error codes in kfd_get_process Yong Zhao (10): drm/amdkfd: Introduce KFD module parameter halt_if_hws_hang drm/amdkfd: Use module parameters noretry as the internal variable name drm/amdkfd: Replace mqd with mqd_mgr as the variable name for mqd_manager drm/amdkfd: Clean up reference of radeon drm/amdkfd: Consolidate duplicate memory banks info in topology drm/amdkfd: Make SDMA engine number an ASIC-dependent variable drm/amdkfd: Avoid flooding dmesg on Raven due to IOMMU issues drm/amdkfd: Workaround to accommodate Raven too many PPR issue drm/amdkfd: Optimize out some duplicated code in kfd_signal_iommu_event() drm/amdkfd: Enable Raven for KFD shaoyunl (2): drm/amdgpu: save vm fault information for amdkfd drm/amdkfd: Handle VM faults in KFD drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 35 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 10 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 27 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 9 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 8 + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 14 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 +- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 33 +- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 33 +- drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 54 ++- drivers/gpu/drm/amd/amdkfd/cik_int.h | 7 +- drivers/gpu/drm/amd/amdkfd/cwsr_trap_handler.h | 458 +++++++++++---------- .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx8.asm | 18 +- .../gpu/drm/amd/amdkfd/cwsr_trap_handler_gfx9.asm | 16 +- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 69 +++- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 57 ++- drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.c | 1 - drivers/gpu/drm/amd/amdkfd/kfd_dbgdev.h | 37 ++ drivers/gpu/drm/amd/amdkfd/kfd_debugfs.c | 48 +++ drivers/gpu/drm/amd/amdkfd/kfd_device.c | 122 +++++- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 283 ++++++++----- .../gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 32 +- .../drm/amd/amdkfd/kfd_device_queue_manager_v9.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_doorbell.c | 9 +- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 118 +++++- drivers/gpu/drm/amd/amdkfd/kfd_events.h | 1 + drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 22 +- drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c | 6 +- drivers/gpu/drm/amd/amdkfd/kfd_iommu.c | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c | 18 +- drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.h | 2 +- drivers/gpu/drm/amd/amdkfd/kfd_module.c | 16 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 41 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.h | 4 + drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 29 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c | 31 +- drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_vi.c | 29 +- drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c | 26 ++ drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 40 +- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 + .../gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 43 +- drivers/gpu/drm/amd/include/kgd_kfd_interface.h | 40 ++ include/uapi/linux/kfd_ioctl.h | 33 +- 45 files changed, 1460 insertions(+), 447 deletions(-)