From patchwork Wed Nov 1 09:17:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 160484 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp282797vqx; Wed, 1 Nov 2023 02:20:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHC7Ql4Je31vfqZRQ/uaHMtKmgVpNywhO1p9rXLhmSXFWLS5+huMN3dSqbzoYAAECU3XPsF X-Received: by 2002:a05:6870:2304:b0:1e9:c974:5f7e with SMTP id w4-20020a056870230400b001e9c9745f7emr18995949oao.40.1698830407042; Wed, 01 Nov 2023 02:20:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698830407; cv=none; d=google.com; s=arc-20160816; b=RudzRWQGh5zIKC7VP7BktQuueU3Bz7xvlyNVtmRtcdaqbeXryAHVUAsPH65Lc4NCWN nC2g0vI7IwHSxYL3DAAHhuf8z5rTc3siw+g71vWa2hQe5GVPgJQUux9nnRASugjj9fVh UWSXdpG5G1o3ngY2ugL9VfMiPJaUoYVv80ljkst+P0S4Xp2BdULjHta/kmz/08v9hCSV 8UsUUKbTv9UVZ1rdQMQ9x3S/YSbjf8icEWVcvSP1+FL3/8PdmcVJYGTY74ddaKkNdn0O 1gI24vVplLmg3XDdhIF12geaOieEjyH2YcQ/OZTem5JLSmB+zu8wIDrXfSizySHNMA88 PprA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=pKcs/xPloQYE/Gx8+0nJbKdApBZEay/XewUBU7+EfGg=; fh=IpenHstmzluQ2qG4rgZds4W72uLPbZNMEjQq5GLr0+k=; b=HGSuW4gsACLHHnyOePn42Ir1oZFQHHsAQQVXOUZSHtjtVUDglwA+O0iJ34Vg6/mhnz pW8izC1AEwYUvkwKfDsxZAn2BXBzL1MXgZM36LFmNJRAeKLhsA8UJgcj2rYpKGxCD1kw kHp/h5Wdrdx+EXvYuyPwBMVNKHdBHFZTbOtqebinuG7vGsvfCkDdajHTY9LMoZ6qmuJ8 AtgwHlAoCeZotTKKnr8XkGq/oGBQh484REbwKbBWeyB/Hba794beO9bEgqVLhPWYHW2T vO2eMuuIh1hosHEL2tHbG5u/GJD67IdTCi8yWnbd9aMtrWKZvx5MyzA23h05H5WkAxk6 5flQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="p/T0QMM1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id k184-20020a6384c1000000b005bd043711cbsi774312pgd.216.2023.11.01.02.20.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 02:20:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="p/T0QMM1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 55409805DC67; Wed, 1 Nov 2023 02:19:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234867AbjKAJTB (ORCPT + 35 others); Wed, 1 Nov 2023 05:19:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234822AbjKAJSy (ORCPT ); Wed, 1 Nov 2023 05:18:54 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9E4CB9 for ; Wed, 1 Nov 2023 02:18:48 -0700 (PDT) Received: from [127.0.1.1] (91-158-149-209.elisa-laajakaista.fi [91.158.149.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 44C9AE52; Wed, 1 Nov 2023 10:18:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698830300; bh=9o8g+vSUQSS3NMbFAfGUkXi52cmu6Vb3V663gNfc4iY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=p/T0QMM11m5z3vXdBLD95kfaCJDQgXUYH5Y18q6/1yRkfjNCHx0NLbSThIUxS7tU4 n5Nt8UGErZQpNfl7nnGoYcP+aG5UNHdeH2wppHR5/vNDnl3h+kjgjYiDgE09SfbMga iEIgrs5XSnvSPf8iSJv9fEfZiJBSDXqhj+NATuO4= From: Tomi Valkeinen Date: Wed, 01 Nov 2023 11:17:41 +0200 Subject: [PATCH 04/10] drm/tidss: Move reset to the end of dispc_init() MIME-Version: 1.0 Message-Id: <20231101-tidss-probe-v1-4-45149e0f9415@ideasonboard.com> References: <20231101-tidss-probe-v1-0-45149e0f9415@ideasonboard.com> In-Reply-To: <20231101-tidss-probe-v1-0-45149e0f9415@ideasonboard.com> To: Aradhya Bhatia , Devarsh Thakkar , Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Laurent Pinchart , Tomi Valkeinen X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1363; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=9o8g+vSUQSS3NMbFAfGUkXi52cmu6Vb3V663gNfc4iY=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlQhfmqKrrOflLOTzV3Rkv9Kbh/MN1PuuDm8/ON sPnotTWnrSJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUIX5gAKCRD6PaqMvJYe 9WbBD/4mv6KLlnj3Gja378NvTcc+TdWKrXms3LxA6LYYNBr9MZP8NrejQnGyZ2scbA9TseQaLKl xqtmW3v5E0vgnfbFCxnvRpSiMN5LFF49++VbMbNUR9OBmNhhAIVKDdRnqefYS3q4f1AHfHWXriV siw+rcnKIWQGXm7PHo4JqLA6SCXpYmzQfuHkplxtl8UBki8/HiX/PxsUmizmZfLlTRZ9E+6THwV A6Bc69316TyAu4A+n6rPZqlEnVqZc5qzQZLndYj1/39Smem4725r1nE7jtsjPuKV2H0NgEinXQi qU+F9mA8H2KkiIwipJ4VyXgsjJCI+mRrsfPCeLDYwsF6sUX1O22/Na84WPcfZxrIaah6hvGejl2 ooEtZWgv5kqzRvw8A1hzsdSHwhikoKrYWu+vAFrKuRGRcvoJVJvvusoQUwOsMbg6f/n2yxJVMGd B3m7pIw3P5gzug99n3Je2D+KRpe9pfsMwWkqfO21Elw5xsrhhfDTuFeCbjxyQU7i54W3b1aak/i vYF+fOJYdx39Ld3wUzYz2+aJ1P7/OSZLb2gwBgYusMPb3e1lleR491ykd2XgM/w3hih3KZjDoYA fjuUhfMR6SJnmnPbGQ+U5qNsfPdevqyjfvtNjlvk2ideK0ZJxRaqF8rAduvr+VsLOSonkJo0R97 cm0/hvJnAwW77sg== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 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,URIBL_BLOCKED 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]); Wed, 01 Nov 2023 02:19:51 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781352792835636047 X-GMAIL-MSGID: 1781352792835636047 We do a DSS reset in the middle of the dispc_init(). While that happens to work now, we should really make sure that e..g the fclk, which is acquired only later in the function, is enabled when doing a reset. This will be handled in a later patch, but for now, let's move the dispc_softreset() call to the end of dispc_init(), which is a sensible place for it anyway. Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/tidss/tidss_dispc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c index ad7999434299..9430625e2d62 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.c +++ b/drivers/gpu/drm/tidss/tidss_dispc.c @@ -2777,10 +2777,6 @@ int dispc_init(struct tidss_device *tidss) return r; } - /* K2G display controller does not support soft reset */ - if (feat->subrev != DISPC_K2G) - dispc_softreset(dispc); - for (i = 0; i < dispc->feat->num_vps; i++) { u32 gamma_size = dispc->feat->vp_feat.color.gamma_size; u32 *gamma_table; @@ -2831,5 +2827,9 @@ int dispc_init(struct tidss_device *tidss) tidss->dispc = dispc; + /* K2G display controller does not support soft reset */ + if (feat->subrev != DISPC_K2G) + dispc_softreset(dispc); + return 0; }