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: 10323935 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 553B560208 for ; Thu, 5 Apr 2018 09:18:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4736D2911D for ; Thu, 5 Apr 2018 09:18:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C05429120; Thu, 5 Apr 2018 09:18:58 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8CD72911D for ; Thu, 5 Apr 2018 09:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751984AbeDEJSw (ORCPT ); Thu, 5 Apr 2018 05:18:52 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:54335 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751971AbeDEJSq (ORCPT ); Thu, 5 Apr 2018 05:18:46 -0400 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 Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Kieran Bingham 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> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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;