Message ID | 20231101-tidss-probe-v1-6-45149e0f9415@ideasonboard.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp282534vqx; Wed, 1 Nov 2023 02:19:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH12mkcZPw6D8/E2Fnbww2PADqT6/Vd4gEjU1CMuYd8hkTAGee8Iqxstp21GqEmLlwzubmp X-Received: by 2002:a05:6808:6381:b0:3ae:5442:ed11 with SMTP id ec1-20020a056808638100b003ae5442ed11mr15933253oib.54.1698830365991; Wed, 01 Nov 2023 02:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698830365; cv=none; d=google.com; s=arc-20160816; b=oRyTJj1TK9Rn53ShqtuxPL3yvD2ltdquYp2a7oOQQkjmM12HGnWsuIf51TRxU5jtqj ekJ9Q9Kz6QLOuoqnDgBF02VOycTLsFdpZ3+WjKJB9GX4sqoryucQEWIDPD8hiILqCrob sYMoG4qi+h2IkLa1pyPfK0GXBRqhRIh8nZ3QlTmwN4YGqwpBYDr/eUh9ysgUOdTcGszL LgvEiNVYm5pQJfM+i4ngTd5At3Aj+4YBr/uO1Y5+YPUeDFCtGOVL72FB9L5ipAV69BzY R/MjTD2UkSsIL2C4TRKFEgDIt0dQHoodpqUpaoMY7lBIkRfnU/AU2XGBmMIeTkC1cGLF 5MLg== 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=V/4Glbb8WcFRdLpTmg3SbNgOQJ5ISQyzcsfvwM6NYW4=; fh=IpenHstmzluQ2qG4rgZds4W72uLPbZNMEjQq5GLr0+k=; b=SgWObjZRXk3Dlmu19ZmYhlg0icBjp/RIG78yu67bcRqdT/aCTYsHc6a6/A0hBjQHAn 6jEk2mUwPNvbmkvaKbZkFt4KWVH9n6XObI6E2jBen7DegD3Q4K6v4rDPpDuLI3SdnTyg 8YMh9c55XxAHz8k458jSuvxBNH/vkNRyAn1amOWDKzMDwfr/unhZXBIMYi/3v76v+f5V zCsiWOkK/sKh0Beu+HO34LEpm6S/gJVIqLcpNac9FIiHMaY5hfsV2J06wB+IeL/xcna3 9YqeR+vI41vNegE1FtCUH+s4HpL95FG13FtyqppYwSutrv39x772uHhU4XiSBntW7Rcm nM7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ZWszpq8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f11-20020a63f74b000000b005b9286ca94csi2624983pgk.700.2023.11.01.02.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 02:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=ZWszpq8o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 10F7080294CE; Wed, 1 Nov 2023 02:19:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234944AbjKAJTJ (ORCPT <rfc822;rbbytesnap@gmail.com> + 35 others); Wed, 1 Nov 2023 05:19:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234999AbjKAJTD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 1 Nov 2023 05:19:03 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87DCC133 for <linux-kernel@vger.kernel.org>; Wed, 1 Nov 2023 02:18:54 -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 D612C1B3C; Wed, 1 Nov 2023 10:18:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698830302; bh=4dopl98SADPr+tiIFKErvb5eH1nysDYoa2k3ZOY9EwM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ZWszpq8oUANaP/RXTq+8FXQitKO5TmuevctXURULcSLeo0/8ZDCk9+mOfMsbYsrXP Ir47j0MBSyVwibN3gBjdS5yGtYdAtlEYfrvQ0gaA0xC2lp9ws82xRyGi79k+QwXrMv HJ1SLaOFbF0r5bdjEt/8NUty0KxuX/9rfHWFVGAs= From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Date: Wed, 01 Nov 2023 11:17:43 +0200 Subject: [PATCH 06/10] drm/tidss: Check for K2G in in dispc_softreset() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231101-tidss-probe-v1-6-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 <a-bhatia1@ti.com>, Devarsh Thakkar <devarsht@ti.com>, Jyri Sarha <jyri.sarha@iki.fi>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1267; i=tomi.valkeinen@ideasonboard.com; h=from:subject:message-id; bh=4dopl98SADPr+tiIFKErvb5eH1nysDYoa2k3ZOY9EwM=; b=owEBbQKS/ZANAwAIAfo9qoy8lh71AcsmYgBlQhfnt2zJRKYOEVKle2omRjKY4to5bnItY7yFV UBMKQX0yUGJAjMEAAEIAB0WIQTEOAw+ll79gQef86f6PaqMvJYe9QUCZUIX5wAKCRD6PaqMvJYe 9YfsD/0RXpaIgePYT1v7DAYeRrhQdYLoVaUMtVgsDAY4cJD5eEkA66MdctQi73YMwSZ5NOwdyjh lu+geIwMOA5veWkJoF1elBDtFM0v654tsHaYcnJFlDauFOebKT1YjIxTlEEsus1ZdA4m79gP+L6 aH1OF0PVmMmhx98F3/COFwgKb7m8V1vplYZrZ0YNcMlji5VpzNd4g50SsE6Z2A3P2ci/i8X/smY x3WUxrdlbRDbXyKCoLbCYXlShIFK0ow65O6uT3jTMl4FjbY2aKkUHGHoTgOGoZ91VxWgtcztj+f 76WWHvhG0LBIWY9vFkwEToQXqlPv8CS1cOuTUKjL6mirU7HdnJkIpx+XyHUJngnA9uh552jIM8G 8f8nWWlMgxAteilgs7C3PCOCXu2u7B/6lHYiXZLdOAoRQufVSHx+nOuSL5MsyTCexCk1K9IVsWg ok6X7WI9yYtF9Z9xDK91a2FV+JgiO22/Y1rN2B3N6KkpXARyzC8NFL+JrFxnEn2fZgI4aWCDMcn +kZDSyVvNuwZyt9e4ABFpTbrZ2P05PXiVKtyFQfKFI+yc6gU8S8LEkrBTS9nY5fiKgZuJJs39sF J0RjkNOPS9ycQTTKW4mk8WuPAcv5HowYqIgv3EtuJgsKIBz+eoOjKuABSZa9LBexI6RxgLjfjMj peHnDQyTmxnO5nA== X-Developer-Key: i=tomi.valkeinen@ideasonboard.com; a=openpgp; fpr=C4380C3E965EFD81079FF3A7FA3DAA8CBC961EF5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 01 Nov 2023 02:19:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781352749630149233 X-GMAIL-MSGID: 1781352749630149233 |
Series |
drm/tidss: Probe related fixes and cleanups
|
|
Commit Message
Tomi Valkeinen
Nov. 1, 2023, 9:17 a.m. UTC
K2G doesn't have softreset feature. Instead of having every caller of
dispc_softreset() check for K2G, move the check into dispc_softreset(),
and make dispc_softreset() return 0 in case of K2G.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
drivers/gpu/drm/tidss/tidss_dispc.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
Comments
Hi Tomi, Thank you for the patch. On Wed, Nov 01, 2023 at 11:17:43AM +0200, Tomi Valkeinen wrote: > K2G doesn't have softreset feature. Instead of having every caller of > dispc_softreset() check for K2G, move the check into dispc_softreset(), > and make dispc_softreset() return 0 in case of K2G. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/tidss/tidss_dispc.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c > index cdbb88289082..f204a0701e9f 100644 > --- a/drivers/gpu/drm/tidss/tidss_dispc.c > +++ b/drivers/gpu/drm/tidss/tidss_dispc.c > @@ -2707,6 +2707,10 @@ static int dispc_softreset(struct dispc_device *dispc) > u32 val; > int ret; > > + /* K2G display controller does not support soft reset */ > + if (dispc->feat->subrev == DISPC_K2G) > + return 0; > + > /* Soft reset */ > REG_FLD_MOD(dispc, DSS_SYSCONFIG, 1, 1, 1); > /* Wait for reset to complete */ > @@ -2831,12 +2835,9 @@ int dispc_init(struct tidss_device *tidss) > > tidss->dispc = dispc; > > - /* K2G display controller does not support soft reset */ > - if (feat->subrev != DISPC_K2G) { > - r = dispc_softreset(dispc); > - if (r) > - return r; > - } > + r = dispc_softreset(dispc); > + if (r) > + return r; > > return 0; > } >
diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c index cdbb88289082..f204a0701e9f 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.c +++ b/drivers/gpu/drm/tidss/tidss_dispc.c @@ -2707,6 +2707,10 @@ static int dispc_softreset(struct dispc_device *dispc) u32 val; int ret; + /* K2G display controller does not support soft reset */ + if (dispc->feat->subrev == DISPC_K2G) + return 0; + /* Soft reset */ REG_FLD_MOD(dispc, DSS_SYSCONFIG, 1, 1, 1); /* Wait for reset to complete */ @@ -2831,12 +2835,9 @@ int dispc_init(struct tidss_device *tidss) tidss->dispc = dispc; - /* K2G display controller does not support soft reset */ - if (feat->subrev != DISPC_K2G) { - r = dispc_softreset(dispc); - if (r) - return r; - } + r = dispc_softreset(dispc); + if (r) + return r; return 0; }