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,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 AF5C1C11F66 for ; Tue, 29 Jun 2021 12:57:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9456861DEF for ; Tue, 29 Jun 2021 12:57:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233700AbhF2NAP (ORCPT ); Tue, 29 Jun 2021 09:00:15 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:39283 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232976AbhF2NAL (ORCPT ); Tue, 29 Jun 2021 09:00:11 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id BBB4858042E; Tue, 29 Jun 2021 08:57:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 29 Jun 2021 08:57:43 -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=8b4rI7H3LEGAz Zdj8qtTTwwQEqbOukcatoXp5Tb/9DA=; b=V2mTBl4+o1b4ZeIJN1hBzJVG5D6UA VUyVqjxYC6xW2BEXagamq0HgRrhO/lrr/qKET12D1KrXG93UQw+L/BeiKF8B90xR wLNB9Turo+j+VWjPpYNQVoI6XxaOcLdENk1Gl1kpDS90q138RoouYgShW1+1GYDg SOXTdyu9Gyx9at7ErCt/ZBkHSGNQMvY5ya0WNlLYsWkLhPftweb25paHNFt4ulp/ DuiwwwjCNmdt2jHj3TiU64jx5na/gDW+8LXHSZfWPL+TfMxnC1eTFyPwHPMKdquf MdQKa1mZTWTIGqgRQnEENxQXHSC1USlZvIyHwToWeSRD9y3qQ3cRTv4GQ== 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=8b4rI7H3LEGAzZdj8qtTTwwQEqbOukcatoXp5Tb/9DA=; b=aAQ7Yf83 aDu1zNNYD7RT99hvah3eGsw8I8/7R9qYEiGK3jDU5XIj6lSRg8DQHxmz3yH1hit4 GDIZ6ck7rUeqzs+dXZz+CNAr8SKyn6HJGs1dyKoIv8LgaQAqL9GPV42vJw8N/6Jl X2tnzigtuEKVLe83ywQe4vA+vskG/0opV4avo08mqIAu9qnvY1BpOY6sGkybNmcP ZPDGOhAmjxgEXsqK0uVoUCw53Pai2QwRfz/Xog10VbNEc4fKO7AsOrIUspLdwk6v 57yGsYuXaxZHwOLA7udcPIf9cSVwB6MiOyR1iCb+h6k6SI6XwRguPxq7yAMgsNZi 5lNkukWd4O1DbQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeitddgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Jun 2021 08:57:42 -0400 (EDT) From: Maxime Ripard To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Cc: linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Boris Brezillon , Emma Anholt , Maxime Ripard , Dave Stevenson , Hans Verkuil , Nicolas Saenz Julienne , Phil Elwell , Tim Gover , Dom Cobley , linux-rpi-kernel@lists.infradead.org Subject: [PATCH 1/4] drm/vc4: hdmi: Mark the device as active if running Date: Tue, 29 Jun 2021 14:57:33 +0200 Message-Id: <20210629125736.414467-2-maxime@cerno.tech> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210629125736.414467-1-maxime@cerno.tech> References: <20210629125736.414467-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If we detect the device as running we make sure we get the reference count right for clocks, but we don't do as such for the runtime PM count, let's call pm_runtime_enable to make sure it's accurate. Fixes: 5b0060004236 ("drm/vc4: hdmi: Prevent clock unbalance") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index aab1b36ceb3c..707fe43ffeea 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -2182,6 +2182,7 @@ static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data) if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") || of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) && HDMI_READ(HDMI_VID_CTL) & VC4_HD_VID_CTL_ENABLE) { + pm_runtime_set_active(dev); clk_prepare_enable(vc4_hdmi->pixel_clock); clk_prepare_enable(vc4_hdmi->hsm_clock); clk_prepare_enable(vc4_hdmi->pixel_bvb_clock); -- 2.31.1