Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp184676rdb; Wed, 1 Nov 2023 23:45:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHoVC/rs4QXjimyEfducrn3n1rMaCI3Fk0fzskhskZZiCQuxj3WktnGSXSEUWfLfbP8Y3yI X-Received: by 2002:a05:6808:2e87:b0:3b5:66af:f8d6 with SMTP id gt7-20020a0568082e8700b003b566aff8d6mr8246531oib.47.1698907504838; Wed, 01 Nov 2023 23:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698907504; cv=none; d=google.com; s=arc-20160816; b=xEhOytXLdyfPm4qUOEKdfXt+JvG1ydYTsKizSfWWPkx2DhhNJ487Waekgp8WvvTpSh 0mB722TABv+B1f71ybrC5HqrHSM/mcoyD1VUD71klkAdF5SPfHJm4I5FYoyeowhl6uLF wZtJg/BBB/1ih2upnOk0Sgcjb347zTdNfWrZRAkXVdk74b44HpRn99aQIP+h8IjFG8ni Ig1MP9YCvJ0/7FZmdVvoC7KpjxvvjQ4X5hxzGwVaGuIA/Kkx2wuMnvzILGipYH1wThAQ S2Jo0xU/D9Y8FGZAD0nrbpLdpIZfRKGs3hBUSHZPEcfVsxqD3pHvUiZuFcY7LpxRam6Z JVNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=V88RR38xmuLslVVqhX7rWJl4QFp/LUPdHw8aqc3kuA0=; fh=OsSgmFzadAUn0DjzfPlpZpO0oO19ZvwhLQFcltgMC98=; b=b+OS3uQcyvdSaV2+T0aZfr50V6uIVLFW1MpThe5yiggZJAIxyyGQie59mqJ5LH6UgV CadBrnXgRSTGHBRzeiiWIGSYTyPTpm/JDL1P31HfUJFuYjyX1KdeMoAMWzQTeXrdhR+j HKCw2D60xymwOAkA0OSWhUKUgLqHIpmjmHEB8aaqK/r2Pxtulcv3iXKT8nNTE5IAwmNB kBsE7BxqgFWnFnpbAeqNbLmVCydb29lYEazslQtp5aFpiJLVtFqQYMqFeQzCCFgAudvA S2bSXzyBFt2x6Hy9RtKWe2HiSKTPwVrSagCOxBjAI9vZvDXEfy0fQXOKH7/eP0XQVPBJ WfbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="WNkWFmn/"; 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 Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o21-20020a656a55000000b005b90b310e26si1544464pgu.403.2023.11.01.23.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 23:45:04 -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="WNkWFmn/"; 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 5E1E881CE112; Wed, 1 Nov 2023 23:45:03 -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 S229580AbjKBGpB (ORCPT + 99 others); Thu, 2 Nov 2023 02:45:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjKBGpA (ORCPT ); Thu, 2 Nov 2023 02:45:00 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86AC5123 for ; Wed, 1 Nov 2023 23:44:54 -0700 (PDT) Received: from [192.168.88.20] (91-158-149-209.elisa-laajakaista.fi [91.158.149.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2E48E667; Thu, 2 Nov 2023 07:44:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698907475; bh=y8Dfqv3Vd9EY7NwnsZJHBtXw59SATw6W0Xla8veD3/E=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WNkWFmn/uGrZ7Zx7+N6AiypSiKTn+OzPwQpWMLRZ00cd7P/yjG/7Oq0uUWZvWGeqj 0UXw9PA/Uz4dPZhwyJmZKaivPRt8Pui0H1ZVJCorKVL7xC9IcZcYT1N9r9bpMg0RoJ pGcjg7B7HXDikcGG00n5TpvY0tGkJSV29iw7odzM= Message-ID: Date: Thu, 2 Nov 2023 08:44:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 05/10] drm/tidss: Return error value from from softreset Content-Language: en-US To: Laurent Pinchart Cc: Aradhya Bhatia , Devarsh Thakkar , Jyri Sarha , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20231101-tidss-probe-v1-0-45149e0f9415@ideasonboard.com> <20231101-tidss-probe-v1-5-45149e0f9415@ideasonboard.com> <20231101135951.GU12764@pendragon.ideasonboard.com> From: Tomi Valkeinen Autocrypt: addr=tomi.valkeinen@ideasonboard.com; keydata= xsFNBE6ms0cBEACyizowecZqXfMZtnBniOieTuFdErHAUyxVgtmr0f5ZfIi9Z4l+uUN4Zdw2 wCEZjx3o0Z34diXBaMRJ3rAk9yB90UJAnLtb8A97Oq64DskLF81GCYB2P1i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YAQIACQUCTqazRwIbDAAKCRD6PaqMvJYe 9fA7EACS6exUedsBKmt4pT7nqXBcRsqm6YzT6DeCM8PWMTeaVGHiR4TnNFiT3otD5UpYQI7S suYxoTdHrrrBzdlKe5rUWpzoZkVK6p0s9OIvGzLT0lrb0HC9iNDWT3JgpYDnk4Z2mFi6tTbq xKMtpVFRA6FjviGDRsfkfoURZI51nf2RSAk/A8BEDDZ7lgJHskYoklSpwyrXhkp9FHGMaYII m9EKuUTX9JPDG2FTthCBrdsgWYPdJQvM+zscq09vFMQ9Fykbx5N8z/oFEUy3ACyPqW2oyfvU CH5WDpWBG0s5BALp1gBJPytIAd/pY/5ZdNoi0Cx3+Z7jaBFEyYJdWy1hGddpkgnMjyOfLI7B CFrdecTZbR5upjNSDvQ7RG85SnpYJTIin+SAUazAeA2nS6gTZzumgtdw8XmVXZwdBfF+ICof 92UkbYcYNbzWO/GHgsNT1WnM4sa9lwCSWH8Fw1o/3bX1VVPEsnESOfxkNdu+gAF5S6+I6n3a ueeIlwJl5CpT5l8RpoZXEOVtXYn8zzOJ7oGZYINRV9Pf8qKGLf3Dft7zKBP832I3PQjeok7F yjt+9S+KgSFSHP3Pa4E7lsSdWhSlHYNdG/czhoUkSCN09C0rEK93wxACx3vtxPLjXu6RptBw 3dRq7n+mQChEB1am0BueV1JZaBboIL0AGlSJkm23kw== In-Reply-To: <20231101135951.GU12764@pendragon.ideasonboard.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: 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 23:45:03 -0700 (PDT) On 01/11/2023 15:59, Laurent Pinchart wrote: > Hi Tomi, > > Thank you for the patch. > > On Wed, Nov 01, 2023 at 11:17:42AM +0200, Tomi Valkeinen wrote: >> Return an error value from dispc_softreset() so that the caller can >> handle the errors. >> >> Signed-off-by: Tomi Valkeinen >> --- >> drivers/gpu/drm/tidss/tidss_dispc.c | 17 ++++++++++++----- >> 1 file changed, 12 insertions(+), 5 deletions(-) >> >> diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c >> index 9430625e2d62..cdbb88289082 100644 >> --- a/drivers/gpu/drm/tidss/tidss_dispc.c >> +++ b/drivers/gpu/drm/tidss/tidss_dispc.c >> @@ -2702,7 +2702,7 @@ static void dispc_init_errata(struct dispc_device *dispc) >> } >> } >> >> -static void dispc_softreset(struct dispc_device *dispc) >> +static int dispc_softreset(struct dispc_device *dispc) >> { >> u32 val; >> int ret; >> @@ -2712,8 +2712,12 @@ static void dispc_softreset(struct dispc_device *dispc) >> /* Wait for reset to complete */ >> ret = readl_poll_timeout(dispc->base_common + DSS_SYSSTATUS, >> val, val & 1, 100, 5000); >> - if (ret) >> - dev_warn(dispc->dev, "failed to reset dispc\n"); >> + if (ret) { >> + dev_err(dispc->dev, "failed to reset dispc\n"); >> + return ret; >> + } >> + >> + return 0; >> } >> >> int dispc_init(struct tidss_device *tidss) >> @@ -2828,8 +2832,11 @@ 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); >> + if (feat->subrev != DISPC_K2G) { >> + r = dispc_softreset(dispc); >> + if (r) >> + return r; > > tidss->dispc will be set in this case. Could that cause problems ? Not at the moment, but better be safe. I'll move the reset a few lines higher. Tomi