Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp451065pxb; Mon, 25 Oct 2021 11:27:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze+BhuTfcJhFLwIE6uK7S40egI9yKwThhWGsqwHr0kWSsmotSnXTrMegizYYU14pSeLH0t X-Received: by 2002:a63:3c1e:: with SMTP id j30mr7604530pga.344.1635186448501; Mon, 25 Oct 2021 11:27:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635186448; cv=none; d=google.com; s=arc-20160816; b=SBf/ty93xFZFGLiEbdKgRi3DXiJxH9xwMRvXXLks2+altquZCbUjsEgZEqH+caaMcD 3Hv6IDTc0yyJZAu5zHlDhQHTWLsYiuMRII/Lw7dvYWWHldH9MwJ2kdHTtK+O9Ek6XyPV AFpuN55G4f1i6KyHWUJGigyL7nvCBmObv1oIqz/V8exKQMIy5CRvc4M2HPbSDGbEt7qd hwJcf0am5TUH0NEGzgnlM1MJ7pP4zZ5KxFqn8ECXbsfV7QyqEXKMgymNzuW+ui5ga92+ x3DsdB4d9+V1w/NWTMxq1RFRt7uVAIRFAtF/kFPUE8YEqPZIbgE/a3EpbzWod+uEqnyX 1S1w== 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=gYhQ9oCsB05plFUpCTREx74kNatGeb6G22laLivtnjs=; b=gy3BD1/yY+A7kU9vt8Ng0GGA01lg+5/I8lwgpdoU/ofXN07fygTceAZfEU1zq99OMS oX98RY32qk68X4q9YDP+tgU4MA358ju6eNST7TJjtdtJsg0v8G0h2zmV9z5xksVDBtIc Zlh5gyEZm84EVgvEpbJSXeVBejDEc/I3BFF3yRhmCafWwS4Ke7ghiIZ/uwPFap9U5+1c cGh/1f6f4ow0kVDr5IYlDimdtcdf+fKG00/PM1bUKoVZY8WZnkWSh0+bka7y+nbRfumV Y8nIouECSzgQdr9RqDJnuT1PC89IzQC1LBv7s/Lii+Sfo8EtEAGNvSsuzFBUaidrwNJT 8SAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm1 header.b=cdl26uo8; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=loxIZyBy; 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 h12si23501788pgs.444.2021.10.25.11.27.12; Mon, 25 Oct 2021 11:27:28 -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=cdl26uo8; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=loxIZyBy; 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 S234015AbhJYPcH (ORCPT + 99 others); Mon, 25 Oct 2021 11:32:07 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:39277 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233902AbhJYPbt (ORCPT ); Mon, 25 Oct 2021 11:31:49 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 7A4515806D7; Mon, 25 Oct 2021 11:29:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 25 Oct 2021 11:29:26 -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=gYhQ9oCsB05pl FUpCTREx74kNatGeb6G22laLivtnjs=; b=cdl26uo8nbfTq7/wLvp7aL2+rn5DT uYmBHRRjHNzB1LXLW9Y7dJxmxpRrjfYn6zScW4FKLwoASuHUEY6oKSWhpD9G5Fcy Yr+MZsIwE4ZeyXmE4A1X2wcrxG8u2OQZsOlDlYZ12cTvam56vokSKWK4+5DtdbM9 LuRPeOz5s292RGOJmXKE63OQ0v75ybKlH1Hc0Pywdz+XzdESChZX/Zv61mIz9Nz+ 7y/4r01h2hyJNGzXwJRPy0OQQnweA6vh1kQvv4tNvQa009yPd8CHKaYGdFiKtmcG +SCB9iRktAnLQQJ/NcUpT35TG8mFaVgUgDZiQWJ8N1Tee3/CeMaZWJgbg== 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=gYhQ9oCsB05plFUpCTREx74kNatGeb6G22laLivtnjs=; b=loxIZyBy pwg+citTbPBq61isf7XMj/OcBsEBRKPZ45i8CIqGDrDKyeRP7JiWFou/1P2E0SSO t3gV+ZuZRZnsRy/Xu6sPmVuSod0ETadIxcAmFbCLPO19j/tEsJcYBc0r+qZHqUUL mjap40VxLDf+0o6qzgjtUAgng8d+B2IQPYFo7V8x4EveghMf6p+PxtGDvI7Y9NDg jK9V61TsonNhqK3Fh0ZcOFUBFGRwwX/HbOAFzp9fksm9KCvdjcHNiNY/zvXo5MGr n94zC6vc0I6UosFfRSfwxCllblrFSF4HZ+It76oEOTs3gFwmT0+h65vFYEsDvA+8 5GqQL9/J68tUBw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 11:29:25 -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 09/10] drm/vc4: hdmi: Enable the scrambler on reconnection Date: Mon, 25 Oct 2021 17:29:02 +0200 Message-Id: <20211025152903.1088803-10-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 If we have a state already and disconnect/reconnect the display, the SCDC messages won't be sent again since we didn't go through a disable / enable cycle. In order to fix this, let's call the vc4_hdmi_enable_scrambling function in the detect callback if there is a mode and it needs the scrambler to be enabled. Fixes: c85695a2016e ("drm/vc4: hdmi: Enable the scrambler") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index d36b3b6ebed1..fab9b93e1b84 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -180,6 +180,8 @@ static void vc4_hdmi_cec_update_clk_div(struct vc4_hdmi *vc4_hdmi) static void vc4_hdmi_cec_update_clk_div(struct vc4_hdmi *vc4_hdmi) {} #endif +static void vc4_hdmi_enable_scrambling(struct drm_encoder *encoder); + static enum drm_connector_status vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) { @@ -216,6 +218,7 @@ vc4_hdmi_connector_detect(struct drm_connector *connector, bool force) } } + vc4_hdmi_enable_scrambling(&vc4_hdmi->encoder.base.base); pm_runtime_put(&vc4_hdmi->pdev->dev); mutex_unlock(&vc4_hdmi->mutex); return connector_status_connected; -- 2.31.1