Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4441754pxb; Tue, 2 Nov 2021 09:46:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE1ogXl4RN5duWitYpUpXFIEH/69AUcAkQ47cBOswT33zFZ7+WD+z1EjREXJtJYmuT4CyU X-Received: by 2002:a05:6e02:1d84:: with SMTP id h4mr24599349ila.265.1635871604574; Tue, 02 Nov 2021 09:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635871604; cv=none; d=google.com; s=arc-20160816; b=s3UXKau/GqSQGV9YiDMV+u72qFREcQ+f+kdqyw9Ed28y1VpEoHFQLSwOJrVKqruFdU a1RtVfq6yw4BANltOKM7K2c+zyZ5fvPvrQKod3NvJykXV0WUfiW6N8KsiAaPD9ra5rOn f+5LbS9VR37PXRLz3itNChkB/w/BEbQLXTeE6MbAK3SnE/Y0/4CSQUHp2FWQHn3FPj8n E+bO+mcO78aX9R5lBlTQdqm1Qq2+oNDwoE32k8PqCFSO3cYbtT7k+wSZaBkOQLUlVA/i A1TLHmLi7ZbrKHBXc8DApopQTLNh28EtmYXd678RzCp2lR3ltfDRcaL1n4jXWrkPuBNV h29A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=LAvIC90H2Q09upFWDw++dDK4c8sFoQjuntZhnvDGSjc=; b=GzgAiDDk7MI+wrfMSvoyR3yhIby5OGT0a/Yn4erJg2bBOjgWOB6xnu3RlI9AkpGSk+ 2QYkVI2TqmHa4MjHO1xc4DX/42cuTdxz9fRHSW0U0iCgR/kIZVGokbyLAMArNwZYxC8C vpKs44sy/yNw8gI5QlrI72a9rdCiwSiks3NLpEBP42I1v3iahpvVb6tH1mx1wS280WvD aH1CgEr/538caD6L729CZZgFPO1SRB/eVmnjTIi/IMlFdy1JAKLzKfwqobP/CCmPo8Xd 37shPddx6tAho++PMKTJGIsPP0VdoVYUEf3zDzwdNLGH2RqzTWLVz3FuUapl/3sa8svZ GRFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=c0mbANBt; 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=raspberrypi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si3564172ilu.49.2021.11.02.09.46.31; Tue, 02 Nov 2021 09:46:44 -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=@raspberrypi.com header.s=google header.b=c0mbANBt; 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=raspberrypi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234929AbhKBQqz (ORCPT + 99 others); Tue, 2 Nov 2021 12:46:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234662AbhKBQqs (ORCPT ); Tue, 2 Nov 2021 12:46:48 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27FF7C0432ED for ; Tue, 2 Nov 2021 09:33:32 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id d3so34197069wrh.8 for ; Tue, 02 Nov 2021 09:33:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LAvIC90H2Q09upFWDw++dDK4c8sFoQjuntZhnvDGSjc=; b=c0mbANBt9R9oj2N98L18a2I8SDKA/gipnKrWs4hd1qLDydb9Sm8p0Tcn6pVUrcNZYS 0YO3WLlDbYN9LkPXt9oDJl6yHVNsRc/ZsbJO9SKBnFILFlOP3mGcsfylFiqzMlw2UqnT YK29EU54tvJhS6nmvqPUWmde/+VU0IeseY5lGZcxiujlOLNV4AjDG5pzVCa0ln+/aCSm dC2PM5dknbACWIF0UteQJKH32XlB45eSytkJNuBTEBSSscH8Ui1Aoi/AbUA/acW/jYmG dItZ9cExxmcMcfe+F9ZlzG16Fvcdwy5icX9D78B+l+EgvI0PHndwL0Ww0EwxWl26H6Oi Ziag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LAvIC90H2Q09upFWDw++dDK4c8sFoQjuntZhnvDGSjc=; b=BNex0n5/CHIif7KHLGHH+tspd9XaHuhWr+pSPPrFgzq9V9cvanuz8sPOlaW850XgJj n9jWY4V31PuRi+JPQx0EGPhsnODIjIQmIuHH6Zsh3aX9NdyuroeZRiRUsH5+0p0vhnLc bZIeDZj4f3jPxUyPBzQvsQxWImDD//xWJBQhdQqN5WKlfYFDPMxGCr17dt1XEGWPqQ9H d+SXnPP6B9dUsZXk4IHkFZ46BjFMt2kWhab4uNGF9j/6msWGMLMaxN8VPC4k2xHmSGrR 1hXcTZf+GSu2tT2pKUTI6nv5wmj7rHVWfp9cv1FOoYXBE25WQEk1233JTAO//BNEIW0U f7nA== X-Gm-Message-State: AOAM530/oDCWwV+3yIudoQLvp7zhrduTKiVwww+TZZDuAlMLckurOTA1 mZj4On53BHRD71TjanzhRv3Ir2D8C/jUJau/TSI+KQ== X-Received: by 2002:adf:a143:: with SMTP id r3mr48509272wrr.8.1635870810754; Tue, 02 Nov 2021 09:33:30 -0700 (PDT) MIME-Version: 1.0 References: <20211025152903.1088803-1-maxime@cerno.tech> <20211025152903.1088803-7-maxime@cerno.tech> In-Reply-To: <20211025152903.1088803-7-maxime@cerno.tech> From: Dave Stevenson Date: Tue, 2 Nov 2021 16:33:14 +0000 Message-ID: Subject: Re: [PATCH v8 06/10] drm/vc4: crtc: Add some logging To: Maxime Ripard Cc: DRI Development , Maarten Lankhorst , Thomas Zimmermann , Daniel Vetter , David Airlie , linux-rpi-kernel@lists.infradead.org, LKML , Maxime Ripard , Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, Emma Anholt , Phil Elwell , Tim Gover , Dom Cobley Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 25 Oct 2021 at 16:29, Maxime Ripard wrote: > > 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 Reviewed-by: Dave Stevenson > --- > 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 >