From patchwork Thu Dec 7 14:16:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 175166 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4812806vqy; Thu, 7 Dec 2023 06:19:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzsLdiecz0D/rScdffKXPbYze2+al3e5YZkpjZOhNxbbX5t5aEu+yY8IXC5pcVZYYhdvWg X-Received: by 2002:a05:6a20:9410:b0:18f:97c:9298 with SMTP id hl16-20020a056a20941000b0018f097c9298mr1866798pzb.125.1701958768919; Thu, 07 Dec 2023 06:19:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958768; cv=none; d=google.com; s=arc-20160816; b=fmJPKxW2iQDVvZHJdBZYQw7uapXyyh8aaYoiVVVYfGVSODZIX7hWQdEzHGnf2PTkG3 /pl4OQvEyct2ecIESw4niWNTnCE/h8epCBJmnpIog9z8A+2M3gdNU/eCA7BwId6jVHLN B3Pp89PkqMrJOEDDqWRs4XIau1P54NJfYJWZXTZbfvSjgFQMnXKXwqYhlxJw94tiElVr AbxkmABI4H319lvjAEewgmFdJ2rkNl1DR3CXuM88tG0z3+L+TcEIb02g10aENBlilEwu KNg7D5zyWHCaOnt9HG791ju2gx6JRI1mce2Xs3skxSu958xojAiowBl6mFGcA5r0TFgV neug== 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; bh=9yGi3UQjgH7vKIKdKQCwE11iHS9JPf1l9kS7cSUyqbg=; fh=yrurfj0wqsNBtuv2/DS7hXM5gjUdNl0RGba7zZuGnHQ=; b=tXAnYOFEAW7N86GPmH6+GeXOmDtwOVWksdS7LXrlILC1z6JT8tiIpVGVwEDq7jAA+E XYBwC60p3xJ2OfS930szbLqkJBoHhcqVgOGfH/+nvWX6CHVNKFQ/9GdyxlIBXm5B9mMW t2FNFzgHjeTsPwoHaqjwDoc0kLUSEMYEKnrnc3rd8gowDdCzDb5Cqps95AKVKT/MsM+C LY9kUCVuFYONB0pPior6IT1+BdZQTHyiUSfNynm6/FqnuptJPQ14/9ckJKJIwjFHxrdu agseAZi1x/2v8zhviv1KR1Et2Hnp9EusLGCyyCOQepy+oQG5RoJfJ0eysgGsc+9S7rvl U8Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kxLmN75T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id 4-20020a631544000000b0059f0cebd04csi1210904pgv.722.2023.12.07.06.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:19:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kxLmN75T; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 9CA9E803BAAC; Thu, 7 Dec 2023 06:19:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443318AbjLGOTB (ORCPT + 99 others); Thu, 7 Dec 2023 09:19:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443293AbjLGOSW (ORCPT ); Thu, 7 Dec 2023 09:18:22 -0500 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC3721BFB for ; Thu, 7 Dec 2023 06:17:34 -0800 (PST) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-54cb4fa667bso1322509a12.3 for ; Thu, 07 Dec 2023 06:17:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958649; x=1702563449; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9yGi3UQjgH7vKIKdKQCwE11iHS9JPf1l9kS7cSUyqbg=; b=kxLmN75TgX5uFIBJuDTFH1+xNWuzgedppS0kPCGWDoBGRDA7SJpPXO3kMHuPtS+3jS 8/34YgTmoAYy/FBfScUVsXXnid5r/hCPz0oJeFAETn6vrcCyoAV6FH/vSgLiqkBT9YTz +vRjo8hDwR1xJ5c7Oi8himUlFU6vBYp0xsuY0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958649; x=1702563449; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9yGi3UQjgH7vKIKdKQCwE11iHS9JPf1l9kS7cSUyqbg=; b=ptHO4dq35Q4f1QrpfS8n9u6CHLM7AS5p/H/Dxkf2mbl707k7IE5LYB8LwtJCIyIISA VSHUsQYlv103Oue23u1DWjES3q15FmKhUlaGRcv8iAbUx1qS2vFn8KXtpuVnMBkMuDuk G1oQ4tjH2xQ2RxDr0Hx/nUkWsS1ePCBWbtm30CLrb0OczdegeWziWZupjf5Gs8qX8vH1 Lt4oSSqVssuu0L8ss2lHz6yYRoxBSL7tUEoxBvPacwnm8wLFQBlrowPzjnq5CwPfL45n M3gWz0hrzuw5cUtFUsIIt5rvH3OeaAM+WPs9pdiMjWV+kPWRB3Lo8rgq/XJEcKFHtQlF 3pbA== X-Gm-Message-State: AOJu0Yz3jhx9b84F10N9ehEQ0df6Vmt1TV9l5zAVGc9dgTLxTXnKdgU2 3oKRXE4pZ++rUZ2xhJ8xsh7f6Mb8ftSFG/lRW0SfKg== X-Received: by 2002:a17:907:b88:b0:a1c:eea8:e34b with SMTP id ey8-20020a1709070b8800b00a1ceea8e34bmr1371325ejc.100.1701958649228; Thu, 07 Dec 2023 06:17:29 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:28 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Andrzej Hajda , Daniel Vetter , Dave Stevenson , David Airlie , Frieder Schrempf , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Robert Foss , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v5 01/10] drm/bridge: Fix bridge disable logic Date: Thu, 7 Dec 2023 15:16:30 +0100 Message-ID: <20231207141723.108004-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:19:21 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784633117786104584 X-GMAIL-MSGID: 1784633117786104584 As explained by the comment of the fixed code, we need to find the next bridge that hasn't set the "pre_enable_prev_first" flag to true. The code, on the contrary, was doing the opposite. So, the order of disabling the bridges couldn't be altered as required by setting the "pre_enable_prev_first" flag to true. Fixes: 4fb912e5e190 ("drm/bridge: Introduce pre_enable_prev_first to alter bridge init order") Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/gpu/drm/drm_bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 30d66bee0ec6..f66bf4925dd8 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -686,7 +686,7 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, */ list_for_each_entry_from(next, &encoder->bridge_chain, chain_node) { - if (next->pre_enable_prev_first) { + if (!next->pre_enable_prev_first) { next = list_prev_entry(next, chain_node); limit = next; break; From patchwork Thu Dec 7 14:16:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 175167 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4812850vqy; Thu, 7 Dec 2023 06:19:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IF8eIdP+8K8CHCtEk2Etmwn3c7JeFF/L2hJZua36ULalSOm7Q5A+LiarncCD2VO6+/y4Ex+ X-Received: by 2002:a17:90b:292:b0:286:6cc0:cad5 with SMTP id az18-20020a17090b029200b002866cc0cad5mr2556479pjb.76.1701958773134; Thu, 07 Dec 2023 06:19:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958773; cv=none; d=google.com; s=arc-20160816; b=KgbbtQgPHnJxpk+5Umg2I8LUsBNzPtNv6QiUzWDg0vcWRQkK7ToF3aWhuXDbCEMKeb oQUa5feSrJUg0AkSOwLTpITTbmJgY6+WIoHfyYiJC0y2M9tNh1ldi6MpLNxb0lPER12F JEpmTFjHMOMflY0WXcujfqD83Xv4OjIl2TqvQPZufSO0nEJH1kATwXkiJ/ZygbcmzY7N iUjXZhlgyQ/o4PdWbSyHg3ViB5QjtlqXDNWm9bAZ45t+pK10348NUn0tafHO25w07kKa B9Qku4+CWaHW3jH43CaENQ6QFdX5x6v1blO/8Dn7MlfOy/hwB085LPM0+AJ9ufsvzKBR 3SeA== 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; bh=fu0Px4Tbxip0tKoFWKIyTvbcuMI1IJ2fyAiFtPcJOWc=; fh=yrurfj0wqsNBtuv2/DS7hXM5gjUdNl0RGba7zZuGnHQ=; b=amRW9od0X0AyEMWJCtYrOhQXC+KTBW5+MThcQhiYCmRK+thwwKRwGGO+HqSklh2rsR oAP5mZspVmigPfpMnzIJUoH0mXTzj4Z3QOnNEa5t5bVMRM4gB7TZ8Pxj4AcpuJD855B7 9h2hWJs1vW+6VU59X0XPnTq8v1003B/Vdip63QKspTeVvgcRG+njknDQd0umui+d93TM XuhJusWDJb3CcLkpTu9bizy6Vt/lY5hOJh/joE87IoeVD+sXSzgL5FUtYUklKxyVsV7T O65oUIVZi2bh+MWLdAXDuN691xP2G+4SDu9GAD5h0I5O0GXLydBRG0iI71ZvO+fGRlKh Zg+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="P/zjBzBW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id js15-20020a17090b148f00b0028880b33ca7si1218461pjb.19.2023.12.07.06.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:19:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="P/zjBzBW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id D9748803FC18; Thu, 7 Dec 2023 06:19:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443401AbjLGOTN (ORCPT + 99 others); Thu, 7 Dec 2023 09:19:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443325AbjLGOSi (ORCPT ); Thu, 7 Dec 2023 09:18:38 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 572561FC0 for ; Thu, 7 Dec 2023 06:17:34 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a1e2f34467aso91279866b.2 for ; Thu, 07 Dec 2023 06:17:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958650; x=1702563450; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fu0Px4Tbxip0tKoFWKIyTvbcuMI1IJ2fyAiFtPcJOWc=; b=P/zjBzBWuo7MgP5j2NOsH5kzeNz9Is90YoKPKeZgsIF8KC9nt0v7TOEpU1ZXI12IRQ a4uHbSAh47vyEOX55uG1zsLH3XzSNMnmMCQTXywnmpPZtF02LYW6QbWkg1mVmtVwUdLy QVP+5KoPOMDURuj6UB2HD1VTqi+xJ2usuC1gk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958650; x=1702563450; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fu0Px4Tbxip0tKoFWKIyTvbcuMI1IJ2fyAiFtPcJOWc=; b=vzjGWJD36OAHP86KZCD/IPOdPWhh4s3RMkgOuzHwvxVR86cIGaHYoxBr4PQGm+0Ddm cMi2OrV+45A4hj8xoQV9nHrM38ZjuCIpkk8KXVGVP5nbUJnwVgrc+ouXgBAGHKBYzvvq f2a2cIRq5HkAzIpx7taxgnjWm8L4eQCwJ3VX+wEfq1iu3lzX5DobK+lMb+vKBHFgq9Pa ROirWSJsCOB4iIdZusKRxIOkRXSVAbEW7ajydEknOYnmvfSOQQhmplXn2yS4jcDp0bXD SH8hT5gJ21mDE61NPJBuA6RMHNkkLuuD0Vu3JSYOXl8jTLrYw1zUKnuYB9RT9azJ7n6Z SwJg== X-Gm-Message-State: AOJu0YxzzJ9fg53DKo9YfJUxIJqbSBxhVfTNk6ZxxgU6vin1+XzC93S0 XWhg6I/YMm+szijoHc/vAKn75e8NJLuHuvEKslvY7Q== X-Received: by 2002:a17:906:ce32:b0:a1c:8b15:fc01 with SMTP id sd18-20020a170906ce3200b00a1c8b15fc01mr1663788ejb.33.1701958650470; Thu, 07 Dec 2023 06:17:30 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:30 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Andrzej Hajda , Daniel Vetter , Dave Stevenson , David Airlie , Frieder Schrempf , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Robert Foss , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v5 02/10] drm/bridge: Fix a use case in the bridge disable logic Date: Thu, 7 Dec 2023 15:16:31 +0100 Message-ID: <20231207141723.108004-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:19:28 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784633122505443832 X-GMAIL-MSGID: 1784633122505443832 The patch fixes the code for finding the next bridge with the "pre_enable_prev_first" flag set to false. In case this condition is not verified, i. e. there is no subsequent bridge with the flag set to false, the whole bridge list is traversed, invalidating the "next" variable. The use of a new iteration variable (i. e. "iter") ensures that the value of the "next" variable is not invalidated. Fixes: 4fb912e5e190 ("drm/bridge: Introduce pre_enable_prev_first to alter bridge init order") Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/gpu/drm/drm_bridge.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index f66bf4925dd8..2e5781bf192e 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -662,7 +662,7 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, struct drm_atomic_state *old_state) { struct drm_encoder *encoder; - struct drm_bridge *next, *limit; + struct drm_bridge *iter, *next, *limit; if (!bridge) return; @@ -680,14 +680,15 @@ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, * was enabled first, so disabled last */ limit = next; + iter = next; /* Find the next bridge that has NOT requested * prev to be enabled first / disabled last */ - list_for_each_entry_from(next, &encoder->bridge_chain, + list_for_each_entry_from(iter, &encoder->bridge_chain, chain_node) { - if (!next->pre_enable_prev_first) { - next = list_prev_entry(next, chain_node); + if (!iter->pre_enable_prev_first) { + next = list_prev_entry(iter, chain_node); limit = next; break; } From patchwork Thu Dec 7 14:16:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 175171 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4813654vqy; Thu, 7 Dec 2023 06:20:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IEa/jPgdyYKHHSHqd0+s2flhhqwOjN7qjVxI/BaAaitzTFSsYoZpZ1g+0TYB1CUdSUewc39 X-Received: by 2002:a17:90b:4d0b:b0:286:3b18:592a with SMTP id mw11-20020a17090b4d0b00b002863b18592amr3520909pjb.7.1701958839121; Thu, 07 Dec 2023 06:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958839; cv=none; d=google.com; s=arc-20160816; b=Bf6kRAWlvCXpCiqNKsQPkv0CUGiW/gv6s/GvVrd1PMCmNarUM2kjVYbpEawSdW1hRA ozcQ+T1kYJ72xkAcNZ6r36A92jXDEirMyF0T4kd+0F6p6tpv3uG8sntyQRwi2YubTNr9 IN8O25aeS+wy8NGko32CgYoYhqToBtNrC7muaoOnCQdxH6nZZ0wOJAZ7Xfx9S/Fu7rso cQIyDrr87MeH+DUwaTNhb8QJkdJFRg1oio5t61ieqW3F5hShaPxFV8KipEPO0qo0eD03 yX7m2m8RmkKtieg/8Tp7cgOO/vxBuuTfbw27tk+MR4NJY8BDugqI+G50KYsIcTyFVzX6 qXjQ== 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; bh=3CX2gA6r/dtvGkH0YEYWwI6mzbAd5lMyIJziHnyg55Q=; fh=m6aHy4GVWeiYcahcFfIzqNn3pzsQZUVlVWbThwuybpU=; b=tuM9DVo61s54B8BSHaNhmrxK+3BT61gqR1e7dQ4aF+FAQvWNrPiruX+Ns073Rq/DHx rNy1VX7JTPqA61kfh8EztqO8nlbqH91fSQ6RFNYlCJ6ks0y9uncFKCaDllA1FaEHPTEy aZabXQMvxc02bg2hnkdk5b19C3kPhbLylM3GTOnspwvrP9UO22v53MF2wRMxiSACsLbc 0Q2+1FUfFzxOcBL9P21Nmww4iZNY+o3bZrsBndxTYYbNNq8BkPjGzMTQlWvQxI5nnpsL s6JKY8zR8QpVeojcTKrYKl6h+6v5aterbXDQf8MXAMs1243gcUeuhvkjXtNPgCNMHrIF gaDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LyFm8gys; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id pl12-20020a17090b268c00b00286ba59e1d0si1173290pjb.186.2023.12.07.06.20.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:20:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LyFm8gys; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 042D580B41A3; Thu, 7 Dec 2023 06:20:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443199AbjLGOUE (ORCPT + 99 others); Thu, 7 Dec 2023 09:20:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443337AbjLGOTe (ORCPT ); Thu, 7 Dec 2023 09:19:34 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 948EC2118 for ; Thu, 7 Dec 2023 06:17:42 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2c9c18e7990so10957461fa.2 for ; Thu, 07 Dec 2023 06:17:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958652; x=1702563452; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3CX2gA6r/dtvGkH0YEYWwI6mzbAd5lMyIJziHnyg55Q=; b=LyFm8gysVyjKxyarwrURNnVailE8OnFrIk5WbQr/OI7VEfDdtwpp8UlKiugL2Dg+Bs 2pU7wV3sBs6R5R1Ofy5+R25JqYIahn8w405Cb20AVZAaw2RURigQgSgRyi8bggt+1PW+ xB+n2vGrwO6edzNXsHJdXQh0kkDy6kEQns6I8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958652; x=1702563452; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3CX2gA6r/dtvGkH0YEYWwI6mzbAd5lMyIJziHnyg55Q=; b=d7qq/D4sw7NrhsBjibomBNoTWsxDEpTttbqIa4H5zJ/6xwLrpoIcXPljnGxVstmG5q scsRu3L61LNQ/yQSDUdoh1j0Pz0TES7ygEhh4yLd/4ajCpRBNv9hYiEgg/8m7VOSRZqe /DANXArgDNx65NjOLEbIiaoUrEJdvcCU4b3gErPfIyY7Avq/gkNYwOpS1elRKB9XqTQY cJXOowgerPx+TyOP7w8umMqrh4CqENYU0T/bc+UKZAdS/HCZlGgAdgHGEmAGakAOVT3D vKj2vSk26vvRn1btu7YrwTymzb7aV+23UVAk7EoFt4yJy+XU0kinkCOdGA9EKnArqwEU fepg== X-Gm-Message-State: AOJu0YwYrNWwyct3CzvJIMHNU/0/HV/16l5Pj/lyqWMy1EkyWQDU/fKK 4RvsJEkHcf+ybW2lnoNK1N3PRbMu/N9gdk5aJDsJXg== X-Received: by 2002:a2e:9250:0:b0:2ca:1030:f695 with SMTP id v16-20020a2e9250000000b002ca1030f695mr1517835ljg.78.1701958651744; Thu, 07 Dec 2023 06:17:31 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:31 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Andrzej Hajda , Daniel Vetter , David Airlie , Inki Dae , Jagan Teki , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maarten Lankhorst , Marek Szyprowski , Maxime Ripard , Neil Armstrong , Robert Foss , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v5 03/10] drm: bridge: samsung-dsim: enter display mode in the enable() callback Date: Thu, 7 Dec 2023 15:16:32 +0100 Message-ID: <20231207141723.108004-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:20:36 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784633191443007171 X-GMAIL-MSGID: 1784633191443007171 The synaptics-r63353 (panel-bridge) can only be configured in command mode. So, samsung-dsim (bridge) must not be in display mode during the prepare()/unprepare() of the panel-bridge. Setting the "pre_enable_prev_first" flag to true allows the prepare() of the panel-bridge to be called between the pre_enabled() and enabled() of the bridge. So, the bridge can enter display mode only in the enabled(). The unprepare() of the panel-bridge is instead called between the disable() and post_disable() of the bridge. So, the disable() must exit the display mode (i .e. enter command mode) to allow the panel-bridge to receive DSI commands. samsung_dsim_atomic_pre_enable -> command mode r63353_panel_prepare -> send DSI commands samsung_dsim_atomic_enable -> enter display mode samsung_dsim_atomic_disable -> exit display mode (command mode) r63353_panel_unprepare -> send DSI commands samsung_dsim_atomic_post_disable Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/gpu/drm/bridge/samsung-dsim.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index be5914caa17d..15bf05b2bbe4 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1494,7 +1494,6 @@ static void samsung_dsim_atomic_pre_enable(struct drm_bridge *bridge, return; samsung_dsim_set_display_mode(dsi); - samsung_dsim_set_display_enable(dsi, true); } } @@ -1507,6 +1506,7 @@ static void samsung_dsim_atomic_enable(struct drm_bridge *bridge, samsung_dsim_set_display_mode(dsi); samsung_dsim_set_display_enable(dsi, true); } else { + samsung_dsim_set_display_enable(dsi, true); samsung_dsim_set_stop_state(dsi, false); } @@ -1524,6 +1524,8 @@ static void samsung_dsim_atomic_disable(struct drm_bridge *bridge, if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type)) samsung_dsim_set_stop_state(dsi, true); + samsung_dsim_set_display_enable(dsi, false); + dsi->state &= ~DSIM_STATE_VIDOUT_AVAILABLE; } @@ -1532,7 +1534,8 @@ static void samsung_dsim_atomic_post_disable(struct drm_bridge *bridge, { struct samsung_dsim *dsi = bridge_to_dsi(bridge); - samsung_dsim_set_display_enable(dsi, false); + if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type)) + samsung_dsim_set_stop_state(dsi, true); dsi->state &= ~DSIM_STATE_ENABLED; pm_runtime_put_sync(dsi->dev); From patchwork Thu Dec 7 14:16:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 175174 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4814808vqy; Thu, 7 Dec 2023 06:22:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0ifzNosQv0uFqIVBn4kchOyBGOmIimNj7iCdDh/MbTtnZoa3KmNKZFRETOr9pNniVxeZw X-Received: by 2002:a05:6359:6c0b:b0:170:2f92:3edb with SMTP id tc11-20020a0563596c0b00b001702f923edbmr2105044rwb.57.1701958950750; Thu, 07 Dec 2023 06:22:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958950; cv=none; d=google.com; s=arc-20160816; b=uK9ej9/QkCW7mp/iQhNWp6pztx/lkueAFQVmmwtrES2q0MoJvyggNwe76c6WtX/cxV JJ1+J/VntTwoHD8X2HJtym/03Oc2+mBkatbWzNx3LlFVxqoim1ygvqdMX1qcZHXvTQlV rMLiOPuY4uwjk9MW6nkjgoEP2M3hfhpTxgS2+rC9cPe/7Ujm9NZKRAlpV5NNfWjxg2tq ZbXFlNkGUqVGxC8lpuLNv5eiBYEna+/koMLtOGE7IDpwq4ymI/Ko7G7vGnKOgAJxE6iN NuC0M9hAwFi6M/bHe/MQOXZhO1L7TeD5kFMQiFa/8aNMtsxo4B5eWWcaDYkch6tOBcNP ASag== 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; bh=LRuU/Yf3+WOs2/s3BqHchrpBnPmBNhkaR5Vfu/UBGmU=; fh=m6aHy4GVWeiYcahcFfIzqNn3pzsQZUVlVWbThwuybpU=; b=rgeI2zNsyaH4o50cNBgA6hzmTRSFm8PDVcLpgVmorZWSoVJ3GP3fejeo1SMlhtfFES i1eAzc7mWLsTYv74Gkus7BH53JfF2l+7za6y3J+A4EJuuH+sH4yE62Zifjb2Jxt5+8S/ mnYriw6fTs8gU4WJs4qlowS75Ifpwpfq8pVzWgly7PUxOArRz27ZRnt+3m9Scv1zoCsz jgogOMz3h22VsAuS9//S8DI5KTI5KMQK/4HjcxvWRhXVcpqHCSe8ZUlwqEOaTkXkxDds 0N+TUEp9wWLhnV89V+dwHFilHMpjTT8cnTL27LjaWkLVWp+lvKyBVaKjhWetBnEq99/s NRtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eIgxP2Rv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id y73-20020a638a4c000000b005c65758770bsi1230709pgd.421.2023.12.07.06.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:22:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eIgxP2Rv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A87D180C4DA2; Thu, 7 Dec 2023 06:22:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443251AbjLGOWH (ORCPT + 99 others); Thu, 7 Dec 2023 09:22:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443188AbjLGOVs (ORCPT ); Thu, 7 Dec 2023 09:21:48 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE41319B9 for ; Thu, 7 Dec 2023 06:17:45 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-54cff638658so1326632a12.1 for ; Thu, 07 Dec 2023 06:17:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958653; x=1702563453; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LRuU/Yf3+WOs2/s3BqHchrpBnPmBNhkaR5Vfu/UBGmU=; b=eIgxP2Rv9lsBhiVfoHBww21fMl3CDjqTWZk1fUXCQlmBP3xbjqEhlzcjtH7q6lEqfO NHOnOEDcUVjSgjTP3wo8Rsitl9Hwlfx8F3ob/SKzS0soZk3ozZfPv7N8aYMYCsn7wit5 WTnohP1M0buj/ed7tgh0PuAbWwLYA2Uc6yU6Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958653; x=1702563453; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LRuU/Yf3+WOs2/s3BqHchrpBnPmBNhkaR5Vfu/UBGmU=; b=HsAowq5in1o1i0tT8xdOpU/6nL336jcXlO/Aeuqeho/E8Kc6XxYonYFmtmdmNSiidC QTV2PrEbPY0fN/tgsmR9dIV8ck+qswc6WuX2/3KU0IdgTlRFFgIpdAq1NykhLr+INmSC oRWYcOhgPcjuYbFXXzLvTh20LqvYf8dQTqHP/2uRmfmuFXkfQzyvdnjqco9iZgCgLWtC u1cWv/XAVWVnRzlAcki2Td2/Qy5CBd8ithNA9RM1Bb0I/g21ff8L3iQH8ZUUDj3/kCSB 5TfaYq8go6GahOFOWBNodCIVmiRDM5Dn9iJW1t14lYNjftHDBHa/lLt3LwQwVu6hENB2 WGzA== X-Gm-Message-State: AOJu0YzWsgoVrSVqXTX/dQsZnMMN+4LTfwThy6WJ1dm5nflqXUuumlr/ xenz31n/SyHu7e9FKm6m7Ldg9x1QgvBi0poiXQg1hg== X-Received: by 2002:a17:906:b759:b0:a19:a19b:55f4 with SMTP id fx25-20020a170906b75900b00a19a19b55f4mr1531281ejb.132.1701958653107; Thu, 07 Dec 2023 06:17:33 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:32 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Andrzej Hajda , Daniel Vetter , David Airlie , Inki Dae , Jagan Teki , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maarten Lankhorst , Marek Szyprowski , Maxime Ripard , Neil Armstrong , Robert Foss , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v5 04/10] drm: bridge: samsung-dsim: complete the CLKLANE_STOP setting Date: Thu, 7 Dec 2023 15:16:33 +0100 Message-ID: <20231207141723.108004-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:22:22 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784633308839724078 X-GMAIL-MSGID: 1784633308839724078 The patch completes the setting of CLKLANE_STOP for the imx8mn and imx8mp platforms (i. e. not exynos). Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/gpu/drm/bridge/samsung-dsim.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index 15bf05b2bbe4..13f181c99d7e 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -96,6 +96,7 @@ #define DSIM_MFLUSH_VS BIT(29) /* This flag is valid only for exynos3250/3472/5260/5430 */ #define DSIM_CLKLANE_STOP BIT(30) +#define DSIM_NON_CONTINUOUS_CLKLANE BIT(31) /* DSIM_ESCMODE */ #define DSIM_TX_TRIGGER_RST BIT(4) @@ -945,8 +946,12 @@ static int samsung_dsim_init_link(struct samsung_dsim *dsi) * power consumption. */ if (driver_data->has_clklane_stop && - dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) + dsi->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS) { + if (!samsung_dsim_hw_is_exynos(dsi->plat_data->hw_type)) + reg |= DSIM_NON_CONTINUOUS_CLKLANE; + reg |= DSIM_CLKLANE_STOP; + } samsung_dsim_write(dsi, DSIM_CONFIG_REG, reg); lanes_mask = BIT(dsi->lanes) - 1; From patchwork Thu Dec 7 14:16:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 175170 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4813393vqy; Thu, 7 Dec 2023 06:20:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbDp/Ccl+n6BGLNxlYIevCcDnknaQgHtIrgXRDtbYho3r29O4w5aBmsHVw6+4zBwLScwtB X-Received: by 2002:a17:90b:893:b0:283:967c:4e6 with SMTP id bj19-20020a17090b089300b00283967c04e6mr6203476pjb.12.1701958816884; Thu, 07 Dec 2023 06:20:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958816; cv=none; d=google.com; s=arc-20160816; b=j4PXm6NBlbjy9tjqr7wEYFCz6JIMvCUSYia54HCbwcpdrpgLKlkBjmaSFiGptc4PD8 OyW4Tp5fxfO2jgAbYsfniMTLVnjKGqKckY36w5Sy7WVAM+6E84KFbyJ8nca9aESn9yxh CXX/B69J+LrUfvJiRaIbaTxNttGc54Ac9CC1jkodCjkRaithfnQBSccKI4Uls6S7DgeQ 2eMknTwFFP0h3pTEo51Y8EtfEJJmelwxE0asHbsyQ8wP+Vt3vf1nXk/yXPajznA0sbSW nuHpm0kmeCl2m5CGaDRdD+L2q0VeWJ8bgcJGio/FsEJ4Jg2LSRu1RlKgtno7VbGan2DP x0aw== 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; bh=9dqXlBbcQt0R29oSjxr4jyi0yptqDX27ArBU37Ndav8=; fh=6zMG0Z8XcspgSxDk55siqf83pNQJKdG1GaqIeIrDDYI=; b=AchauiKu6HoyNH7DjRuddHMpVIKziqi4y/DL9BsP11e0AmxjR8VNq2HmUVc4WJERHY 0xT4R4XVN0HaZsEymkieYgwYhS50brBi+eVUOywXkt6AY51eYvo+1nOsVu6D3vdzUUF1 bFCMFChVf22cE+YjSHx7e6H0VBNtCyxoGpOdQ7eK1O0E+MkU2nY21wqWr7egk663b+Ry yaogPn9t+j9VQ9LYbvHOJDOj8tqd9j9STfq8OuR8nL3NHlOFuCB7HkoIaoVogXGFtQhN W1MsDxMRJ83ZSwaHkxAeJcz7vrGdk8RFZu5jX5V3lqPpmDaqioOT0ddQmcrelji+gR8B tWiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eDB1QVCb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id h23-20020a17090acf1700b0027cdee52324si1186526pju.74.2023.12.07.06.20.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:20:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=eDB1QVCb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 26C7F8043C3B; Thu, 7 Dec 2023 06:20:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443169AbjLGOTc (ORCPT + 99 others); Thu, 7 Dec 2023 09:19:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443314AbjLGOTI (ORCPT ); Thu, 7 Dec 2023 09:19:08 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE3FB26A2 for ; Thu, 7 Dec 2023 06:17:48 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-a1eb422b412so151340366b.1 for ; Thu, 07 Dec 2023 06:17:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958654; x=1702563454; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9dqXlBbcQt0R29oSjxr4jyi0yptqDX27ArBU37Ndav8=; b=eDB1QVCbg/lpBn07ozpqGioZsE/w+1DmECW3E0AlFA6Z6SEms/egLq8I0IBkfYSAa2 MKiCEDQuINJIEbu695gVM+gSpeIzhfz+ul6g+ECxZLyk93evMxZ/VM8IGd18XhCPoieI 9GSWvqBtqTcX+ms4JHsnfek3plfm/obpLZQN4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958654; x=1702563454; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9dqXlBbcQt0R29oSjxr4jyi0yptqDX27ArBU37Ndav8=; b=YiZ9kYSWsJBh7QitlzywyndWMrW5lkwoUwnBPHR1lvEfd1MSDxwW8amZBGFudspJ/q zhsL21Ts8reJxXY3riaizQPOmsKO5Gne53HL1VMQKh6UXGpLs60y/5iz2s/H/j4YJku2 pm/m+gtsRxw7jpVH2q4YUzb1ZEPn+uAHl4hUMQgqFOizUR3b2ti3kbne1H3hUoa9xROm DiXONlF/zgzIFGTQcJFuhpW9xXsojB8wgU7TZH2udEsWytWBxo+2lvWMYH9Unw64mjfH d9jHzsvWAsIBOs/R9Lr45lLff/2NsS9HtSBLyZDGpKgR2Vq009Hgj3oWMyNUee3h8fb3 55HQ== X-Gm-Message-State: AOJu0YyxXX8rDqtSfcWcZWPMBp31dSIvXbU1fqvjKlxesZHjjT4vzdOV PRspbVKbOB+d8ziKJnJxU4xqr52cOviYOzIMQ/+dTw== X-Received: by 2002:a17:906:2558:b0:a0f:c538:4612 with SMTP id j24-20020a170906255800b00a0fc5384612mr4598113ejb.28.1701958654342; Thu, 07 Dec 2023 06:17:34 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:34 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Krzysztof Kozlowski , Conor Dooley , Daniel Vetter , David Airlie , Jessica Zhang , Krzysztof Kozlowski , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Rob Herring , Sam Ravnborg , Thomas Zimmermann , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v5 05/10] dt-bindings: display: panel: Add synaptics r63353 panel controller Date: Thu, 7 Dec 2023 15:16:34 +0100 Message-ID: <20231207141723.108004-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:20:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784633168420257460 X-GMAIL-MSGID: 1784633168420257460 From: Michael Trimarchi Add documentation for "synaptics,r63353" panel. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Krzysztof Kozlowski --- (no changes since v3) Changes in v3: - Add 'Reviewed-by' tag of Krzysztof Kozlowski. - Replace "synaptics,r63353" compatible with "syna,r63353", as required by vendor-prefixes.yaml. Changes in v2: - Add $ref to panel-common.yaml - Drop port, reset-gpios, and backlight - Set port and backlight ad required - Replace additionalProperties with unevaluatedProperties .../display/panel/synaptics,r63353.yaml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml diff --git a/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml b/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml new file mode 100644 index 000000000000..e5617d125567 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/synaptics,r63353.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Synaptics R63353 based MIPI-DSI panels + +maintainers: + - Michael Trimarchi + +allOf: + - $ref: panel-common.yaml# + +properties: + compatible: + items: + - enum: + - sharp,ls068b3sx02 + - const: syna,r63353 + + avdd-supply: true + dvdd-supply: true + reg: true + +required: + - compatible + - avdd-supply + - dvdd-supply + - reg + - reset-gpios + - port + - backlight + +unevaluatedProperties: false + +examples: + - | + #include + + dsi { + #address-cells = <1>; + #size-cells = <0>; + + panel@0 { + compatible = "sharp,ls068b3sx02", "syna,r63353"; + reg = <0>; + avdd-supply = <&avdd_display>; + dvdd-supply = <&dvdd_display>; + reset-gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL05 */ + backlight = <&backlight>; + + port { + panel_in: endpoint { + remote-endpoint = <&mipi_dsi_out>; + }; + }; + }; + }; + +... From patchwork Thu Dec 7 14:16:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 175176 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4814966vqy; Thu, 7 Dec 2023 06:22:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWOlpkaHpDaWdA8HfYwDcZZZLZW6LeCnDHphRYoIFA2B0J2C53uA0InnJ3ToMqFDYfVhpN X-Received: by 2002:a17:902:d4d2:b0:1d0:8fad:f18d with SMTP id o18-20020a170902d4d200b001d08fadf18dmr2942134plg.95.1701958968038; Thu, 07 Dec 2023 06:22:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701958968; cv=none; d=google.com; s=arc-20160816; b=kqy3C8YnTf4A8KI/yMc06KYj9e4Fe5VJgJCjDqSAojrhA0qIjj9wwaHcP6J3hacPeW 74oU542vPp02gxixLb77O3LkJYKmgZnMfX9pVlsJyw5PAGw59EeLlsfInHj6XZ5IhFaS MEXRrT83aomu44aMJ9HwOwUb+0MxECnsYm9gIcjiBkOBbbJKYkSwP4sW0RsLLUwYIhwZ AKJOMiQjT6ukSoFo8Ar+nC4NyieSMjKLg1K6+5lMjLXo+pRAHHz33UzYyKS8i6VRG30W W84Gi/asoUJmaO54KuBThxQ3FBBDfwV6TZco3Xe/3PNV/ZnUCkNRrTPFL9XW+qdo18+p LUlQ== 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; bh=GVh6PC472lZgerr4mfywa9L9+B1rFGAMxmajJY6iaoU=; fh=YMCpMfj2GNScjLvWYsHyWUGLqrAoIyNb9XBc8eC5U/M=; b=nKXy9HisORPqXc4lyI0m1fX0FU2pgVKxRxkz5Fo2mQ7chaiIwbgId4K8BK1h953Zoj Jg7pbVKQ1Kbt/vROQCe8iwJEn41oQIlJHEb8v/aZN2aYDHmZVcIaNn+oPbMwpt2iVOPu nkv+m7BhAHnhwG8fNnFAXEpvuDF+lZ6XX/DKem6sE12Qgq2wOiy1sMdHoBj7vpfF7nTp Cqv0N4iFcsPa4kgd6izFmSbEoUi6I2eGFJf0PzfAld5vBc8tbcm6JReVlPaO8/7G3HVB psQfkON86FkHBE75eRoS5rBENrYw5scEYaDnPGJ198ICvmrb7mmwKJKMcSQr4HyAqQAv wnkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DPCdSiq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id jc21-20020a17090325d500b001cfcd2e1294si1189478plb.241.2023.12.07.06.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:22:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DPCdSiq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0D9C3828FAF9; Thu, 7 Dec 2023 06:22:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443342AbjLGOWY (ORCPT + 99 others); Thu, 7 Dec 2023 09:22:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443193AbjLGOWA (ORCPT ); Thu, 7 Dec 2023 09:22:00 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D44AB26BF for ; Thu, 7 Dec 2023 06:17:51 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-a1915034144so127722566b.0 for ; Thu, 07 Dec 2023 06:17:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1701958655; x=1702563455; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GVh6PC472lZgerr4mfywa9L9+B1rFGAMxmajJY6iaoU=; b=DPCdSiq4+9jLK+vE5Zge4QU6NmeQfxbFikCRSoAl17qLDo4jMf20nuhcSNNsLePsEx rgJODC/qtVVLXnuPK6WHEvKubhidPjVsX/1TRAm95twE/FukDvQjONcEULhw2BDqTnJl n+AS3Dzw00LYC8wSpKsaaMCedkquOA6SmvjpQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701958655; x=1702563455; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GVh6PC472lZgerr4mfywa9L9+B1rFGAMxmajJY6iaoU=; b=H1Pu5BP0ll+9CxEnyampTxHwc6X+kdpUUJQZkvq9C3/EN/Mer1uMSo9Y5aWyK8Q2yB 6Obbqad/Rtu958ycMdAU8Trsc+6OX4dO20ewVBAwOmmubW3IjyBgfIDerybtQfU82Ssy MHeTMjUH6YQ9rOIB9zM6+3WOWkxqshYD+sNDIhVHfvg1AJI44vtfJ799gRUY5x8vvWVB /wNxpkOkgfiXmAeEQonhfkTlLTggAA9fP67M+821+QXqfKccgl2IWGai1K97KZUow3PI ftEBQrgP4WsU47qm0meqc9lXUpCsiX6emMl3w3Awp944xhPaCeYApKVoN7AOceY/fC/S SFMg== X-Gm-Message-State: AOJu0YzayDHYKqRUl/3zQZt9hPQnMdlzDnEnS5LG0K8QD5etlzxZFutB +JSbBEIbVmKthfQ+Xfw7W/VBnkvSU0Vm4vdx7kkrsA== X-Received: by 2002:a17:907:9705:b0:9e7:d1ab:e90b with SMTP id jg5-20020a170907970500b009e7d1abe90bmr1777303ejc.19.1701958655536; Thu, 07 Dec 2023 06:17:35 -0800 (PST) Received: from localhost.localdomain ([2001:b07:6474:ebbf:9bf:959c:3c66:46c2]) by smtp.gmail.com with ESMTPSA id f24-20020a170906c09800b00a1e814b7155sm885421ejz.62.2023.12.07.06.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 06:17:35 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Sam Ravnborg , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v5 06/10] drm/panel: Add Synaptics R63353 panel driver Date: Thu, 7 Dec 2023 15:16:35 +0100 Message-ID: <20231207141723.108004-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> References: <20231207141723.108004-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 07 Dec 2023 06:22:42 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784633326649269691 X-GMAIL-MSGID: 1784633326649269691 From: Michael Trimarchi The LS068B3SX02 panel is based on the Synaptics R63353 Controller. Add a driver for it. Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Reviewed-by: Neil Armstrong --- Changes in v5: - Replace a 'return ret' with a 'goto fail' in the r63353_panel_activate() Changes in v4: - Set the reset gpio to low in a single operation - Remove duplicated code for prepare/unprepare callbacks Changes in v2: - Adjust the timings of the panel reset MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-synaptics-r63353.c | 363 ++++++++++++++++++ 4 files changed, 379 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-synaptics-r63353.c diff --git a/MAINTAINERS b/MAINTAINERS index 788be9ab5b73..b82dc141d209 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6874,6 +6874,12 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/ste,mcde.yaml F: drivers/gpu/drm/mcde/ +DRM DRIVER FOR SYNAPTICS R63353 PANELS +M: Michael Trimarchi +S: Maintained +F: Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml +F: drivers/gpu/drm/panel/panel-synaptics-r63353.c + DRM DRIVER FOR TI DLPC3433 MIPI DSI TO DMD BRIDGE M: Jagan Teki S: Maintained diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 99e14dc212ec..d018702be3dc 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -735,6 +735,15 @@ config DRM_PANEL_SITRONIX_ST7789V Say Y here if you want to enable support for the Sitronix ST7789V controller for 240x320 LCD panels +config DRM_PANEL_SYNAPTICS_R63353 + tristate "Synaptics R63353-based panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y if you want to enable support for panels based on the + Synaptics R63353 controller. + config DRM_PANEL_SONY_ACX565AKM tristate "Sony ACX565AKM panel" depends on GPIOLIB && OF && SPI diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index d10c3de51c6d..f267d932c2b5 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -74,6 +74,7 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS060T1SX01) += panel-sharp-ls060t1sx01.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o +obj-$(CONFIG_DRM_PANEL_SYNAPTICS_R63353) += panel-synaptics-r63353.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o obj-$(CONFIG_DRM_PANEL_SONY_TD4353_JDI) += panel-sony-td4353-jdi.o obj-$(CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521) += panel-sony-tulip-truly-nt35521.o diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c new file mode 100644 index 000000000000..3f61fcdc550b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c @@ -0,0 +1,363 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Synaptics R63353 Controller driver + * + * Copyright (C) 2020 BSH Hausgerate GmbH + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include