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: 10243615 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 F170A602A0 for ; Mon, 26 Feb 2018 21:44:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB5C229B40 for ; Mon, 26 Feb 2018 21:44:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D038C29B72; Mon, 26 Feb 2018 21:44: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=ham 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 7964A29B40 for ; Mon, 26 Feb 2018 21:44:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751853AbeBZVo5 (ORCPT ); Mon, 26 Feb 2018 16:44:57 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:54324 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751825AbeBZVoz (ORCPT ); Mon, 26 Feb 2018 16:44:55 -0500 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 Cc: dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, Kieran Bingham 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> 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 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;