Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp374428ybg; Tue, 28 Jul 2020 08:11:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWr4fd4KxFJ9KjOStNlcZzw2ircQxANfm72z9m4Bg4unUafi6SSp6QJmbRl2haFMML3hth X-Received: by 2002:a17:906:8417:: with SMTP id n23mr25325165ejx.192.1595949100988; Tue, 28 Jul 2020 08:11:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595949100; cv=none; d=google.com; s=arc-20160816; b=WkQjTZ4fzXZioHizrWSftGCTlOBmCeKU4TZM3m3Pb0D2IbucJJgadccOwFR3NP1uyu YlzWzvSwvvSnNvzQV4kPJkFPz2A3PGzkWzYMqYFIRYEdlmegW5nTEYrK+l0ztBu6mKVL 6w8p/1sZOkJO8OycK4amq55vkv2Wfvb33Cgnl5nThVFJS9SiAVpnOdV/x+TG6qMRrCsb /qmhfe7uhhAlcJPYBM9hKT1VnIjSWPzbCOolwe/Bpj7ThMuVOUFqWLbNmaZqYq+DpUIp POKogU4Cal1WHgchMqLVHD40DhZ0XInK6er7OkoWgLCvdZsorOes56JtEaCdqRMOCYe5 BExw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yoaV8EiIxu54dsFIyU0qdvYTV9Nos1kcoN3M/Zvq+Z8=; b=JfE9H1oCTzx7NISKTEq+hO1qhqiarJm2Wex/pI2qnDicDcMEieoi1TLCFGPMH2rq7z FEs8vjGMbOBODyRn+/YS/IURURlIdcPxLVCUSvybLfosCY/i/DyTvLXf7GU1caSmUZLk OB99W4OMfzFAEmBk5MkoPv4G7kqSXihb72yz8fpWu4brONhonhSc+cVT4llQ0uLinDMH 6LNK5wGwjm+1BBgCiDJLs0otzLgoMjRklBm+KAnU7HbO4Fe3x/mHCab7Z7zHx/Tb8PlJ Yc8J3REmjHDdccgtAyth1hCkgMn4t00cRy913B9ze/FRZTtPvq2a+B4oD8iSOyH3pF1p wkEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=oPm1eOTK; 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 lv11si7340994ejb.106.2020.07.28.08.11.09; Tue, 28 Jul 2020 08:11:40 -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=oPm1eOTK; 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 S1730618AbgG1PKQ (ORCPT + 99 others); Tue, 28 Jul 2020 11:10:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730556AbgG1PKP (ORCPT ); Tue, 28 Jul 2020 11:10:15 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A80E2C061794 for ; Tue, 28 Jul 2020 08:10:13 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id c80so17646887wme.0 for ; Tue, 28 Jul 2020 08:10:13 -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=yoaV8EiIxu54dsFIyU0qdvYTV9Nos1kcoN3M/Zvq+Z8=; b=oPm1eOTKzWnAqS5MU6mSlSrX5N1BhOrhoJz8NsUIH4WoueF1QeJdRlXIuDeIbPw/1R V15xq8XH1hmSvtP0/JmCEw5PGrzsLToKzbXYE3dqAOl5/0jb4MRPaAmQ2ORdHUcFbdHe DZX1uNWDKlhEcmvzcQSlxOCnTj8r9QfxvxERm16MIn9heQtAUFMpazXta1UyzxhN3rw4 GalYPH8T1XcfqzmBhftP+J0AndZznl0EcTSLLYD4CA7Y3d81IR4gydyEthoR35CLjy7b BGMasywv/e+ePgnSYZRv57hCaFXKWZv94DjQpOPAP68dc2zYGp2aQQBXrhA/Qv3X11qR 55Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yoaV8EiIxu54dsFIyU0qdvYTV9Nos1kcoN3M/Zvq+Z8=; b=CQBaN+trp2I2A/LpOQhfhSzAzw/Z5qRZ1NhowU45Zn6fV4ulM9rd2ESpJ11Oa1tsOp SXOVmEDUGl061mCuvW21SEqL2G7TRGLKDcvXQQ2XhH7JC2pV+Umh3o5sDmUGzNEIvz95 70F+XihKKvUG/PBExwyxOPOThupgvoJ3BF0lJSnTMOc4/ZqBPkwPXpEWSOs87hagAqhn 32kK0WzADojlXO3V1A5/KkIb5Zwrmirvw4Xznfz7j69vSyS7CNktqFc28f+6s5grU7gl rv/IfzhBPPyvSRtyZAUSA6VXQNEezS4ddEsFrLJlQQ5TSWCzj4xdM0ZWSRYW+e/vIagZ JmBg== X-Gm-Message-State: AOAM530AfPCqUogaU0yXkoHXdVeWCmN78JhTfIFMbPUXRdvNEMVNduuj RQOqCBVBAIf3+wN1uQTHBmXHqqBApJ+wp7c7LlstfQ== X-Received: by 2002:a7b:cf18:: with SMTP id l24mr4420427wmg.116.1595949012379; Tue, 28 Jul 2020 08:10:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Stevenson Date: Tue, 28 Jul 2020 16:09:54 +0100 Message-ID: Subject: Re: [PATCH v4 73/78] drm/vc4: hdmi: Switch to blank pixels when disabled To: Maxime Ripard Cc: Nicolas Saenz Julienne , Eric Anholt , DRI Development , linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, LKML , Tim Gover , Phil Elwell Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime On Wed, 8 Jul 2020 at 18:44, Maxime Ripard wrote: > > In order to avoid pixels getting stuck in an unflushable FIFO, we need when > we disable the HDMI controller to switch away from getting our pixels from > the pixelvalve and instead use blank pixels, and switch back to the > pixelvalve when we enable the HDMI controller. > > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 9 +++++++++ > drivers/gpu/drm/vc4/vc4_regs.h | 3 +++ > 2 files changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > index f56a718a3643..37463b016b47 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -325,6 +325,12 @@ static void vc4_hdmi_encoder_post_crtc_disable(struct drm_encoder *encoder) > struct vc4_hdmi *vc4_hdmi = encoder_to_vc4_hdmi(encoder); > > HDMI_WRITE(HDMI_RAM_PACKET_CONFIG, 0); > + > + HDMI_WRITE(HDMI_VID_CTL, HDMI_READ(HDMI_VID_CTL) | > + VC4_HD_VID_CTL_CLRRGB | VC4_HD_VID_CTL_CLRSYNC); > + > + HDMI_WRITE(HDMI_VID_CTL, > + HDMI_READ(HDMI_VID_CTL) | VC4_HD_VID_CTL_BLANKPIX); > } > > static void vc4_hdmi_encoder_post_crtc_powerdown(struct drm_encoder *encoder) > @@ -563,6 +569,9 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder) > (vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) | > (hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW)); > > + HDMI_WRITE(HDMI_VID_CTL, > + HDMI_READ(HDMI_VID_CTL) & ~VC4_HD_VID_CTL_BLANKPIX); > + > if (vc4_encoder->hdmi_monitor) { > HDMI_WRITE(HDMI_SCHEDULER_CONTROL, > HDMI_READ(HDMI_SCHEDULER_CONTROL) | > diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h > index d1e8961edaa0..30af52b406f1 100644 > --- a/drivers/gpu/drm/vc4/vc4_regs.h > +++ b/drivers/gpu/drm/vc4/vc4_regs.h > @@ -723,6 +723,9 @@ > # define VC4_HD_VID_CTL_FRAME_COUNTER_RESET BIT(29) > # define VC4_HD_VID_CTL_VSYNC_LOW BIT(28) > # define VC4_HD_VID_CTL_HSYNC_LOW BIT(27) > +# define VC4_HD_VID_CTL_CLRSYNC BIT(24) > +# define VC4_HD_VID_CTL_CLRRGB BIT(23) > +# define VC4_HD_VID_CTL_BLANKPIX BIT(18) > > # define VC4_HD_CSC_CTL_ORDER_MASK VC4_MASK(7, 5) > # define VC4_HD_CSC_CTL_ORDER_SHIFT 5 > -- > git-series 0.9.1