From patchwork Thu Jan 16 13:11:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 11336837 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3845921 for ; Thu, 16 Jan 2020 13:12:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81627206D5 for ; Thu, 16 Jan 2020 13:12:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YPuhRjkc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81627206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8345D6ECF6; Thu, 16 Jan 2020 13:12:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by gabe.freedesktop.org (Postfix) with ESMTPS id DCB586ECF6; Thu, 16 Jan 2020 13:12:46 +0000 (UTC) Received: by mail-pl1-x644.google.com with SMTP id g6so8320816plp.6; Thu, 16 Jan 2020 05:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/hYfulYDMmDqasXMfWqXBB41AaKXHjpBig2NTFrRRkY=; b=YPuhRjkcHaF3Cj2pkoOb0SaCxIP5pDKV3HuSNcQvzc/z12CKjS2MaN4NrfZlIDIeRp /hFeMGOo5Ctjjx8bOQfY4XVAFSaNPCWIznM5SZudf1NvCnkOqtzAd7fb5hezf8TJ8/HW tqdlwOJGJ/pAtUC6UixRbrnXhk22BzieFf+1c1mhAIQtO+pgvHavMdQIDU7WRafSRXbb ORAGmlUubDd3NbuJwB6dyKJQeQaIj9d7j5Z3A//Z1ohCk2lc8xzVrX8WSRfasX/liaZn Eznf5S3ozuaphaYEdFZOdn+PW9Sh0BU6q4Gx9vDP4Ak/IduCYKYTJEUb9BrRglHEHOrh WGBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/hYfulYDMmDqasXMfWqXBB41AaKXHjpBig2NTFrRRkY=; b=XNNQRg8aP6tgmHteIZCWot0Mr0zosCpGGHctces3PuwOFt2Nvw7gFkTE/WFgBwNBWd U2ZSW9RI8Gn2WU7Vw9vR35Zh8K9de9PMfmwDT0vh+PltBUpk98QrOb5apxUnKUy6YqDJ dlSiGDufyK0/seR8ZKgRJf86gALxmft86i3WCzsk7aXCrD5HogXELNErjbAguHHzAhx3 9cm4zPQU29mV4LkMN2FA6B3aYn9aYRwmZzmadk3q8MV1lkJezvpGSVv+a7XekQkT/rXB WRVIkh6qeyarLdjWhVO7/VtJMaH/QHonBT9xcKA0m21rVpYgywNN80kbjlSHRN8KGV/r czgg== X-Gm-Message-State: APjAAAXrch0YUqOVvecO5Y2//eHVc0YAIl5iGSbSZ/VDGiuWhgloP1FP LS+n2j99yqShgT8K+9eV1q8g4JvC X-Google-Smtp-Source: APXvYqyCA6hbN8ebFnzlbZ/4NSn85PEthyuahhIlSMt7vNQiLaEBdzTFccgHOns1UXPmab09ZMfnbA== X-Received: by 2002:a17:902:ba91:: with SMTP id k17mr1540600pls.228.1579180366426; Thu, 16 Jan 2020 05:12:46 -0800 (PST) Received: from localhost.localdomain ([103.219.195.110]) by smtp.gmail.com with ESMTPSA id v9sm25945877pfi.37.2020.01.16.05.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 05:12:45 -0800 (PST) From: Qiang Yu To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/5] drm/lima: update register info Date: Thu, 16 Jan 2020 21:11:53 +0800 Message-Id: <20200116131157.13346-2-yuq825@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200116131157.13346-1-yuq825@gmail.com> References: <20200116131157.13346-1-yuq825@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lima@lists.freedesktop.org, David Airlie , Vasily Khoruzhick , Andreas Baierl , Qiang Yu , Erico Nunes MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From Mali r10p0 kernel driver source code. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_regs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/lima/lima_regs.h b/drivers/gpu/drm/lima/lima_regs.h index ace8ecefbe90..0124c90e0153 100644 --- a/drivers/gpu/drm/lima/lima_regs.h +++ b/drivers/gpu/drm/lima/lima_regs.h @@ -239,6 +239,7 @@ #define LIMA_MMU_STATUS_REPLAY_BUFFER_EMPTY BIT(4) #define LIMA_MMU_STATUS_PAGE_FAULT_IS_WRITE BIT(5) #define LIMA_MMU_STATUS_BUS_ID(x) ((x >> 6) & 0x1F) +#define LIMA_MMU_STATUS_STALL_NOT_ACTIVE BIT(31) #define LIMA_MMU_COMMAND 0x0008 #define LIMA_MMU_COMMAND_ENABLE_PAGING 0x00 #define LIMA_MMU_COMMAND_DISABLE_PAGING 0x01 From patchwork Thu Jan 16 13:11:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 11336839 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EF1066C1 for ; Thu, 16 Jan 2020 13:12:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CD133206D5 for ; Thu, 16 Jan 2020 13:12:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="b14qUdgh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD133206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7DEE86ECF8; Thu, 16 Jan 2020 13:12:51 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 26C896ECF8; Thu, 16 Jan 2020 13:12:50 +0000 (UTC) Received: by mail-pf1-x444.google.com with SMTP id x184so10212394pfb.3; Thu, 16 Jan 2020 05:12:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Si4Zq9w66PO1usnc9EmHvCYW3Nb7Vl/0SFRUNNmEaOg=; b=b14qUdghVjE3MMqd5NiT+dAHrac4bP1apD5hCkkOzQviwUOsXYTv5vb32KP19EJAPI 2g8VWIjM4mN0Nnuo3EbrtS2uMtsCauJlddIerMPZ3seIjyquU0UC2Ua8ZdH2wI+G2z4Q SZ93RZvBDVLc4vewfA9EA0Ulv8mHp5lOMyo2jothhzNwTlOXlxiFhYza12YQ/h+3RfVx npvO38kZwi+d2/gQU8BYF9+CrJzMjd/U/0jdJTRhXLcWuqLlVtOPH4YCS99xTbjT/Mv6 L8Irz0zzLSqxcmm8YlroyWql+gDjWXJ/mMgCjqciOl1eCjSrrlChvXP6Apck3kTcYO6Y jtaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Si4Zq9w66PO1usnc9EmHvCYW3Nb7Vl/0SFRUNNmEaOg=; b=FQm5CcY49408t0Cj+kDOIZul00sjpf2IWXcD7lze/aCF/W2ImD1GA0FDuhZz0Dy/UI enxKEfCYW2bJCdJ+pr/vsP5TZZxvKCZ7EiKfIRdrFBsqZzIyvHom7p2XFlErXfzsyZbg ddox/BhacF9HyGcp+ghlQzTlHFl1MLkpITdmjA4gSLLZb+5P83aPm0DtWKK8Mp9c30NG lHJjjVUOeZOPwiI/q+UDA3FLYCM6FGlJNrjjW6lIXJzoyC/AmSP8GhG50+xOIXILsGgG mUdLVg98O/JP4BeuPC8+KLZbi/fvKCt8iE3Wd7ojU1Hunp0TtGZNqNaU/jHzGdEpSKSY iFmQ== X-Gm-Message-State: APjAAAU0jrhDF1ubt+K6rXOExUBvGeUN6IhSMGKlTlEFPQ/auvf1F4nV hvX+Z1R4TXKOUho05OR7OPymdgmp X-Google-Smtp-Source: APXvYqwXzXpJFunuoon/ZQ8U848Xzv7f3mNHboMa08m4YurRMDE9JjnsJiVyQEqerM/In5k94Mk0Zw== X-Received: by 2002:a63:3484:: with SMTP id b126mr38099261pga.17.1579180369569; Thu, 16 Jan 2020 05:12:49 -0800 (PST) Received: from localhost.localdomain ([103.219.195.110]) by smtp.gmail.com with ESMTPSA id v9sm25945877pfi.37.2020.01.16.05.12.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 05:12:49 -0800 (PST) From: Qiang Yu To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/5] drm/lima: add lima_vm_map_bo Date: Thu, 16 Jan 2020 21:11:54 +0800 Message-Id: <20200116131157.13346-3-yuq825@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200116131157.13346-1-yuq825@gmail.com> References: <20200116131157.13346-1-yuq825@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lima@lists.freedesktop.org, David Airlie , Vasily Khoruzhick , Andreas Baierl , Qiang Yu , Erico Nunes MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" For dynamically mapping added backup memory of lima_bo to vm. This is a preparation for adding heap buffer support. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_vm.c | 40 ++++++++++++++++++++++++++++++++++ drivers/gpu/drm/lima/lima_vm.h | 1 + 2 files changed, 41 insertions(+) diff --git a/drivers/gpu/drm/lima/lima_vm.c b/drivers/gpu/drm/lima/lima_vm.c index 840e2350d872..d46f2a69ab42 100644 --- a/drivers/gpu/drm/lima/lima_vm.c +++ b/drivers/gpu/drm/lima/lima_vm.c @@ -277,3 +277,43 @@ void lima_vm_print(struct lima_vm *vm) } } } + +int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff) +{ + struct lima_bo_va *bo_va; + struct sg_dma_page_iter sg_iter; + int offset = 0, err; + u32 base; + + mutex_lock(&bo->lock); + + bo_va = lima_vm_bo_find(vm, bo); + if (!bo_va) { + err = -ENOENT; + goto err_out0; + } + + mutex_lock(&vm->lock); + + base = bo_va->node.start + (pageoff << PAGE_SHIFT); + for_each_sg_dma_page(bo->base.sgt->sgl, &sg_iter, bo->base.sgt->nents, pageoff) { + err = lima_vm_map_page(vm, sg_page_iter_dma_address(&sg_iter), base + offset); + if (err) + goto err_out1; + + offset += PAGE_SIZE; + } + + mutex_unlock(&vm->lock); + + mutex_unlock(&bo->lock); + return 0; + +err_out1: + if (offset) + lima_vm_unmap_range(vm, base, base + offset - 1); + mutex_unlock(&vm->lock); +err_out0: + mutex_unlock(&bo->lock); + return err; +} diff --git a/drivers/gpu/drm/lima/lima_vm.h b/drivers/gpu/drm/lima/lima_vm.h index e0bdedcf14dd..22aeec77d84d 100644 --- a/drivers/gpu/drm/lima/lima_vm.h +++ b/drivers/gpu/drm/lima/lima_vm.h @@ -58,5 +58,6 @@ static inline void lima_vm_put(struct lima_vm *vm) } void lima_vm_print(struct lima_vm *vm); +int lima_vm_map_bo(struct lima_vm *vm, struct lima_bo *bo, int pageoff); #endif From patchwork Thu Jan 16 13:11:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 11336841 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B99026C1 for ; Thu, 16 Jan 2020 13:12:55 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97E87206D5 for ; Thu, 16 Jan 2020 13:12:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TmAm6ePw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97E87206D5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4CAEB6ECF7; Thu, 16 Jan 2020 13:12:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9832E6ECF7; Thu, 16 Jan 2020 13:12:53 +0000 (UTC) Received: by mail-pl1-x642.google.com with SMTP id g6so8329312plt.2; Thu, 16 Jan 2020 05:12:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iHv20i5GlVESCxNO7NqZk3wCU3STi5OyfK0oNiVJ+rg=; b=TmAm6ePw9UR4F/VG6pUp7gZjkHgJ6hhiW71NKicLqgNA+wbjiC/wyfBKgBd21hj5g2 VSFcwfAAmfLpy8kGcE0YFUYuobl7dRfm5+ZLnXmUAU3q+BhrS4IBbCvd5cU03NS/q2nv z8ym2ul9TF/vhskgMurH9D6eLI70elQnrjLmZ5S1245Tjdo5U/rUvpd9+x44g7OwdeGA vZ6zo0B4544ALcp5f48niAGmg+F9T+KyS18eXONJUqhRDh/UdLf59oKt6ifaGeOu0GJA +z31gQtQ10DLTAnhgfmObZPVi0BgWMeUvHSUQjIRE0pEdXh6R7RaJOtzANWJHLj12wNH xk5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iHv20i5GlVESCxNO7NqZk3wCU3STi5OyfK0oNiVJ+rg=; b=r1MOl9N05uVeFyDWo9zzY7d5Eouf7mdyj2y1zbhu4PFXV5dJt01s1dN0eGoAFtrEL3 AmvVh9xpBVxIscpKG93CVde6xQI0sbrhl1PK4XgK+9tpJySvF0jEilI6lcaLJJlIP3Bx KqVciDIjAdIocZV/v98piSIiqQf7O/O7X+iI5+tOEJzSoveAMu/2OozYNkElCzDPTNpo 1/DNm1D26qk8qIV1ZKpNoqemQCcf/ZeXDj7ZkNwMJnmUB7go+h94lKjdZxR4fB3/+EwW 8ULT4rsvdjsjJsDR9/H+oVURx+P5JDpUWuIRAyTw1gA7NGl37JVmuA8+LP6yKbIbwBfA 9n7g== X-Gm-Message-State: APjAAAVvglhdb71uY8KgmcrP6WNgcs0oEq/onlg18922bHkWC3nYOb5B zHbZX+IGyAqKBY3AcsovhLKl46XH X-Google-Smtp-Source: APXvYqyiF2uSuaBBJLa/O3PGJtybEMVF14u7IDXDizgvhEiVLioKSbcVvoxZNgbT4BTCIQreKDvNlQ== X-Received: by 2002:a17:902:a9c7:: with SMTP id b7mr31541213plr.255.1579180372921; Thu, 16 Jan 2020 05:12:52 -0800 (PST) Received: from localhost.localdomain ([103.219.195.110]) by smtp.gmail.com with ESMTPSA id v9sm25945877pfi.37.2020.01.16.05.12.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 05:12:52 -0800 (PST) From: Qiang Yu To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/5] drm/lima: support heap buffer creation Date: Thu, 16 Jan 2020 21:11:55 +0800 Message-Id: <20200116131157.13346-4-yuq825@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200116131157.13346-1-yuq825@gmail.com> References: <20200116131157.13346-1-yuq825@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lima@lists.freedesktop.org, David Airlie , Vasily Khoruzhick , Andreas Baierl , Qiang Yu , Erico Nunes MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" heap buffer is used as output of GP and input of PP for Mali Utgard GPU. Size of heap buffer depends on the task so is a runtime variable. Previously we just create a large enough buffer as heap buffer. Now we add a heap buffer type to be able to increase the backup memory dynamically when GP fail due to lack of heap memory. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_drv.c | 6 +- drivers/gpu/drm/lima/lima_drv.h | 1 + drivers/gpu/drm/lima/lima_gem.c | 130 ++++++++++++++++++++++++++++++-- drivers/gpu/drm/lima/lima_gem.h | 4 + drivers/gpu/drm/lima/lima_vm.c | 4 +- include/uapi/drm/lima_drm.h | 9 ++- 6 files changed, 143 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c index 124efe4fa97b..18f88aaef1a2 100644 --- a/drivers/gpu/drm/lima/lima_drv.c +++ b/drivers/gpu/drm/lima/lima_drv.c @@ -15,10 +15,14 @@ #include "lima_vm.h" int lima_sched_timeout_ms; +uint lima_heap_init_nr_pages = 8; MODULE_PARM_DESC(sched_timeout_ms, "task run timeout in ms"); module_param_named(sched_timeout_ms, lima_sched_timeout_ms, int, 0444); +MODULE_PARM_DESC(heap_init_nr_pages, "heap buffer init number of pages"); +module_param_named(heap_init_nr_pages, lima_heap_init_nr_pages, uint, 0444); + static int lima_ioctl_get_param(struct drm_device *dev, void *data, struct drm_file *file) { struct drm_lima_get_param *args = data; @@ -68,7 +72,7 @@ static int lima_ioctl_gem_create(struct drm_device *dev, void *data, struct drm_ if (args->pad) return -EINVAL; - if (args->flags) + if (args->flags & ~(LIMA_BO_FLAG_HEAP)) return -EINVAL; if (args->size == 0) diff --git a/drivers/gpu/drm/lima/lima_drv.h b/drivers/gpu/drm/lima/lima_drv.h index 69c7344715c9..f492ecc6a5d9 100644 --- a/drivers/gpu/drm/lima/lima_drv.h +++ b/drivers/gpu/drm/lima/lima_drv.h @@ -9,6 +9,7 @@ #include "lima_ctx.h" extern int lima_sched_timeout_ms; +extern uint lima_heap_init_nr_pages; struct lima_vm; struct lima_bo; diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c index d0059d8c97d8..24e1a086d5fe 100644 --- a/drivers/gpu/drm/lima/lima_gem.c +++ b/drivers/gpu/drm/lima/lima_gem.c @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include #include @@ -15,6 +17,80 @@ #include "lima_gem.h" #include "lima_vm.h" +int lima_heap_alloc(struct lima_bo *bo, struct lima_vm *vm) +{ + struct page **pages; + struct address_space *mapping = bo->base.base.filp->f_mapping; + struct device *dev = bo->base.base.dev->dev; + size_t old_size = bo->heap_size; + size_t new_size = bo->heap_size ? bo->heap_size * 2 : + (lima_heap_init_nr_pages << PAGE_SHIFT); + struct sg_table sgt; + int i, ret; + + if (bo->heap_size >= bo->base.base.size) + return -ENOSPC; + + new_size = min(new_size, bo->base.base.size); + + mutex_lock(&bo->base.pages_lock); + + if (bo->base.pages) + pages = bo->base.pages; + else { + pages = kvmalloc_array(bo->base.base.size >> PAGE_SHIFT, + sizeof(*pages), GFP_KERNEL | __GFP_ZERO); + if (!pages) { + mutex_unlock(&bo->base.pages_lock); + return -ENOMEM; + } + + bo->base.pages = pages; + bo->base.pages_use_count = 1; + + mapping_set_unevictable(mapping); + } + + for (i = old_size >> PAGE_SHIFT; i < new_size >> PAGE_SHIFT; i++) { + struct page *page = shmem_read_mapping_page(mapping, i); + if (IS_ERR(page)) { + mutex_unlock(&bo->base.pages_lock); + return PTR_ERR(page); + } + pages[i] = page; + } + + mutex_unlock(&bo->base.pages_lock); + + ret = sg_alloc_table_from_pages(&sgt, pages, i, 0, new_size, GFP_KERNEL); + if (ret) + return ret; + + if (bo->base.sgt) { + dma_unmap_sg(dev, bo->base.sgt->sgl, bo->base.sgt->nents, DMA_BIDIRECTIONAL); + sg_free_table(bo->base.sgt); + } else { + bo->base.sgt = kmalloc(sizeof(*bo->base.sgt), GFP_KERNEL); + if (!bo->base.sgt) { + sg_free_table(&sgt); + return -ENOMEM; + } + } + + dma_map_sg(dev, sgt.sgl, sgt.nents, DMA_BIDIRECTIONAL); + + *bo->base.sgt = sgt; + + if (vm) { + ret = lima_vm_map_bo(vm, bo, old_size >> PAGE_SHIFT); + if (ret) + return ret; + } + + bo->heap_size = new_size; + return 0; +} + int lima_gem_create_handle(struct drm_device *dev, struct drm_file *file, u32 size, u32 flags, u32 *handle) { @@ -22,7 +98,8 @@ int lima_gem_create_handle(struct drm_device *dev, struct drm_file *file, gfp_t mask; struct drm_gem_shmem_object *shmem; struct drm_gem_object *obj; - struct sg_table *sgt; + struct lima_bo *bo; + bool is_heap = flags & LIMA_BO_FLAG_HEAP; shmem = drm_gem_shmem_create(dev, size); if (IS_ERR(shmem)) @@ -36,10 +113,17 @@ int lima_gem_create_handle(struct drm_device *dev, struct drm_file *file, mask |= __GFP_DMA32; mapping_set_gfp_mask(obj->filp->f_mapping, mask); - sgt = drm_gem_shmem_get_pages_sgt(obj); - if (IS_ERR(sgt)) { - err = PTR_ERR(sgt); - goto out; + if (is_heap) { + bo = to_lima_bo(obj); + err = lima_heap_alloc(bo, NULL); + if (err) + goto out; + } else { + struct sg_table *sgt = drm_gem_shmem_get_pages_sgt(obj); + if (IS_ERR(sgt)) { + err = PTR_ERR(sgt); + goto out; + } } err = drm_gem_handle_create(file, obj, handle); @@ -79,17 +163,47 @@ static void lima_gem_object_close(struct drm_gem_object *obj, struct drm_file *f lima_vm_bo_del(vm, bo); } +static int lima_gem_pin(struct drm_gem_object *obj) +{ + struct lima_bo *bo = to_lima_bo(obj); + + if (bo->heap_size) + return -EINVAL; + + return drm_gem_shmem_pin(obj); +} + +static void *lima_gem_vmap(struct drm_gem_object *obj) +{ + struct lima_bo *bo = to_lima_bo(obj); + + if (bo->heap_size) + return ERR_PTR(-EINVAL); + + return drm_gem_shmem_vmap(obj); +} + +static int lima_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma) +{ + struct lima_bo *bo = to_lima_bo(obj); + + if (bo->heap_size) + return -EINVAL; + + return drm_gem_shmem_mmap(obj, vma); +} + static const struct drm_gem_object_funcs lima_gem_funcs = { .free = lima_gem_free_object, .open = lima_gem_object_open, .close = lima_gem_object_close, .print_info = drm_gem_shmem_print_info, - .pin = drm_gem_shmem_pin, + .pin = lima_gem_pin, .unpin = drm_gem_shmem_unpin, .get_sg_table = drm_gem_shmem_get_sg_table, - .vmap = drm_gem_shmem_vmap, + .vmap = lima_gem_vmap, .vunmap = drm_gem_shmem_vunmap, - .mmap = drm_gem_shmem_mmap, + .mmap = lima_gem_mmap, }; struct drm_gem_object *lima_gem_create_object(struct drm_device *dev, size_t size) diff --git a/drivers/gpu/drm/lima/lima_gem.h b/drivers/gpu/drm/lima/lima_gem.h index 1800feb3e47f..ccea06142f4b 100644 --- a/drivers/gpu/drm/lima/lima_gem.h +++ b/drivers/gpu/drm/lima/lima_gem.h @@ -7,12 +7,15 @@ #include struct lima_submit; +struct lima_vm; struct lima_bo { struct drm_gem_shmem_object base; struct mutex lock; struct list_head va; + + size_t heap_size; }; static inline struct lima_bo * @@ -31,6 +34,7 @@ static inline struct dma_resv *lima_bo_resv(struct lima_bo *bo) return bo->base.base.resv; } +int lima_heap_alloc(struct lima_bo *bo, struct lima_vm *vm); struct drm_gem_object *lima_gem_create_object(struct drm_device *dev, size_t size); int lima_gem_create_handle(struct drm_device *dev, struct drm_file *file, u32 size, u32 flags, u32 *handle); diff --git a/drivers/gpu/drm/lima/lima_vm.c b/drivers/gpu/drm/lima/lima_vm.c index d46f2a69ab42..dff97502ca36 100644 --- a/drivers/gpu/drm/lima/lima_vm.c +++ b/drivers/gpu/drm/lima/lima_vm.c @@ -155,6 +155,7 @@ int lima_vm_bo_add(struct lima_vm *vm, struct lima_bo *bo, bool create) void lima_vm_bo_del(struct lima_vm *vm, struct lima_bo *bo) { struct lima_bo_va *bo_va; + u32 size; mutex_lock(&bo->lock); @@ -166,8 +167,9 @@ void lima_vm_bo_del(struct lima_vm *vm, struct lima_bo *bo) mutex_lock(&vm->lock); + size = bo->heap_size ? bo->heap_size : bo_va->node.size; lima_vm_unmap_range(vm, bo_va->node.start, - bo_va->node.start + bo_va->node.size - 1); + bo_va->node.start + size - 1); drm_mm_remove_node(&bo_va->node); diff --git a/include/uapi/drm/lima_drm.h b/include/uapi/drm/lima_drm.h index 95a00fb867e6..1ec58d652a5a 100644 --- a/include/uapi/drm/lima_drm.h +++ b/include/uapi/drm/lima_drm.h @@ -32,12 +32,19 @@ struct drm_lima_get_param { __u64 value; /* out, parameter value */ }; +/* + * heap buffer dynamically increase backup memory size when GP task fail + * due to lack of heap memory. size field of heap buffer is an up bound of + * the backup memory which can be set to a fairly large value. + */ +#define LIMA_BO_FLAG_HEAP (1 << 0) + /** * create a buffer for used by GPU */ struct drm_lima_gem_create { __u32 size; /* in, buffer size */ - __u32 flags; /* in, currently no flags, must be zero */ + __u32 flags; /* in, buffer flags */ __u32 handle; /* out, GEM buffer handle */ __u32 pad; /* pad, must be zero */ }; From patchwork Thu Jan 16 13:11:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 11336843 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E64F6C1 for ; Thu, 16 Jan 2020 13:12:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7C2E920748 for ; Thu, 16 Jan 2020 13:12:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pBba8JAd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C2E920748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FD7F6ECFB; Thu, 16 Jan 2020 13:12:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by gabe.freedesktop.org (Postfix) with ESMTPS id 980CE6ECFB; Thu, 16 Jan 2020 13:12:56 +0000 (UTC) Received: by mail-pl1-x641.google.com with SMTP id c9so3026806plo.1; Thu, 16 Jan 2020 05:12:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UdGg/fAOpUW6G12ElXdVhk4KCnnAbO4mA+qwiO+O908=; b=pBba8JAdVoQBQc6eAieLR//FAyFFvJWS7XBMAAMPLe4DfNPrY4J/BowS52GmF4p1rB zzJHbm5zXKtP09xyMZeTXYnMfMnKo0olnENkbhtJW+4VD8p3I8zQGpBObs/FUGQyO9ie nXgu69L7HdyaCQTyvg9z4pip/4CCrMhrHq6BktF/j+cvwC9nMwAqn70m6Ai/t4QDUss+ tfjVrE6d+nyyHDVOcZzbigRd22zk8ViF685UOtpaUs7E35VxnUOqUr5V3lnwNR622XLy s614mgzKc9jW0Gz0tf8otCivhb+0B1JXfbFnoCKNSgfmbbCpG2DOzlYRK+V2JmVeIi7e rEnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UdGg/fAOpUW6G12ElXdVhk4KCnnAbO4mA+qwiO+O908=; b=RqtPWfX9bj33WaudjG8yvJi3S0sksox3n8NDeN1Kz8KpOOmweGwXWaZ7cJFuBKC8j7 NT7Kbbc0vZpE7cRBmgxeYl5lg9vuHllqhrxhwSaRZZkJuGTp/dLwmosX8q/7PSMJ8lDV bmFRcJL3PkhcnLxLxa1dyZLRTDwT2LAzDlvV/hvdWnLQjyqgZ+4MPkwFdNLPeghTsgUn ypptysrJ2kCBgE2yWNf1wLDFqsIN4fiTa5xXNfqis4fcVtx7Ak1OXWmLigKwHwJEoNQO QE+35QsonAjHw2k4zrO7SY1DSwIXD2djCbi/6Zns++iGL8gJfxnDjK0F1KutSVhdm7UM 4NVg== X-Gm-Message-State: APjAAAX7EVBCPS6NLaRmT3usPSXr5vKIoU4N8p1RVuQc2mNcwj7n2tA2 G5P09/lJGjbRCZ7Rz4pEY0ALy5bP X-Google-Smtp-Source: APXvYqwcx7g7D5vgpL6oed5WaK3ApNisHCT/Q3XnVqu7MjYxSnAy7L5yZZ1I6LF/5S14x0DaE1l+fQ== X-Received: by 2002:a17:902:8c94:: with SMTP id t20mr24235927plo.170.1579180376012; Thu, 16 Jan 2020 05:12:56 -0800 (PST) Received: from localhost.localdomain ([103.219.195.110]) by smtp.gmail.com with ESMTPSA id v9sm25945877pfi.37.2020.01.16.05.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 05:12:55 -0800 (PST) From: Qiang Yu To: dri-devel@lists.freedesktop.org Subject: [PATCH 4/5] drm/lima: recover task by enlarging heap buffer Date: Thu, 16 Jan 2020 21:11:56 +0800 Message-Id: <20200116131157.13346-5-yuq825@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200116131157.13346-1-yuq825@gmail.com> References: <20200116131157.13346-1-yuq825@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lima@lists.freedesktop.org, David Airlie , Vasily Khoruzhick , Andreas Baierl , Qiang Yu , Erico Nunes MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Increase heap buffer backup memory when GP receive PLBU out of memory interrupt, then resume the task. Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_gp.c | 51 +++++++++++++++++++++++++++++-- drivers/gpu/drm/lima/lima_mmu.c | 5 +++ drivers/gpu/drm/lima/lima_mmu.h | 1 + drivers/gpu/drm/lima/lima_sched.c | 35 ++++++++++++++++++--- drivers/gpu/drm/lima/lima_sched.h | 6 ++++ 5 files changed, 91 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_gp.c b/drivers/gpu/drm/lima/lima_gp.c index ccf49faedebf..d1e7826c2d74 100644 --- a/drivers/gpu/drm/lima/lima_gp.c +++ b/drivers/gpu/drm/lima/lima_gp.c @@ -11,6 +11,8 @@ #include "lima_device.h" #include "lima_gp.h" #include "lima_regs.h" +#include "lima_gem.h" +#include "lima_vm.h" #define gp_write(reg, data) writel(data, ip->iomem + reg) #define gp_read(reg) readl(ip->iomem + reg) @@ -20,6 +22,7 @@ static irqreturn_t lima_gp_irq_handler(int irq, void *data) struct lima_ip *ip = data; struct lima_device *dev = ip->dev; struct lima_sched_pipe *pipe = dev->pipe + lima_pipe_gp; + struct lima_sched_task *task = pipe->current_task; u32 state = gp_read(LIMA_GP_INT_STAT); u32 status = gp_read(LIMA_GP_STATUS); bool done = false; @@ -29,8 +32,14 @@ static irqreturn_t lima_gp_irq_handler(int irq, void *data) return IRQ_NONE; if (state & LIMA_GP_IRQ_MASK_ERROR) { - dev_err(dev->dev, "gp error irq state=%x status=%x\n", - state, status); + if ((state & LIMA_GP_IRQ_MASK_ERROR) == LIMA_GP_IRQ_PLBU_OUT_OF_MEM) + dev_dbg(dev->dev, "gp out of heap irq status=%x\n", status); + else { + dev_err(dev->dev, "gp error irq state=%x status=%x\n", + state, status); + if (task) + task->recoverable = false; + } /* mask all interrupts before hard reset */ gp_write(LIMA_GP_INT_MASK, 0); @@ -43,6 +52,7 @@ static irqreturn_t lima_gp_irq_handler(int irq, void *data) bool active = status & (LIMA_GP_STATUS_VS_ACTIVE | LIMA_GP_STATUS_PLBU_ACTIVE); done = valid && !active; + pipe->error = false; } gp_write(LIMA_GP_INT_CLEAR, state); @@ -121,6 +131,19 @@ static void lima_gp_task_run(struct lima_sched_pipe *pipe, u32 cmd = 0; int i; + /* update real heap buffer size for GP */ + for (i = 0; i < task->num_bos; i++) { + struct lima_bo *bo = task->bos[i]; + if (bo->heap_size && + lima_vm_get_va(task->vm, bo) == f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2]) { + f[LIMA_GP_PLBU_ALLOC_END_ADDR >> 2] = + f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2] + bo->heap_size; + task->recoverable = true; + task->heap = bo; + break; + } + } + if (f[LIMA_GP_VSCL_START_ADDR >> 2] != f[LIMA_GP_VSCL_END_ADDR >> 2]) cmd |= LIMA_GP_CMD_START_VS; @@ -184,6 +207,29 @@ static void lima_gp_task_mmu_error(struct lima_sched_pipe *pipe) lima_sched_pipe_task_done(pipe); } +static int lima_gp_task_recover(struct lima_sched_pipe *pipe) +{ + struct lima_ip *ip = pipe->processor[0]; + struct lima_sched_task *task = pipe->current_task; + struct drm_lima_gp_frame *frame = task->frame; + u32 *f = frame->frame; + size_t fail_size = + f[LIMA_GP_PLBU_ALLOC_END_ADDR >> 2] - + f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2]; + + if (fail_size == task->heap->heap_size) { + int ret = lima_heap_alloc(task->heap, task->vm); + if (ret < 0) + return ret; + } + + gp_write(LIMA_GP_INT_MASK, LIMA_GP_IRQ_MASK_USED); + gp_write(LIMA_GP_PLBU_ALLOC_END_ADDR, + f[LIMA_GP_PLBU_ALLOC_START_ADDR >> 2] + task->heap->heap_size); + gp_write(LIMA_GP_CMD, LIMA_GP_CMD_UPDATE_PLBU_ALLOC); + return 0; +} + static void lima_gp_print_version(struct lima_ip *ip) { u32 version, major, minor; @@ -270,6 +316,7 @@ int lima_gp_pipe_init(struct lima_device *dev) pipe->task_fini = lima_gp_task_fini; pipe->task_error = lima_gp_task_error; pipe->task_mmu_error = lima_gp_task_mmu_error; + pipe->task_recover = lima_gp_task_recover; return 0; } diff --git a/drivers/gpu/drm/lima/lima_mmu.c b/drivers/gpu/drm/lima/lima_mmu.c index 97ec09dee572..f79d2af427e7 100644 --- a/drivers/gpu/drm/lima/lima_mmu.c +++ b/drivers/gpu/drm/lima/lima_mmu.c @@ -99,6 +99,11 @@ void lima_mmu_fini(struct lima_ip *ip) } +void lima_mmu_flush_tlb(struct lima_ip *ip) +{ + mmu_write(LIMA_MMU_COMMAND, LIMA_MMU_COMMAND_ZAP_CACHE); +} + void lima_mmu_switch_vm(struct lima_ip *ip, struct lima_vm *vm) { struct lima_device *dev = ip->dev; diff --git a/drivers/gpu/drm/lima/lima_mmu.h b/drivers/gpu/drm/lima/lima_mmu.h index 8c78319bcc8e..4f8ccbebcba1 100644 --- a/drivers/gpu/drm/lima/lima_mmu.h +++ b/drivers/gpu/drm/lima/lima_mmu.h @@ -10,6 +10,7 @@ struct lima_vm; int lima_mmu_init(struct lima_ip *ip); void lima_mmu_fini(struct lima_ip *ip); +void lima_mmu_flush_tlb(struct lima_ip *ip); void lima_mmu_switch_vm(struct lima_ip *ip, struct lima_vm *vm); void lima_mmu_page_fault_resume(struct lima_ip *ip); diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c index a31a90c380b6..117f1c8408a1 100644 --- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -312,6 +312,26 @@ static const struct drm_sched_backend_ops lima_sched_ops = { .free_job = lima_sched_free_job, }; +static void lima_sched_recover_work(struct work_struct *work) +{ + struct lima_sched_pipe *pipe = + container_of(work, struct lima_sched_pipe, recover_work); + int i; + + for (i = 0; i < pipe->num_l2_cache; i++) + lima_l2_cache_flush(pipe->l2_cache[i]); + + if (pipe->bcast_mmu) + lima_mmu_flush_tlb(pipe->bcast_mmu); + else { + for (i = 0; i < pipe->num_mmu; i++) + lima_mmu_flush_tlb(pipe->mmu[i]); + } + + if (pipe->task_recover(pipe)) + drm_sched_fault(&pipe->base); +} + int lima_sched_pipe_init(struct lima_sched_pipe *pipe, const char *name) { unsigned int timeout = lima_sched_timeout_ms > 0 ? @@ -320,6 +340,8 @@ int lima_sched_pipe_init(struct lima_sched_pipe *pipe, const char *name) pipe->fence_context = dma_fence_context_alloc(1); spin_lock_init(&pipe->fence_lock); + INIT_WORK(&pipe->recover_work, lima_sched_recover_work); + return drm_sched_init(&pipe->base, &lima_sched_ops, 1, 0, msecs_to_jiffies(timeout), name); } @@ -331,11 +353,14 @@ void lima_sched_pipe_fini(struct lima_sched_pipe *pipe) void lima_sched_pipe_task_done(struct lima_sched_pipe *pipe) { - if (pipe->error) - drm_sched_fault(&pipe->base); - else { - struct lima_sched_task *task = pipe->current_task; - + struct lima_sched_task *task = pipe->current_task; + + if (pipe->error) { + if (task && task->recoverable) + schedule_work(&pipe->recover_work); + else + drm_sched_fault(&pipe->base); + } else { pipe->task_fini(pipe); dma_fence_signal(task->fence); } diff --git a/drivers/gpu/drm/lima/lima_sched.h b/drivers/gpu/drm/lima/lima_sched.h index 1d814fecbcc0..d64393fb50a9 100644 --- a/drivers/gpu/drm/lima/lima_sched.h +++ b/drivers/gpu/drm/lima/lima_sched.h @@ -20,6 +20,9 @@ struct lima_sched_task { struct lima_bo **bos; int num_bos; + bool recoverable; + struct lima_bo *heap; + /* pipe fence */ struct dma_fence *fence; }; @@ -68,6 +71,9 @@ struct lima_sched_pipe { void (*task_fini)(struct lima_sched_pipe *pipe); void (*task_error)(struct lima_sched_pipe *pipe); void (*task_mmu_error)(struct lima_sched_pipe *pipe); + int (*task_recover)(struct lima_sched_pipe *pipe); + + struct work_struct recover_work; }; int lima_sched_task_init(struct lima_sched_task *task, From patchwork Thu Jan 16 13:11:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 11336845 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D0CDF921 for ; Thu, 16 Jan 2020 13:13:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AE7D120748 for ; Thu, 16 Jan 2020 13:13:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SeVTp+hO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE7D120748 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 90E416ECF9; Thu, 16 Jan 2020 13:13:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D0476ECF9; Thu, 16 Jan 2020 13:12:59 +0000 (UTC) Received: by mail-pg1-x541.google.com with SMTP id k3so9887199pgc.3; Thu, 16 Jan 2020 05:12:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aRXdGY9ecbhuEeNZ24odCIwAOk0VbdzxvC5sYvZf8qE=; b=SeVTp+hOJfQXvIYnbF5/exfMcDuf+3raQojyCka/wE1AcTeFcjvzn+IXORSDMDFFLO fJ3o7I2GoAiV36yEa4dqgOWQ7UjG/K5g9nCdi7J/06+WxZDJSRxOlch48rKgWNAAnYVp uFwYXYROAmIlaj5hhVkGVThCqDp7K8oOxdcYXph0PvOnMZj4kjQoCxBfQKgKQMTojVB/ 3OkrTHKMykr0P7dsbR3gjE5tru/uycuasrapHXSbnKfjDCih5yctkLppbxaZqEtRCTN7 cNN9Z75LVV/3dLK8Wzq0OVgbjh7rGYV2oDtkHe+zKTMUY6I7oQ/1IM/cPPGXOSZf12GB o89g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aRXdGY9ecbhuEeNZ24odCIwAOk0VbdzxvC5sYvZf8qE=; b=OLKaGWqp/afUyWothHc1XGclcIEIf1DFYYYCRWak5L2AKv0CaX03zCQl+w77jlZY97 N4XfeUlTjdNp/lRi4u1ZbtFID19STeZiKTQGBvw0kj7j6sg32tVFeEDmcUH09awAzCdr 4EZFEiQT/aiUf/Eg+zcwOjYZamMCmmRUSlPDSgNziFC/04MMdTZpBLK9zg07+vaieIt4 TGV7VR0X+MU+kpfXcrh2wJpVeAUzIOb3yEEy/Y2YPQk+g2Cbeox1BSBMb5NRoffrfaWR 5newIlBtkOdoZi67ZjfAb/frRRw42yGppxyCEdwD3ziPKZiwpGkgAqqCV9utbPktXeic J3HQ== X-Gm-Message-State: APjAAAWmbi8gsADNm1ad43sKCvgTnE1FDKRP/m2EgD2frPsox1ilCa7L TCPMVAAf8q/GG98JB4YMvKf3d7CH X-Google-Smtp-Source: APXvYqxKFijuE1lyjx05MxY8aVISyJlW4bGfjvjOCCt2ch1yXWmRnNSAbzzNn+c3N9R0lg0s6SleLw== X-Received: by 2002:a62:f94d:: with SMTP id g13mr36792684pfm.60.1579180379064; Thu, 16 Jan 2020 05:12:59 -0800 (PST) Received: from localhost.localdomain ([103.219.195.110]) by smtp.gmail.com with ESMTPSA id v9sm25945877pfi.37.2020.01.16.05.12.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Jan 2020 05:12:58 -0800 (PST) From: Qiang Yu To: dri-devel@lists.freedesktop.org Subject: [PATCH 5/5] drm/lima: increase driver version to 1.1 Date: Thu, 16 Jan 2020 21:11:57 +0800 Message-Id: <20200116131157.13346-6-yuq825@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200116131157.13346-1-yuq825@gmail.com> References: <20200116131157.13346-1-yuq825@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lima@lists.freedesktop.org, David Airlie , Vasily Khoruzhick , Andreas Baierl , Qiang Yu , Erico Nunes MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Signed-off-by: Qiang Yu --- drivers/gpu/drm/lima/lima_drv.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_drv.c b/drivers/gpu/drm/lima/lima_drv.c index 18f88aaef1a2..2daac64d8955 100644 --- a/drivers/gpu/drm/lima/lima_drv.c +++ b/drivers/gpu/drm/lima/lima_drv.c @@ -245,6 +245,12 @@ static const struct drm_ioctl_desc lima_drm_driver_ioctls[] = { DEFINE_DRM_GEM_FOPS(lima_drm_driver_fops); +/** + * Changelog: + * + * - 1.1.0 - add heap buffer support + */ + static struct drm_driver lima_drm_driver = { .driver_features = DRIVER_RENDER | DRIVER_GEM | DRIVER_SYNCOBJ, .open = lima_drm_driver_open, @@ -254,9 +260,9 @@ static struct drm_driver lima_drm_driver = { .fops = &lima_drm_driver_fops, .name = "lima", .desc = "lima DRM", - .date = "20190217", + .date = "20191231", .major = 1, - .minor = 0, + .minor = 1, .patchlevel = 0, .gem_create_object = lima_gem_create_object,