From patchwork Fri Jun 28 18:52:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Watts X-Patchwork-Id: 13716532 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D86F3C2BD09 for ; Fri, 28 Jun 2024 18:53:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ol5vZWmzYCAtuPZvkV2jmiAnvzmCMXUkEioC5JggsN8=; b=jXxP5hqMzS6OQFEiHFOPMHQIvV Lh+A6m/BHCRGVWE7P2R7IqkrM8gZ4a4vDHM826HfxMjHT3UtTTgT9fWp5RkUOCmit78qQfBM5wKez OdBBi7Yy/H/qrK/kiRP18okqrOFDl2M1m4H5KXTWpgefuSe+kzGc39KcTiSFZt7PIay0DeTp41Lzb EPQSjnJClsuF8HAjklT1+p2ALBZA8Ohwf4DbnzmOGGpMX6T8kcgNfkiNuyDSfr2OjkgScoftpEl2U 2y5XmAWMmPUcg17NIWH/hxiDuTWMEBcJDMdFXCGGRDE4GnSxNDm/gcjCaebgQ0JNagEj75adyDh0L k8LqiTNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNGiw-0000000EgBM-0Nyp; Fri, 28 Jun 2024 18:53:30 +0000 Received: from out-173.mta0.migadu.com ([2001:41d0:1004:224b::ad]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sNGil-0000000Eg7c-31nx for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 18:53:21 +0000 X-Envelope-To: linux-sunxi@lists.linux.dev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jookia.org; s=key1; t=1719600790; 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; bh=ol5vZWmzYCAtuPZvkV2jmiAnvzmCMXUkEioC5JggsN8=; b=gPiB1B86mnE70dlWle33ELiZCWlxK3uL2NGuS12wTJoFk7DW0qoHRufvn35raPdcC/ENqk LmdRP691WwONfx8wP5voen+IpJ2/Shes1KRp4fgZ7KPwi54GhJWvtcr+5C/KxQqPbVg6/3 Bz5NwyO2tK7cNeZy+c4hHcTxkHniTncvX+LPMtS2/SaaLGxIB1/SaWmL4NVJgJnJ1Bf6uR 5V1DTFASS2eJ5KmXvAedPdJNuY+QGx2W/Wo9sqsuGRVqboK2rNeHdZUQEBes/KoIP01t8T L0dP3ZUHcUEcjQsoqfrIWcpPkS2smu5X4g9GigCbZ7V7KUSMai8RH3DWAvc8qg== X-Envelope-To: andre.przywara@arm.com X-Envelope-To: jakobl.gm.g@gmail.com X-Envelope-To: kirby.nankivell@gmail.com X-Envelope-To: contact@paulk.fr X-Envelope-To: mripard@kernel.org X-Envelope-To: wens@csie.org X-Envelope-To: jernej.skrabec@gmail.com X-Envelope-To: maarten.lankhorst@linux.intel.com X-Envelope-To: tzimmermann@suse.de X-Envelope-To: airlied@gmail.com X-Envelope-To: daniel@ffwll.ch X-Envelope-To: samuel@sholland.org X-Envelope-To: dri-devel@lists.freedesktop.org X-Envelope-To: linux-arm-kernel@lists.infradead.org X-Envelope-To: linux-kernel@vger.kernel.org Date: Sat, 29 Jun 2024 04:52:06 +1000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: John Watts To: linux-sunxi@lists.linux.dev Cc: andre.przywara@arm.com, Jakob L , "K. James" , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Samuel Holland , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: T113 TCON Top tinting troubleshooting Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240628_115320_199391_C8542AA2 X-CRM114-Status: GOOD ( 16.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, On the T113 (and most likely the D1) sometimes the RGB LCD output has strange artifacts such as: - A blue tint - A mostly opaque green tint - A red tint - A pink tint The actual tint seems to differ between boards or chips, and has some probability of showing up that can range from 50% to 90%. After a week or so of troubleshooting I've managed to figure out what's happening here, and I'm not too sure how to fix it. It appears that the TCON Top on this chip can't mux both mixers to a shared output. The R40 (and H6?) allows this and prioritizes the DE0 when muxing, but on the T113 it seems to cause graphical artifacts. Disabling DE1 in the device tree can help but doesn't solve the problem entirely. Here's a change that tests this behaviour, it sets DE1 to output to TVE0. DE0 then outputs to LCD0 as usual. I would appreciate if anyone with this issue can test the above workaround on their boards. There was a previous discussion here: https://groups.google.com/g/linux-sunxi/c/HxDBpY5HbbQ/m/mX2O2OYlCwAJ ---8<--- CUT HERE ---8<--- ---8<--- CUT HERE ---8<--- The sunxi display code works around this issue by ensuring DE0 and DE1 never map to the same output: If you have DE0 set to TVE0 and DE1 set to LCD0, then tell it to set DE0 to LCD0, it will silently swap TVE0 on to DE1. I'm probably going to send a patch that copies this behaviour as it should just work, but I'd be interested to see if there's anything I'm missing. John. --- a/drivers/gpu/drm/sun4i/sun8i_tcon_top.c +++ b/drivers/gpu/drm/sun4i/sun8i_tcon_top.c @@ -179,7 +179,7 @@ static int sun8i_tcon_top_bind(struct device *dev, struct device *master, * At least on H6, some registers have some bits set by default * which may cause issues. Clear them here. */ - writel(0, regs + TCON_TOP_PORT_SEL_REG); + writel(0x20, regs + TCON_TOP_PORT_SEL_REG); writel(0, regs + TCON_TOP_GATE_SRC_REG); /*