Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4450806pxb; Tue, 2 Nov 2021 09:56:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXQfXqD82DopPGSnXfnjKJHkBh1YPEi6nCQoQOokUjZakRG/HHkuD2lTTmrYp6oPHmDOMn X-Received: by 2002:a50:d841:: with SMTP id v1mr52190510edj.221.1635872163689; Tue, 02 Nov 2021 09:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635872163; cv=none; d=google.com; s=arc-20160816; b=ACQBnqfXK5vFfOL6MpRqlbCal1iJOsGrZDibI35H0k7GCb+LSnFZydd9J21Rd9rnbC ItPtghUv6AjguuedBsSWqC7c0jY7oF1ALomK7er1YpAblFnJNTej7ohC+W+F29YjJ9dz xaliqMpLor3vuttbTiyBDsMsecdAZhizO5yLcoNlkoXNnpCmEKmy727hvP81xWDEYzBz brU8Zz2IvGgObLQm8K7YivSpXhHPK6X6YEbzkAbzbyycufczLglOSBUI4LJCjxYKnvC5 a98BAQD5wVRb3d3lvBdNKJX9ptOg+C99sJo7FMCkSNwInIFImjJOyknanrNqRYF6Two+ 6S1A== 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=A0Gv/QN2qKt1UUPbNJBs29OCuwlLk5Iawd0kmAyppIA=; b=lL5XYqgwTtYvZH12toNjmx3XjMdO7FUw1Y1RDDKRoiXdYmd9+wTOleO+/f2a3QlDtA s2xBKa1+QdyBEok8LJoQHWglLJKDdtJ2+2aAWM6xhU2rz5XfqB6oPjkkVin/O9AA8LGd Gld65Ve1UO7fICsjgZ7BN6mDhxw2crrJtQuqgTBeyaclHwgl3koYpBlc1j/oCQm+pX70 qDJgaqEULroNd4zYy8Qlp48l1fqseHyc+AErG1pAUT6HxSKCtUmxQoK3VHFFj2spCMBd lI1lT4QCqlK3jT+CaQCruRAaF/hvNyFax5eFsndCKp1Ftrho6+DQNbhT4kVCaQ4FJd4y IvIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=h8aMBSgC; 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 p23si28876162edw.135.2021.11.02.09.55.37; Tue, 02 Nov 2021 09:56:03 -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=h8aMBSgC; 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 S230344AbhKBQ4T (ORCPT + 99 others); Tue, 2 Nov 2021 12:56:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235026AbhKBQ4E (ORCPT ); Tue, 2 Nov 2021 12:56:04 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A223C0613F5 for ; Tue, 2 Nov 2021 09:52:08 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id b2-20020a1c8002000000b0032fb900951eso2480766wmd.4 for ; Tue, 02 Nov 2021 09:52:08 -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=A0Gv/QN2qKt1UUPbNJBs29OCuwlLk5Iawd0kmAyppIA=; b=h8aMBSgC270p3YyYgpwd9zWqS4OtdEsHQZvdJaLWV40vD/w3SBChTEGVptLs4VFMcV F+m0yWAxAiUwVV61X7q/i5Unb16+/SPQ06goMnbo0rqkGD+hNXgrCr40eqc0eyCriHWQ vVcCZrnStQNxzF0Vk8mGFtQ5go+gzkRcRs9mbuG1d9X6dTQTvvMLv1WlRaKMnOXQyn8s +lCoJMOgq1G2+PNrnXXiToV8q+ew4tPM6QgDTNohpD2dn4A/Z3Ze8FR7X5yRuAM5qkHo arzRyFiTo2RFka7YS6ianmQPTC7B19SphNKM4HC3fK6Tlykb1zjzHE5J9pgr3HSDpMRL o7fA== 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=A0Gv/QN2qKt1UUPbNJBs29OCuwlLk5Iawd0kmAyppIA=; b=aN37+2UsgnwBjdDpi+MWuLDBixy+Dr409LIu8xtvT4TJut2yCOIXlIub9Pxpg0I+aq YhKvF7CK2gUhMEoO3sP0r76pUC1SHKEoMvc9aIAVLGfjUFZ04TDhyBMy+LoJFIkViTLz 6Seay+sJyiumtIWbegqcsK+VRBPV0EC9gxmIcl851I6o3EkrFwE3ssthahDDqTcfFPk6 ZugeMDI4NjRNhnvj4Wvzy5YlSpwDfsTXq7CQdzygYeLvDk2FT5H1gA5uHBBehCv3b/o2 YeXZOIk+qtIpzoqUtzU28RJ8FlLPb9aH3dBz21HTVDw7Q3LQcQMyIUOEVgQyhERcUVZ3 k++g== X-Gm-Message-State: AOAM533E8e8Nmq18yhHFI1a29E83W2k3scZhyXQiFtn4tg/MiaPWuy92 J/cxm4u37if+hoPjz0RJLTixkkunPrYvsEhjV9Qpwg== X-Received: by 2002:a1c:4e04:: with SMTP id g4mr8145187wmh.15.1635871926869; Tue, 02 Nov 2021 09:52:06 -0700 (PDT) MIME-Version: 1.0 References: <20211025152903.1088803-1-maxime@cerno.tech> <20211025152903.1088803-10-maxime@cerno.tech> In-Reply-To: <20211025152903.1088803-10-maxime@cerno.tech> From: Dave Stevenson Date: Tue, 2 Nov 2021 16:51:50 +0000 Message-ID: Subject: Re: [PATCH v8 09/10] drm/vc4: hdmi: Enable the scrambler on reconnection 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: > > 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 Reviewed-by: Dave Stevenson > --- > 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 >