From patchwork Thu Oct 19 05:56:16 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: 155315 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp180881vqb; Wed, 18 Oct 2023 22:58:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmeNIR8InzUS+oQdZZoZOeRBS/tdF9TgVaZphizkRJnUP9G07cV4KTTdCZtzRkCtOupaTD X-Received: by 2002:a17:902:ecce:b0:1c6:e8d:29ea with SMTP id a14-20020a170902ecce00b001c60e8d29eamr1491636plh.60.1697695130250; Wed, 18 Oct 2023 22:58:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697695130; cv=none; d=google.com; s=arc-20160816; b=FWuMLoX+JmGVw6dMOXgzSpub3p0mJMNb6XxxYq0JlE9zzcvI+3J2DzEmj8AJG2WZ0j iswuZjdy8aH1X37Dwpv/V1cM3XC+IhEGAn5smHTE3PTTAe6Z3OJaMmstQvXdQ9vpXZ7d vTRCBGFcgGkE+UA2tl61xFgMouBT0v77ianxOGk2EIjg9nix2Z4p/hFM0iw1GHMtvKcu MU0YYR70gd4ojShCk+XdOFVLp2iGP7vuwmMMVmR9l9i0FyrepA7sHYu8cKsBAxicsZUc UhL1F0mghVzyZDycM7chk6I20GabhbfGTPZ3cA6xGOX894y14HsCnc3uH17lVTWRUH3X 9Fxg== 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=k2fPhvKzJXxpmS8F7tlwbxl0keKqFklc+QL6wsp/6QY=; fh=fv4tbCKTXdNtjEvV4h1+g1nnsRjdLHbhnCNyWnoFRfI=; b=lIDUKJju+R3+Kn9ZenI1pKLcmtujdDkVU4+o1N1zGdW+YrukVEv3t3+SyAFcrmRboM FO+6s5i9chJkYxn60tS8ke4vq549N158ILl32YzTVtMIFNSfe75yhXhiGr18eGmkNvOq wBW+AaYoR03HhWKsYJCuqOaABIGT7jmkl5K/eFzGfiylyqrRDK0alJUca7kkWsJqc4PL JjvD6EEZ9Kn0dy3F2QN48z+emqodIXp2KRzPQuDR/bEQsdAEB5aC3EaA0GY7McCgsAeI timdB+rZKI0r8gJ4D6tCjkdKWZQxGjd+MWsgYwZwHfnaQduME5BfkF4BoQfjvArVOk5K FO6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QVIXGJtE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id e6-20020a170902b78600b001bf3fe55e78si1343072pls.600.2023.10.18.22.58.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 22:58:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QVIXGJtE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id E4DB4810AF7B; Wed, 18 Oct 2023 22:58:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235323AbjJSF6V (ORCPT + 24 others); Thu, 19 Oct 2023 01:58:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232786AbjJSF4l (ORCPT ); Thu, 19 Oct 2023 01:56:41 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4999911D; Wed, 18 Oct 2023 22:56:38 -0700 (PDT) X-UUID: 3c6e97c06e4411ee8051498923ad61e6-20231019 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=k2fPhvKzJXxpmS8F7tlwbxl0keKqFklc+QL6wsp/6QY=; b=QVIXGJtEzPn9XLrgmDt1lNuc5D6Ex2JrUmF+xIcZNp0BRIYyqXJzEz+MDdpuRLpLslUf9JkTmGQaNOkfJg8TEKl4pUoQm7h/MtQJ4FqRm5Dpc67ZpH/f7P63HtRF7zXwY3LL1G2nS3UM2oJ32MJ+N2oOVFoFzxbD9jCfIQp6T7o=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:4be7d2a9-bbfc-4f3f-9b96-30abb69ed538,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:5f78ec9,CLOUDID:caa44dc4-1e57-4345-9d31-31ad9818b39f,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,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_ULN,TF_CID_SPAM_SNR X-UUID: 3c6e97c06e4411ee8051498923ad61e6-20231019 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 263482363; Thu, 19 Oct 2023 13:56:24 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs11n2.mediatek.inc (172.21.101.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 19 Oct 2023 13:56:24 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 19 Oct 2023 13:56:24 +0800 From: Hsiao Chien Sung To: AngeloGioacchino Del Regno , CK Hu , Krzysztof Kozlowski , Matthias Brugger , Rob Herring CC: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Fei Shao , Sean Paul , Johnson Wang , "Nancy . Lin" , Moudy Ho , Hsiao Chien Sung , "Jason-JH . Lin" , Nathan Lu , , , , , Subject: [PATCH v10 21/24] drm/mediatek: Return error if MDP RDMA failed to enable the clock Date: Thu, 19 Oct 2023 13:56:16 +0800 Message-ID: <20231019055619.19358-22-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20231019055619.19358-1-shawn.sung@mediatek.com> References: <20231019055619.19358-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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 18 Oct 2023 22:58:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780162368835761943 X-GMAIL-MSGID: 1780162368835761943 Return the result of clk_prepare_enable() instead of always returns 0. Fixes: f8946e2b6bb2 ("drm/mediatek: Add display MDP RDMA support for MT8195") Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Hsiao Chien Sung --- 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 769ae7564da2..8feeb6dce217 100644 --- a/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c +++ b/drivers/gpu/drm/mediatek/mtk_mdp_rdma.c @@ -263,8 +263,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)