From patchwork Thu Apr 5 09:18:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10323971 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF140600CB for ; Thu, 5 Apr 2018 09:19:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D05FA2911B for ; Thu, 5 Apr 2018 09:19:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3FBF2911F; Thu, 5 Apr 2018 09:19:13 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 7FFFE2911B for ; Thu, 5 Apr 2018 09:19:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E62166E6EE; Thu, 5 Apr 2018 09:18:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from galahad.ideasonboard.com (galahad.ideasonboard.com [185.26.127.97]) by gabe.freedesktop.org (Postfix) with ESMTPS id 609316E6EE for ; Thu, 5 Apr 2018 09:18:46 +0000 (UTC) Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 759E920FC8; Thu, 5 Apr 2018 11:16:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1522919768; bh=pc7uvrxk/4h13CtckVG/bfc1he6lmwT2Po92zstcqtE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WRynXPrK9yPbLcyPNpTCQRO988qPQVQmnfu7Vgu5TJRaiX2P2Z7ZRpqMWjFR7Tw7F blfdtqpcfNYLV++5X4Zw5J69/XpN6xdKWdVFpwyOm4FeyQu+Fk62FPMy47MX4ePGv6 2t/92KRq4GrvCy4qu61lPpX2slnXKkPmZ/YPIm7k= From: Laurent Pinchart To: linux-media@vger.kernel.org Subject: [PATCH v2 14/15] v4l: vsp1: Add BRx dynamic assignment debugging messages Date: Thu, 5 Apr 2018 12:18:39 +0300 Message-Id: <20180405091840.30728-15-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180405091840.30728-1-laurent.pinchart+renesas@ideasonboard.com> References: <20180405091840.30728-1-laurent.pinchart+renesas@ideasonboard.com> 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-renesas-soc@vger.kernel.org, Kieran Bingham , 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 Dynamic assignment of the BRU and BRS to pipelines is prone to regressions, add messages to make debugging easier. Keep it as a separate commit to ease removal of those messages once the code will deem to be completely stable. Signed-off-by: Laurent Pinchart Acked-by: Kieran Bingham --- drivers/media/platform/vsp1/vsp1_drm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/media/platform/vsp1/vsp1_drm.c b/drivers/media/platform/vsp1/vsp1_drm.c index f82f83b6d4ff..b43d6dc0d5f5 100644 --- a/drivers/media/platform/vsp1/vsp1_drm.c +++ b/drivers/media/platform/vsp1/vsp1_drm.c @@ -190,6 +190,10 @@ static int vsp1_du_pipeline_setup_bru(struct vsp1_device *vsp1, /* Release our BRU if we have one. */ if (pipe->bru) { + dev_dbg(vsp1->dev, "%s: pipe %u: releasing %s\n", + __func__, pipe->lif->index, + BRU_NAME(pipe->bru)); + /* * The BRU might be acquired by the other pipeline in * the next step. We must thus remove it from the list @@ -219,6 +223,9 @@ static int vsp1_du_pipeline_setup_bru(struct vsp1_device *vsp1, if (bru->pipe) { struct vsp1_drm_pipeline *owner_pipe; + dev_dbg(vsp1->dev, "%s: pipe %u: waiting for %s\n", + __func__, pipe->lif->index, BRU_NAME(bru)); + owner_pipe = to_vsp1_drm_pipeline(bru->pipe); owner_pipe->force_bru_release = true; @@ -245,6 +252,9 @@ static int vsp1_du_pipeline_setup_bru(struct vsp1_device *vsp1, &pipe->entities); /* Add the BRU to the pipeline. */ + dev_dbg(vsp1->dev, "%s: pipe %u: acquired %s\n", + __func__, pipe->lif->index, BRU_NAME(bru)); + pipe->bru = bru; pipe->bru->pipe = pipe; pipe->bru->sink = &pipe->output->entity; @@ -548,6 +558,10 @@ int vsp1_du_setup_lif(struct device *dev, unsigned int pipe_index, drm_pipe->du_complete = NULL; pipe->num_inputs = 0; + dev_dbg(vsp1->dev, "%s: pipe %u: releasing %s\n", + __func__, pipe->lif->index, + BRU_NAME(pipe->bru)); + list_del(&pipe->bru->list_pipe); pipe->bru->pipe = NULL; pipe->bru = NULL;