From patchwork Tue Apr 23 14:40:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10913207 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 897241575 for ; Tue, 23 Apr 2019 14:40:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A983288A7 for ; Tue, 23 Apr 2019 14:40:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78EBA288BF; Tue, 23 Apr 2019 14:40:52 +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 2A7BB28910 for ; Tue, 23 Apr 2019 14:40:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 79F6989364; Tue, 23 Apr 2019 14:40:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4DE8089364 for ; Tue, 23 Apr 2019 14:40:48 +0000 (UTC) X-Originating-IP: 90.88.147.33 Received: from localhost.localdomain (aaubervilliers-681-1-27-33.w90-88.abo.wanadoo.fr [90.88.147.33]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 52ABE1BF214; Tue, 23 Apr 2019 14:40:44 +0000 (UTC) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 0/4] drm/vc4: Binner BO management improvements Date: Tue, 23 Apr 2019 16:40:24 +0200 Message-Id: <20190423144028.30036-1-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 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: Maxime Ripard , Eben Upton , David Airlie , Paul Kocialkowski , Thomas Petazzoni Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Changes since v5: * Fix more locking mistakes; * Introduce get/put helpers; * Grabbed a reference when submitting an exec job with a binner slot. * Addressed misc comments. Changes since v4: * Used a kref on the binner bo instead of firstopen/lastclose; * Added a mutex to prevent race conditions; * Took care of enabling the OOM interrupt when we have a binner BO allocated. Changes since v3: * Split changes into more commits when possible; * Reworked binner bo alloc condition as discussed. Changes since v2: * Removed deprecated sentence about fristopen; * Added collected Reviewed-By tags. Changes since v1: * Squashed the two final patches into one. Paul Kocialkowski (4): drm/vc4: Reformat and the binner bo allocation helper drm/vc4: Check for V3D before binner bo alloc drm/vc4: Check for the binner bo before handling OOM interrupt drm/vc4: Allocate binner bo when starting to use the V3D drivers/gpu/drm/vc4/vc4_bo.c | 45 +++++++++++++++++++++-- drivers/gpu/drm/vc4/vc4_drv.c | 6 ++++ drivers/gpu/drm/vc4/vc4_drv.h | 14 ++++++++ drivers/gpu/drm/vc4/vc4_gem.c | 13 +++++++ drivers/gpu/drm/vc4/vc4_irq.c | 20 ++++++++--- drivers/gpu/drm/vc4/vc4_v3d.c | 68 ++++++++++++++++++++++++++--------- 6 files changed, 142 insertions(+), 24 deletions(-)