From patchwork Mon Oct 1 12:31:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharat Masetty X-Patchwork-Id: 10621983 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 3D4BB16B1 for ; Mon, 1 Oct 2018 12:32:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D67229553 for ; Mon, 1 Oct 2018 12:32:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 216F92955C; Mon, 1 Oct 2018 12:32:01 +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,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 CA91029553 for ; Mon, 1 Oct 2018 12:32:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C99488FC8; Mon, 1 Oct 2018 12:31:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6627088FC8; Mon, 1 Oct 2018 12:31:57 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3A9936031A; Mon, 1 Oct 2018 12:31:57 +0000 (UTC) Received: from smasetty-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: smasetty@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D58A0601A0; Mon, 1 Oct 2018 12:31:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D58A0601A0 From: Sharat Masetty To: freedreno@lists.freedesktop.org Subject: [PATCH 00/13] drm/msm: Hook up the DRM gpu scheduler Date: Mon, 1 Oct 2018 18:01:32 +0530 Message-Id: <1538397105-19581-1-git-send-email-smasetty@codeaurora.org> X-Mailer: git-send-email 1.9.1 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: linux-arm-msm@vger.kernel.org, Sharat Masetty , dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This series is an effort to have the msm drm driver start using the DRM gpu scheduler for its general job scheduling needs. Immediate benefits to the msm drm driver include async fencing and improved driver performance. Testing is still under progress, but general GPU submissions, preemption, timeout, fault recovery and slumber all work fine with these changes when tested using my test apps. My workspace is based on ~4.18.rc6, so these changes should apply on tip relatively easily. Please review and share your valuable feedback :-). Note that I backported a change from Linus's 4.19.rc1 tree to handle jiffie wrapping. If it's not desirable, I will squash the last few changes of the series under drm/msm into one single commit. Matteo Croce (1): jiffies: add utility function to calculate delta in ms Sharat Masetty (12): drm/msm: Track GPU fences with idr drm/msm: Change msm_gpu_submit() API drm/msm: Save the ring name in the ring structure drm/msm: Change the name of the fence to hw_fence drm/msm: rearrange submit buffer objects clean up drm/msm: Use kzalloc for submit struct allocation drm/msm: Fix leak in submitqueue create drm/scheduler: set sched->thread to NULL in failure drm/msm: Use the DRM common Scheduler msm/drm: Remove unused code drm/scheduler: Add a timeout_start_notify function op drm/msm: Implement better timeout detection drivers/gpu/drm/msm/Kconfig | 1 + drivers/gpu/drm/msm/Makefile | 3 +- drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 3 - drivers/gpu/drm/msm/adreno/a5xx_preempt.c | 29 +++ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 + drivers/gpu/drm/msm/msm_drv.c | 3 +- drivers/gpu/drm/msm/msm_drv.h | 5 +- drivers/gpu/drm/msm/msm_fence.c | 52 ++--- drivers/gpu/drm/msm/msm_fence.h | 5 +- drivers/gpu/drm/msm/msm_gem.c | 44 +--- drivers/gpu/drm/msm/msm_gem.h | 10 +- drivers/gpu/drm/msm/msm_gem_submit.c | 170 +++++++++----- drivers/gpu/drm/msm/msm_gpu.c | 264 ++++------------------ drivers/gpu/drm/msm/msm_gpu.h | 11 +- drivers/gpu/drm/msm/msm_ringbuffer.c | 17 +- drivers/gpu/drm/msm/msm_ringbuffer.h | 7 + drivers/gpu/drm/msm/msm_sched.c | 355 ++++++++++++++++++++++++++++++ drivers/gpu/drm/msm/msm_sched.h | 18 ++ drivers/gpu/drm/msm/msm_submitqueue.c | 16 +- drivers/gpu/drm/scheduler/gpu_scheduler.c | 22 +- include/drm/gpu_scheduler.h | 6 + include/linux/jiffies.h | 5 + 22 files changed, 662 insertions(+), 387 deletions(-) create mode 100644 drivers/gpu/drm/msm/msm_sched.c create mode 100644 drivers/gpu/drm/msm/msm_sched.h --- 1.9.1