From patchwork Mon Mar 14 08:10:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 8577371 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C04819F54C for ; Mon, 14 Mar 2016 08:37:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D606C2044B for ; Mon, 14 Mar 2016 08:37:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 101DE20398 for ; Mon, 14 Mar 2016 08:37:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C932B6E61B; Mon, 14 Mar 2016 08:37:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 2014 seconds by postgrey-1.35 at gabe; Mon, 14 Mar 2016 08:37:20 UTC Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0099.outbound.protection.outlook.com [65.55.169.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 711236E61B for ; Mon, 14 Mar 2016 08:37:20 +0000 (UTC) Received: from DM2PR03CA0024.namprd03.prod.outlook.com (10.141.96.23) by CY1PR0301MB1593.namprd03.prod.outlook.com (10.162.166.19) with Microsoft SMTP Server (TLS) id 15.1.443.7; Mon, 14 Mar 2016 08:03:42 +0000 Received: from BN1BFFO11FD012.protection.gbl (2a01:111:f400:7c10::1:121) by DM2PR03CA0024.outlook.office365.com (2a01:111:e400:2428::23) with Microsoft SMTP Server (TLS) id 15.1.434.16 via Frontend Transport; Mon, 14 Mar 2016 08:03:42 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=gmail.com; linux.ie; dkim=none (message not signed) header.d=none; linux.ie; dmarc=fail action=none header.from=gmail.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 192.88.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD012.mail.protection.outlook.com (10.58.144.75) with Microsoft SMTP Server (TLS) id 15.1.434.11 via Frontend Transport; Mon, 14 Mar 2016 08:03:41 +0000 Received: from victor.ap.freescale.net (victor.ap.freescale.net [10.192.241.62]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u2E83aDC021368; Mon, 14 Mar 2016 01:03:39 -0700 From: Liu Ying To: Subject: [PATCH 2/4] gpu: ipu-v3: ipu-dmfc: Make function ipu_dmfc_init_channel() return void Date: Mon, 14 Mar 2016 16:10:09 +0800 Message-ID: <1457943011-20542-2-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457943011-20542-1-git-send-email-gnuiyl@gmail.com> References: <1457943011-20542-1-git-send-email-gnuiyl@gmail.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131024162216930287; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(189002)(199003)(6260500002)(86362001)(82202001)(55446002)(33646002)(5003940100001)(73972006)(19580395003)(50986999)(76176999)(83322999)(48376002)(92566002)(87572001)(4326007)(2906002)(50226001)(1220700001)(1096002)(47776003)(87936001)(6806005)(76482005)(2351001)(5008740100001)(104016004)(110136002)(229853001)(81166005)(189998001)(11100500001)(2950100001)(586003)(36756003)(81442002)(73392002)(77096005)(105596002)(50466002)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1593; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD012; 1:kfD59xrhf5TSr0mZFTEiKAv3yumug5xUTsFBo7ySRmKqsAxuwEBvZ5B+GV0bQETsfi4wuL8wjzven3/tbEK72hXr2TefKHYZPow4TOmgzAsG56RtIiWoEuACe27jj4+bvFNtPLPfrWQ1srXTFEW5xdyv+ftF+2BDAUsmOUmL7y9+23SRgJ+QzmOafnNiUTX3VKhUrJXICfjKkO32yCffckjH4yA0lr8dnByho+QXcwHy0owgziNaSa6AFGDQD6C0bQmZKRjLpT46dSgwEPlX9pUHCflBV7WBmbS6RuVo+lBiq44iEEyR4h+R0cj43qGLUP30GjLBIup5xd/WEQo+OKQkaVXGU3RnAHai1oEILIJRk5sQmALrhgTo+ZKO66nWSakaFelgGlU7ND7NduNkEaV4klIli+dVOFllYsvtxmGLJHGGlTCbjHMvJ+LFwpcTmnz2JTD2Cq9QJ8TgI8ZE+IxS7oiD7qtunf1iIAkT2i/jnlgSs1bCCOu28l/mjsQH MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: f6aa2a5f-68f9-42f7-8a8e-08d34bdf2863 X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1593; 2:QHKVLO8OKStO7GUzU5ThZ3Iqq0QQzi9CvhUJa2sM1AUpzbpoeq+VghPV9w3YFBQHTTlXSdh3NMEQq7pGsqEtmA8Tglmd7WlNlWh3wF+eYyqiVIBBDH7JjUdvNm02qmu/DqI+qPAf/UQRKspdM+D15r/sla/XTOFd9S7ASPfu3IyzkS95imzqqWiqf/5QAAkP; 3:boWfv2Uzgg0CVY6ov1tSNZigk45Br7vM4TE06qtye8qdy7sFZ8+cbWyZ1x3STyAQhjpD60fgQmA3CcapxZxlWmY1l6jzXHfFH2MO1lrJEI2DHETuvHZB48HzcpF4CjDpGGpakKOgbcbKyrRI3IWE4i+Oeycsv2p7aY/i/m2nIoYe8TxRBIJgANjLmSZd4S33iyF+MId0I3IP0q/is7BrvVwDGZ3rTYjWBozWtTUBOtc=; 25:joatM6VaYNJkMgMKr5UfpvWRcEVyOV+7lCbDroTaha+bm3Qn4I7OOCKxT2oJI1mUn70/4h1KRg+HLVA+KZcSlZn3+Sl2NHV2l4nImw/AfWgpJF5od867tgUGTzy4ntfJLbSSHHt3+t6EAESs6Ti2Wz6tOxpoy0bEDmCVLlphBeUiqD1KU6sD8AvDhZ7IY0uhZlFJwsZE5eB06jqdbvGff4y1R6FiiLEVy0SdxNhZEierfPMM3NDmaYTCwBFfCAUPB/xanIIUa1yk5cycpZ+0gWWrwYdL2omjDOtkQYrd4kCXOPA/f90HzNtj3yGUJ3kSsmvi209JgdasxMF9Ju4oAAeZBqhqVOoihG+3+AJv0yyaeCILPWVU/E3AQ6xocR5XGG1VAMiPOePCUl+T8olftw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1593; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13017025)(13023025)(13024025)(5005006)(8121501046)(13018025)(3002001)(10201501046); SRVR:CY1PR0301MB1593; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB1593; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1593; 4:gQuvxJ2xSXtlKfNG3NSGIn0IlaKFMmqqsl+o/eAjitnWVoJpmEoJ5k1pUxzIQg9Bap0PE+2HZpHPzx9LAOcPP4g4pXatOzvQ53/wVRo0xvHJhHevEiTNwS0koggLvRKXeRmssF97DE2qzomTVPETjhi2R9OerCzS+ZN730MkOVNky/5iA09GOTmBYSsyuC2pRNTzzTIiE0gPdm9AVPfHV4WSOPJnX4GdlMnrf8FFr7VsMW+pMVwtElz2rUdWeSoMhio4krpAHmVQaEjrDXCZCWM173ofStPmS4TQY0gIJ7uQ+x3plrnAf77A2y3ts3V8uZmx9azM3rMjnLsQfa+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3hUAVYl1oLfQcAMwgANiSVIOs7fCctqdqOa+Gq5VMtA+Nt2d22K6i0hP6m?= =?us-ascii?Q?pwIIPpYmTvPOlLtPazfAENxwDW9Dbv/E+UdbkqtE6lcwZnFvss/JQToRXt9v?= =?us-ascii?Q?+RfyjqPPVQcfUnM3s2N/fkE8SkO5wgPns4f9plAWecMS3RBR3ksyVEzRB0/o?= =?us-ascii?Q?fnwOA/7ZmiuHSTg/OKhw4/A59V9cDEmrokfBS55BkFeN2KuLmhnpIv+ms+uN?= =?us-ascii?Q?QwEdLpglXll2r+LHRFC7pJ24dxzeP0ZkmoO1GnZKWFY3DkXQdmfvhYkjP5tS?= =?us-ascii?Q?u6JHmz4EVbTA8bsXqEqutlgrxkEjNrz4wyTuSiZ7krwDjSXVs9YwWVDpfA3D?= =?us-ascii?Q?F2MJrX5YdTF2ried4BHH7XzsomwIqVdN/itiegqvM/FJsmV7S9wFHu+WczaF?= =?us-ascii?Q?S+3PB2WEPuSkxnf0qb2e77S+Gv3HJOmR6?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1593; 5:X4hPb6Gf3a9WM0PtqGVJShYfz1+FRTqTpOQsWp8OoFrekFKOWUKFNcm0qHEGvJIX6wUy6c/jHsizhlNaySHnO4CoP4EprJPxTETiyQtuzJ33UFxgOg5SSpM05d+8MLzOx3ZybBDS5z9Iun/3+BOpaNH/jO8yA+EDtVbmfME7KLk=; 24:b2HAmi2TJ9/N59YRWm3sKrIq6uWTAisAmIX2bntATBy+AZEAUUk2l8QU71rtvUeYuzsVrDYJmqvz9N5tRshGuOXpRRl/MmeeR+6iaEVxdtc= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2016 08:03:41.4746 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1593 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the function ipu_dmfc_init_channel() always returns zero, we may change the return type to void to simplify the code. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-plane.c | 6 +----- drivers/gpu/ipu-v3/ipu-dmfc.c | 4 +--- include/video/imx-ipu-v3.h | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index d078373..0faf84a 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -200,11 +200,7 @@ int ipu_plane_mode_set(struct ipu_plane *ipu_plane, struct drm_crtc *crtc, } } - ret = ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w); - if (ret) { - dev_err(dev, "initializing dmfc channel failed with %d\n", ret); - return ret; - } + ipu_dmfc_init_channel(ipu_plane->dmfc, crtc_w); ret = ipu_dmfc_alloc_bandwidth(ipu_plane->dmfc, calc_bandwidth(crtc_w, crtc_h, diff --git a/drivers/gpu/ipu-v3/ipu-dmfc.c b/drivers/gpu/ipu-v3/ipu-dmfc.c index 129ccfa..3aa9878 100644 --- a/drivers/gpu/ipu-v3/ipu-dmfc.c +++ b/drivers/gpu/ipu-v3/ipu-dmfc.c @@ -350,7 +350,7 @@ out: } EXPORT_SYMBOL_GPL(ipu_dmfc_alloc_bandwidth); -int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width) +void ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width) { struct ipu_dmfc_priv *priv = dmfc->priv; u32 dmfc_gen1; @@ -367,8 +367,6 @@ int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width) writel(dmfc_gen1, priv->base + DMFC_GENERAL1); mutex_unlock(&priv->mutex); - - return 0; } EXPORT_SYMBOL_GPL(ipu_dmfc_init_channel); diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index eeba753..07dfc41 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -236,7 +236,7 @@ void ipu_dmfc_disable_channel(struct dmfc_channel *dmfc); int ipu_dmfc_alloc_bandwidth(struct dmfc_channel *dmfc, unsigned long bandwidth_mbs, int burstsize); void ipu_dmfc_free_bandwidth(struct dmfc_channel *dmfc); -int ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width); +void ipu_dmfc_init_channel(struct dmfc_channel *dmfc, int width); struct dmfc_channel *ipu_dmfc_get(struct ipu_soc *ipu, int ipuv3_channel); void ipu_dmfc_put(struct dmfc_channel *dmfc);