From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8EE49C2B9F4 for ; Mon, 28 Jun 2021 12:43:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5A64961450 for ; Mon, 28 Jun 2021 12:43:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5A64961450 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5FDD899F2; Mon, 28 Jun 2021 12:43:37 +0000 (UTC) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by gabe.freedesktop.org (Postfix) with ESMTPS id B27A76E44D for ; Mon, 28 Jun 2021 12:43:12 +0000 (UTC) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 2CC62580502; Mon, 28 Jun 2021 08:43:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 28 Jun 2021 08:43:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=QYwjYbERT0K9u SYo01fONKt0VxIOtLUAbN9O7B83ar8=; b=BOjYyYr+r/I8iQ92ILNtKBwRMWm+N PT9G59SPQq+SyTg5y+TReJt9GE+NGjRb/QoWmW06VmbaIdH42JbqDgTtv/8hJ7le h61JorV6UdPaElzrzOM+Fon6eEZBf8V4m2BkWxunYue6rHJ//wusx3VWYvhbLdFe 8AqfofOjLI5ENrhL0y+WY09yGtcyNSalSJ4zAj///YADNWKXm7EU7UqDhFCjbNPU LavRDbbPR2Qe0F7ssshKnaQxLS7qtJ5wKkBdu/MsMsfi+SRLN9EbNKwGoak6dJqh 5BC47UYaWPdKFTp+QQMWpUm7G74rz5WAaLOOmg/jMC3u7B0WQOBZxvOeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=QYwjYbERT0K9uSYo01fONKt0VxIOtLUAbN9O7B83ar8=; b=N5xrNQLw 0f8hriw1Pq+TWSCWMxaaT33EsyHw49tL8d7Q7U/nYNYueWNwhXPEwwMNVVUeFcBe mKMapvqh/soYQzUWe88zZd0aWB3bfl3CgnWND9MZYhhuLEFLikDECUy6QqasoQ7x uuur02Zf7T7DXOX+Up+iF+tpvaGXpF3TtKVQ69wQWqT9tikkOHGM2OuVnkGgyD9/ 73SaVaj7WtVpRSTzxGAyfFb+3RL6GAeCqTHA2OmHdhOKDeUH62ARLixXUP6uQmDJ bb+ogPlARBXSsP5NrymrM9jGkf4ZsRSIfRH6s8bG0/6/aFBT3HrTA58oFFiQF368 /pAoCQ+WK6cxJA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeehgedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Jun 2021 08:43:11 -0400 (EDT) From: Maxime Ripard To: Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH v5 06/10] drm/vc4: crtc: Add some logging Date: Mon, 28 Jun 2021 14:42:53 +0200 Message-Id: <20210628124257.140453-7-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210628124257.140453-1-maxime@cerno.tech> References: <20210628124257.140453-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Saenz Julienne , Dom Cobley , Tim Gover , Dave Stevenson , linux-kernel@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, Emma Anholt , Phil Elwell Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The encoder retrieval code has been a source of bugs and glitches in the past and the crtc <-> encoder association been wrong in a number of different ways. Add some logging to quickly spot issues if they occur. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index c88ce31ec90f..073b7e528175 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -524,6 +524,9 @@ static void vc4_crtc_atomic_disable(struct drm_crtc *crtc, struct drm_encoder *encoder = vc4_get_crtc_encoder(crtc, old_state); struct drm_device *dev = crtc->dev; + drm_dbg(dev, "Disabling CRTC %s (%u) connected to Encoder %s (%u)", + crtc->name, crtc->base.id, encoder->name, encoder->base.id); + require_hvs_enabled(dev); /* Disable vblank irq handling before crtc is disabled. */ @@ -555,6 +558,9 @@ static void vc4_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_encoder *encoder = vc4_get_crtc_encoder(crtc, new_state); struct vc4_encoder *vc4_encoder = to_vc4_encoder(encoder); + drm_dbg(dev, "Enabling CRTC %s (%u) connected to Encoder %s (%u)", + crtc->name, crtc->base.id, encoder->name, encoder->base.id); + require_hvs_enabled(dev); /* Enable vblank irq handling before crtc is started otherwise -- 2.31.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 429B2C49361 for ; Mon, 28 Jun 2021 12:43:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 264B061C8B for ; Mon, 28 Jun 2021 12:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233065AbhF1Mpz (ORCPT ); Mon, 28 Jun 2021 08:45:55 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:38579 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232943AbhF1Mph (ORCPT ); Mon, 28 Jun 2021 08:45:37 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 2CC62580502; Mon, 28 Jun 2021 08:43:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 28 Jun 2021 08:43:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=QYwjYbERT0K9u SYo01fONKt0VxIOtLUAbN9O7B83ar8=; b=BOjYyYr+r/I8iQ92ILNtKBwRMWm+N PT9G59SPQq+SyTg5y+TReJt9GE+NGjRb/QoWmW06VmbaIdH42JbqDgTtv/8hJ7le h61JorV6UdPaElzrzOM+Fon6eEZBf8V4m2BkWxunYue6rHJ//wusx3VWYvhbLdFe 8AqfofOjLI5ENrhL0y+WY09yGtcyNSalSJ4zAj///YADNWKXm7EU7UqDhFCjbNPU LavRDbbPR2Qe0F7ssshKnaQxLS7qtJ5wKkBdu/MsMsfi+SRLN9EbNKwGoak6dJqh 5BC47UYaWPdKFTp+QQMWpUm7G74rz5WAaLOOmg/jMC3u7B0WQOBZxvOeA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=QYwjYbERT0K9uSYo01fONKt0VxIOtLUAbN9O7B83ar8=; b=N5xrNQLw 0f8hriw1Pq+TWSCWMxaaT33EsyHw49tL8d7Q7U/nYNYueWNwhXPEwwMNVVUeFcBe mKMapvqh/soYQzUWe88zZd0aWB3bfl3CgnWND9MZYhhuLEFLikDECUy6QqasoQ7x uuur02Zf7T7DXOX+Up+iF+tpvaGXpF3TtKVQ69wQWqT9tikkOHGM2OuVnkGgyD9/ 73SaVaj7WtVpRSTzxGAyfFb+3RL6GAeCqTHA2OmHdhOKDeUH62ARLixXUP6uQmDJ bb+ogPlARBXSsP5NrymrM9jGkf4ZsRSIfRH6s8bG0/6/aFBT3HrTA58oFFiQF368 /pAoCQ+WK6cxJA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeehgedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Jun 2021 08:43:11 -0400 (EDT) From: Maxime Ripard To: Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Cc: Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , linux-rpi-kernel@lists.infradead.org, Maxime Ripard , Emma Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Eric Anholt , linux-kernel@vger.kernel.org Subject: [PATCH v5 06/10] drm/vc4: crtc: Add some logging Date: Mon, 28 Jun 2021 14:42:53 +0200 Message-Id: <20210628124257.140453-7-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210628124257.140453-1-maxime@cerno.tech> References: <20210628124257.140453-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The encoder retrieval code has been a source of bugs and glitches in the past and the crtc <-> encoder association been wrong in a number of different ways. Add some logging to quickly spot issues if they occur. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index c88ce31ec90f..073b7e528175 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -524,6 +524,9 @@ static void vc4_crtc_atomic_disable(struct drm_crtc *crtc, struct drm_encoder *encoder = vc4_get_crtc_encoder(crtc, old_state); struct drm_device *dev = crtc->dev; + drm_dbg(dev, "Disabling CRTC %s (%u) connected to Encoder %s (%u)", + crtc->name, crtc->base.id, encoder->name, encoder->base.id); + require_hvs_enabled(dev); /* Disable vblank irq handling before crtc is disabled. */ @@ -555,6 +558,9 @@ static void vc4_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_encoder *encoder = vc4_get_crtc_encoder(crtc, new_state); struct vc4_encoder *vc4_encoder = to_vc4_encoder(encoder); + drm_dbg(dev, "Enabling CRTC %s (%u) connected to Encoder %s (%u)", + crtc->name, crtc->base.id, encoder->name, encoder->base.id); + require_hvs_enabled(dev); /* Enable vblank irq handling before crtc is started otherwise -- 2.31.1