From patchwork Fri Oct 6 07:38:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?U2hhd24gU3VuZyAo5a6L5a2d6KyZKQ==?= X-Patchwork-Id: 149142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a888:0:b0:403:3b70:6f57 with SMTP id x8csp149756vqo; Fri, 6 Oct 2023 00:41:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXV2289AwsXUtHwv8/bE7GJFz1t/6LaPdL0hM6t8XmFcUq/RSkoe3+BgAOCA70K9ommo4O X-Received: by 2002:a25:da8a:0:b0:d81:97c:c01e with SMTP id n132-20020a25da8a000000b00d81097cc01emr7189620ybf.5.1696578073938; Fri, 06 Oct 2023 00:41:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696578073; cv=none; d=google.com; s=arc-20160816; b=wy1iznQLfaXBE7bmQ+8Q3Hs5dyO/dhDVpfYYRsbpgZrLbw3X5Jm2YLuannkSqzNMZx KiXF+QVkYR5DNMVnYwvty08tEoMRVmpaCuqoLLiCTF4fytQe+t8QaiZIp9N/UX063CLW NF+sUjVURCnd/270xuiVgD4fl4Oamp14vIFyHlLqu45AZ1CYvtrYhjU635k1P8MVqHUc 0LWhOAQ1hTFbMPW3hUysNiS6WllB1PHsD+m5dl+xDlcI0Wc2rg2TOVZcwqCdeFM+jvr9 acXQcWnsuLJku5gcEIitC8ydUcCI6CfgUSR0cuBq5llnxKlX8jqMob6Jp867GbuLh0SP XdPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=gIlRZMTlZ8FvDxEBaKzMig8ya2slnQBMy/v7Mc6iXpI=; fh=SdaOB8wyhjb8jZGt+kwBIYyXxl3p6ymFmN2Dlnz7JCc=; b=eJsYbD2cVvABTLCOdAO/siwHRo2C829tTIjcmwY2Kk4UvimB/NEuDgi2qniOU7vKt8 EanQsOern7HGVQiPmQt7w3d4iKTQ2eUyWLIzKtCPUtSj66JlySzfzgNbO+U47aYTOOJM jQ1IMasShed8cwn7agxC+ZOfaAt7VXZAzlNuD183Zh6Xnk2ECzFl4JaItwC3sXWrGdpi YCVi+tMPd1onlvCgo2I5mXbkbAurye+tBqjx/KMfenJAgHWa7xqGY1wvzKpAXE/j+TEX ojzBm/8aXiFNmm0jCsd/2IoivkuL5D9p0EF1JHgUiwaohK1zcOpKnZvRXwlcNXlEzhke 4hJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=jH38Vf5s; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id p24-20020a63f458000000b0056a670ebd73si3197504pgk.498.2023.10.06.00.41.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 00:41:13 -0700 (PDT) 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=@mediatek.com header.s=dk header.b=jH38Vf5s; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4207180BD509; Fri, 6 Oct 2023 00:41:10 -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 S230508AbjJFHjy (ORCPT + 18 others); Fri, 6 Oct 2023 03:39:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230431AbjJFHi6 (ORCPT ); Fri, 6 Oct 2023 03:38:58 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E34D4100; Fri, 6 Oct 2023 00:38:46 -0700 (PDT) X-UUID: 5ed0dda6641b11eea33bb35ae8d461a2-20231006 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=gIlRZMTlZ8FvDxEBaKzMig8ya2slnQBMy/v7Mc6iXpI=; b=jH38Vf5s5tmXwDXkD3uN3X9XX747LPM1fQT5QRKZPL1B/3SqD2VfWnAoXXygZo7UkJIqnp+B3byizFFJAuaYCRzcGo3yiYU4zW5tNmPOFi+fFRfkLTAzzgRGF2GXXJwi8inqzddBZIwFnM1QmqTcfv4pe96oFF+a0pmErS9pEi4=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:69c986a6-8a5c-4feb-83d9-e96ee8d4d538,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:5f78ec9,CLOUDID:96db82f0-9a6e-4c39-b73e-f2bc08ca3dc5,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-UUID: 5ed0dda6641b11eea33bb35ae8d461a2-20231006 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1750975016; Fri, 06 Oct 2023 15:38:41 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Fri, 6 Oct 2023 15:38:40 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 6 Oct 2023 15:38:40 +0800 From: Hsiao Chien Sung To: AngeloGioacchino Del Regno , CK Hu , Krzysztof Kozlowski , Matthias Brugger , Rob Herring CC: Conor Dooley , Philipp Zabel , David Airlie , Daniel Vetter , Chun-Kuang Hu , Mauro Carvalho Chehab , , , , , , Singo Chang , "Nancy . Lin" , "Jason-JH . Lin" , Hsiao Chien Sung Subject: [PATCH v7 19/23] drm/mediatek: Return error if MDP RDMA failed to enable the clock Date: Fri, 6 Oct 2023 15:38:27 +0800 Message-ID: <20231006073831.10402-20-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231006073831.10402-1-shawn.sung@mediatek.com> References: <20231006073831.10402-1-shawn.sung@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY 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]); Fri, 06 Oct 2023 00:41:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778991050267250199 X-GMAIL-MSGID: 1778991050267250199 Return the result of clk_prepare_enable() instead of always returns 0. Fixes: f8946e2b6bb2 ("drm/mediatek: Add display MDP RDMA support for MT8195") Signed-off-by: Hsiao Chien Sung Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c b/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c index c3adaeefd551..c7233d0ac210 100644 --- a/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c +++ b/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c @@ -246,8 +246,7 @@ int mtk_mdp_rdma_clk_enable(struct device *dev) { struct mtk_mdp_rdma *rdma = dev_get_drvdata(dev); - clk_prepare_enable(rdma->clk); - return 0; + return clk_prepare_enable(rdma->clk); } void mtk_mdp_rdma_clk_disable(struct device *dev)