Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp587940pxb; Mon, 25 Oct 2021 14:24:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzcL1sU260ILTmkT2YYODkkooQXQUNv08/O3igVxGilyCAVEK3kDIu9lLtA0u/K5J1JFyV X-Received: by 2002:a17:903:244c:b0:140:4b4d:bf7a with SMTP id l12-20020a170903244c00b001404b4dbf7amr10000383pls.45.1635197071015; Mon, 25 Oct 2021 14:24:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635197071; cv=none; d=google.com; s=arc-20160816; b=sIwqE96/kkBchZwBGlveariXvG22RDbB6EzSFC34tt/fEoB6j+/tfXILXJJbTiTVm6 WWVCAfcN2NLPzIM5rR3+4yy1VG69o3ADWYNEAq5X4PITwinXNyVXyMKWM4bQobK21SnY GPORuZTrP45WRNG12xiPzSEfdfM/7wMzf6lgKrf9mGBTbyKj89ivs4w7EtWDrlTFmzI/ D41Orv8402bY1a/WGqb2S68POSuQcn9M+qkRe9CXJ9eY2kMXF21mBjJDCKEB8HXHFfiX eS7nEQW4urge+UXFYuRnRFUcHCKTCYDIIXsbeDbgFeRpah9M/hlxQ7X/WJiujgJQ2tzQ 3Aqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=a9roag1oqPjXRLZgnod4bYHBt3pMTWCwcd3UoUXihu4=; b=XzMZqtuE8zR04Luh3u/BeIcXNDcK4UD3zkR+NZACsHDvnZPTIK0Mfs/dE8/+4c93lr XmXjxzeWDmikjhywLINF3T9YoPcsNFM3ALUSvMxOaV84Q/wEQcOn2P4fmKK7HdiJq3pW gknkrQSTog+xiFuaqwyqUE4F7kiprHbUqg3v1aH3A6/fJ9jVGUSz0TiEKFUtbVk20PiG VcrkM2/nLUXbGuevhrv/p5MY0huF+T1HeSgsPw6N/99d9QNLJPIjb5/Zxiq9qiJ6wF6U Hxdb6RAxRyK4jH8wY+6bf4M9WcTHu5w5UYRWPgqe0J3sBkXL1TN6q+O9aO1I3zeCIXMm sQfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=mv0j6KCP; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mJrsUV57; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si4655932pfu.62.2021.10.25.14.24.17; Mon, 25 Oct 2021 14:24:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=mv0j6KCP; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mJrsUV57; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233940AbhJYPby (ORCPT + 99 others); Mon, 25 Oct 2021 11:31:54 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:49421 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233932AbhJYPbm (ORCPT ); Mon, 25 Oct 2021 11:31:42 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id E539B5806D0; Mon, 25 Oct 2021 11:29:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 25 Oct 2021 11:29:19 -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=fm1; bh=a9roag1oqPjXR LZgnod4bYHBt3pMTWCwcd3UoUXihu4=; b=mv0j6KCPChwCcbStU2zzOnZ25al4m ZJ63fa9Ys0UmAU4cEOC6QeZE13tXoNpIZf9VMPVrIonBQ3756i77aWsoIR62ES3E MTzRTzGJQIpWlJno/2cLKAyRyA9cEzy95lgpZhSIMOAAZlxMtLYMe0nWe90S2SLy qY/V17lVuOmZua2nxKTlUxWrhf9pJMd2dMhrhscGaAt+Z/DXwMHklR27J+0ezCvY dQhH0Cj8eAnqt5fttu+O3J6AAhnRDYh4bLjU6R/kcADWFqvo3oFEiDFs4ohR5HXL bn3MV+ZFLnhmgbORDs8EQljb/cFgDBLwm9JLoOtVkYns3KM+r8FxNEe0w== 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= fm1; bh=a9roag1oqPjXRLZgnod4bYHBt3pMTWCwcd3UoUXihu4=; b=mJrsUV57 KHgdlgYugttWnqM7mMK8ebtAn7mXM/WS9eS1If6OeIGu82D61+xcx2k1TY9wlmVE TDaVjfTkYCz8sO2N7n4Prj3CF+MV2lhckn1O0EoUBAcmulppWwi1C44lxTWYH76I 69HeQuveVgcrOun2+BSb/IdDIrbKPvo4SY0GBp/H446t6XkTKXtM6cL5TITGUEJf j/bTXhGwKrc/SQXDfLwLL6p2nrfmqmnxwsuHpEZJ+8zSQbyCKVkvC+5l5pT25Vs3 wr4cvGJFmM8Lftd0NV0EkRGn9zSosvz5n8UAAMeGkz7hY6EPfT2FibZ7Yr9poDHW 8GNKMa5bDDVyjA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 11:29:18 -0400 (EDT) From: Maxime Ripard To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Daniel Vetter , David Airlie Cc: linux-rpi-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Maxime Ripard , Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, Emma Anholt , Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley Subject: [PATCH v8 06/10] drm/vc4: crtc: Add some logging Date: Mon, 25 Oct 2021 17:28:59 +0200 Message-Id: <20211025152903.1088803-7-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211025152903.1088803-1-maxime@cerno.tech> References: <20211025152903.1088803-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 fbc1d4638650..6decaa12a078 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -541,6 +541,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. */ @@ -572,6 +575,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