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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 14400C433EF for ; Tue, 18 Jan 2022 23:08:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F385E10E13F; Tue, 18 Jan 2022 23:08:42 +0000 (UTC) X-Greylist: delayed 553 seconds by postgrey-1.36 at gabe; Tue, 18 Jan 2022 23:08:42 UTC Received: from smtp1.de.opalstack.com (smtp1.de.opalstack.com [46.165.236.26]) by gabe.freedesktop.org (Postfix) with ESMTPS id 642AB10E13F for ; Tue, 18 Jan 2022 23:08:42 +0000 (UTC) Received: from jason.localnet (host-37-191-188-128.lynet.no [37.191.188.128]) by smtp1.de.opalstack.com (Postfix) with ESMTPSA id 24E1B593FC; Tue, 18 Jan 2022 22:59:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boddie.org.uk; s=dkim; t=1642546765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OOVlv/895Cebypr4G3MxXQflLLnN34ToMNqXW8Yvtu4=; b=IU9Vv87stEBejoLadt2aTX/kD1TsEg7j1vf63Iun7KeiXtNCHC6/LvZErHyM98YoJV593U xPSij+9Ax1Ojkt3VgRblYokixJRErMhFAW/Ctd5p8PDnCUGC7b9cgPzF4Rjz4ZbmsCAlQ9 D3erC4NT1RF0ebfJuoFOJVh53BKUKF8= From: Paul Boddie To: Paul Cercueil Subject: Re: [PATCH v5 2/7] drm/ingenic: Add support for JZ4780 and HDMI output Date: Tue, 18 Jan 2022 23:59:19 +0100 Message-ID: <13356060.GkHXLIg068@jason> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , , Geert Uytterhoeven , Neil Armstrong , David Airlie , "H. Nikolaus Schaller" , dri-devel , linux-mips , Andrzej Hajda , Laurent Pinchart , Miquel Raynal , Sam Ravnborg , "Eric W. Biederman" , Jernej Skrabec , n.com@freedesktop.org, OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS , Kees Cook , Jonas Karlman , Liam Girdwood , Mark Brown , Maxime Ripard , Discussions about the Letux Kernel , Thomas Bogendoerfer , linux-kernel , Robert Foss , Rob Herring , Hans Verkuil Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tuesday, 18 January 2022 17:58:58 CET Paul Cercueil wrote: > > Not at all. If the clock is disabled, the LCD controller is disabled, > so all the registers read zero, this makes sense. You can only read the > registers when the clock is enabled. On some SoCs, reading disabled > registers can even cause a complete lockup. My concern was that something might be accessing the registers before the clock had been enabled. It seems unlikely, given that the clock is enabled in the bind function, and I would have thought that nothing would invoke the different driver operations ("funcs") until bind has been called, nor should anything called from within bind itself be accessing registers. > Why is this JZ_LCD_OSDC_ALPHAEN bit needed now? I remember it working > fine last time I tried, and now I indeed get a black screen unless this > bit is set. The PM doesn't make it obvious that the bit is required, > but that wouldn't be surprising. It isn't actually needed. If the DMA descriptors are set up appropriately, the OSD alpha bit seems to be set as a consequence. In my non-Linux testing environment I don't even set any OSD registers explicitly, but the OSD alpha and enable flags become set when the display is active. Paul