From patchwork Mon Feb 26 21:45:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 10243673 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 5F4B3602A0 for ; Mon, 26 Feb 2018 21:45:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 499A329B40 for ; Mon, 26 Feb 2018 21:45:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E4A329B72; Mon, 26 Feb 2018 21:45:42 +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 CE33529B40 for ; Mon, 26 Feb 2018 21:45:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 40DBA6E564; Mon, 26 Feb 2018 21:45:07 +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 BEECD6E557 for ; Mon, 26 Feb 2018 21:44:57 +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 EA3C4212EC; Mon, 26 Feb 2018 22:42:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1519681380; bh=gc72MwV+pjNX2YTFU7u3j03glzNjYJMT61nb8FDpCTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g5omjCNexb6xnXMPTdoXdXpZ0T315i7Tso8hIk3LYIilaSWQ3tlzsBtpq1pMBm2cf GulsnOPBRJow9gAUx0zQi0EIsO0hx2rlHMtCy+JQYW8e+SCV1HSRkJTm6Nr3bPoV2j YOG1f17KMgH5NkyZKRM2l6agT9Crq077uOfpb3LA= From: Laurent Pinchart To: linux-media@vger.kernel.org Subject: [PATCH 14/15] v4l: vsp1: Add BRx dynamic assignment debugging messages Date: Mon, 26 Feb 2018 23:45:15 +0200 Message-Id: <20180226214516.11559-15-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180226214516.11559-1-laurent.pinchart+renesas@ideasonboard.com> References: <20180226214516.11559-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 87e31ba0ddf5..521bbc227110 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; @@ -549,6 +559,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;