From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 114AEC43603 for ; Tue, 10 Dec 2019 20:34:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E0CDD2077B for ; Tue, 10 Dec 2019 20:34:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727144AbfLJUeZ (ORCPT ); Tue, 10 Dec 2019 15:34:25 -0500 Received: from asavdk3.altibox.net ([109.247.116.14]:47468 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725999AbfLJUeY (ORCPT ); Tue, 10 Dec 2019 15:34:24 -0500 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 960AF20061; Tue, 10 Dec 2019 21:34:20 +0100 (CET) Date: Tue, 10 Dec 2019 21:34:19 +0100 From: Sam Ravnborg To: Claudiu Beznea Cc: bbrezillon@kernel.org, airlied@linux.ie, daniel@ffwll.ch, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, lee.jones@linaro.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sandeep Sheriker Mallikarjun Subject: Re: [PATCH 5/5] Revert "drm: atmel-hlcdc: enable sys_clk during initalization." Message-ID: <20191210203419.GB24756@ravnborg.org> References: <1575984287-26787-1-git-send-email-claudiu.beznea@microchip.com> <1575984287-26787-6-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1575984287-26787-6-git-send-email-claudiu.beznea@microchip.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=eMA9ckh1 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=XYAwZIGsAAAA:8 a=vRqltxJg2XVFi9nfVjoA:9 a=CjuIK1q_8ugA:10 a=E8ToXWR_bxluHZ7gmE-Z:22 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Cladiu On Tue, Dec 10, 2019 at 03:24:47PM +0200, Claudiu Beznea wrote: > This reverts commit d2c755e66617620b729041c625a6396c81d1231c. > ("drm: atmel-hlcdc: enable sys_clk during initalization."). With > commit "drm: atmel-hlcdc: enable clock before configuring timing engine" > there is no need for this patch. Code is also simpler. > > Cc: Sandeep Sheriker Mallikarjun > Signed-off-by: Claudiu Beznea Getting further in the patches tells me you looked at the patch I referenced in previous mail. Please squash the two patches together - that would make it easier to follow what is done. With the two patches applied sysclk is enabled only in mode_set_nofb() and atomic_enable(). And disabled in atomic_disable(). This is simpler and we drop the conditionals. Also good. So the end result looks OK. Sam > --- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 19 +------------------ > 1 file changed, 1 insertion(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > index 8dc917a1270b..112aa5066cee 100644 > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > @@ -721,18 +721,10 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) > dc->hlcdc = dev_get_drvdata(dev->dev->parent); > dev->dev_private = dc; > > - if (dc->desc->fixed_clksrc) { > - ret = clk_prepare_enable(dc->hlcdc->sys_clk); > - if (ret) { > - dev_err(dev->dev, "failed to enable sys_clk\n"); > - goto err_destroy_wq; > - } > - } > - > ret = clk_prepare_enable(dc->hlcdc->periph_clk); > if (ret) { > dev_err(dev->dev, "failed to enable periph_clk\n"); > - goto err_sys_clk_disable; > + goto err_destroy_wq; > } > > pm_runtime_enable(dev->dev); > @@ -768,9 +760,6 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) > err_periph_clk_disable: > pm_runtime_disable(dev->dev); > clk_disable_unprepare(dc->hlcdc->periph_clk); > -err_sys_clk_disable: > - if (dc->desc->fixed_clksrc) > - clk_disable_unprepare(dc->hlcdc->sys_clk); > > err_destroy_wq: > destroy_workqueue(dc->wq); > @@ -795,8 +784,6 @@ static void atmel_hlcdc_dc_unload(struct drm_device *dev) > > pm_runtime_disable(dev->dev); > clk_disable_unprepare(dc->hlcdc->periph_clk); > - if (dc->desc->fixed_clksrc) > - clk_disable_unprepare(dc->hlcdc->sys_clk); > destroy_workqueue(dc->wq); > } > > @@ -910,8 +897,6 @@ static int atmel_hlcdc_dc_drm_suspend(struct device *dev) > regmap_read(regmap, ATMEL_HLCDC_IMR, &dc->suspend.imr); > regmap_write(regmap, ATMEL_HLCDC_IDR, dc->suspend.imr); > clk_disable_unprepare(dc->hlcdc->periph_clk); > - if (dc->desc->fixed_clksrc) > - clk_disable_unprepare(dc->hlcdc->sys_clk); > > return 0; > } > @@ -921,8 +906,6 @@ static int atmel_hlcdc_dc_drm_resume(struct device *dev) > struct drm_device *drm_dev = dev_get_drvdata(dev); > struct atmel_hlcdc_dc *dc = drm_dev->dev_private; > > - if (dc->desc->fixed_clksrc) > - clk_prepare_enable(dc->hlcdc->sys_clk); > clk_prepare_enable(dc->hlcdc->periph_clk); > regmap_write(dc->hlcdc->regmap, ATMEL_HLCDC_IER, dc->suspend.imr); > > -- > 2.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBC8CC43603 for ; Tue, 10 Dec 2019 20:34:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9EBB520652 for ; Tue, 10 Dec 2019 20:34:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TAaMiDhL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EBB520652 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wG034lM9VpyoHCDU6YioPjB3H/m248kmiu1KH3H/hmU=; b=TAaMiDhLKPaDxA 80myBoev09DV2rZqHS4iWJkcgzDjrQOTtRnWS9UyKp5nKOYAOD0iQ1cpsAuVmCHvmeLDkvvzaQKfQ jWV5UyLY8j+WjXfcQOws3WF9ejzNLM1t6E3JBMPse04xTU+8yY+blzyEVQ64vg/S5HZVN9UvpcgtP lhg2pFT8I5SjxxFNj4T5vppNxHdw/OAR6nGt+Oq1zmCgIGHQE37jfabD4XrN2Ws2PgOtp1aavaV8O 9sJJ1N8OSc9Py2/wsa+D1AzvubYvq1X5cnass6GjMmeSr/DIkEGUj23kcvtLaRkp8a//typLK0sxw 8fjN+c3tRC/xx3h+Eqyw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iemDY-0003GD-Ie; Tue, 10 Dec 2019 20:34:48 +0000 Received: from asavdk3.altibox.net ([109.247.116.14]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iemDA-0002r9-GG for linux-arm-kernel@lists.infradead.org; Tue, 10 Dec 2019 20:34:26 +0000 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 960AF20061; Tue, 10 Dec 2019 21:34:20 +0100 (CET) Date: Tue, 10 Dec 2019 21:34:19 +0100 From: Sam Ravnborg To: Claudiu Beznea Subject: Re: [PATCH 5/5] Revert "drm: atmel-hlcdc: enable sys_clk during initalization." Message-ID: <20191210203419.GB24756@ravnborg.org> References: <1575984287-26787-1-git-send-email-claudiu.beznea@microchip.com> <1575984287-26787-6-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1575984287-26787-6-git-send-email-claudiu.beznea@microchip.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=eMA9ckh1 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=XYAwZIGsAAAA:8 a=vRqltxJg2XVFi9nfVjoA:9 a=CjuIK1q_8ugA:10 a=E8ToXWR_bxluHZ7gmE-Z:22 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191210_123424_916210_67052D6B X-CRM114-Status: GOOD ( 19.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, bbrezillon@kernel.org, airlied@linux.ie, Sandeep Sheriker Mallikarjun , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, ludovic.desroches@microchip.com, daniel@ffwll.ch, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Cladiu On Tue, Dec 10, 2019 at 03:24:47PM +0200, Claudiu Beznea wrote: > This reverts commit d2c755e66617620b729041c625a6396c81d1231c. > ("drm: atmel-hlcdc: enable sys_clk during initalization."). With > commit "drm: atmel-hlcdc: enable clock before configuring timing engine" > there is no need for this patch. Code is also simpler. > > Cc: Sandeep Sheriker Mallikarjun > Signed-off-by: Claudiu Beznea Getting further in the patches tells me you looked at the patch I referenced in previous mail. Please squash the two patches together - that would make it easier to follow what is done. With the two patches applied sysclk is enabled only in mode_set_nofb() and atomic_enable(). And disabled in atomic_disable(). This is simpler and we drop the conditionals. Also good. So the end result looks OK. Sam > --- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 19 +------------------ > 1 file changed, 1 insertion(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > index 8dc917a1270b..112aa5066cee 100644 > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > @@ -721,18 +721,10 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) > dc->hlcdc = dev_get_drvdata(dev->dev->parent); > dev->dev_private = dc; > > - if (dc->desc->fixed_clksrc) { > - ret = clk_prepare_enable(dc->hlcdc->sys_clk); > - if (ret) { > - dev_err(dev->dev, "failed to enable sys_clk\n"); > - goto err_destroy_wq; > - } > - } > - > ret = clk_prepare_enable(dc->hlcdc->periph_clk); > if (ret) { > dev_err(dev->dev, "failed to enable periph_clk\n"); > - goto err_sys_clk_disable; > + goto err_destroy_wq; > } > > pm_runtime_enable(dev->dev); > @@ -768,9 +760,6 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) > err_periph_clk_disable: > pm_runtime_disable(dev->dev); > clk_disable_unprepare(dc->hlcdc->periph_clk); > -err_sys_clk_disable: > - if (dc->desc->fixed_clksrc) > - clk_disable_unprepare(dc->hlcdc->sys_clk); > > err_destroy_wq: > destroy_workqueue(dc->wq); > @@ -795,8 +784,6 @@ static void atmel_hlcdc_dc_unload(struct drm_device *dev) > > pm_runtime_disable(dev->dev); > clk_disable_unprepare(dc->hlcdc->periph_clk); > - if (dc->desc->fixed_clksrc) > - clk_disable_unprepare(dc->hlcdc->sys_clk); > destroy_workqueue(dc->wq); > } > > @@ -910,8 +897,6 @@ static int atmel_hlcdc_dc_drm_suspend(struct device *dev) > regmap_read(regmap, ATMEL_HLCDC_IMR, &dc->suspend.imr); > regmap_write(regmap, ATMEL_HLCDC_IDR, dc->suspend.imr); > clk_disable_unprepare(dc->hlcdc->periph_clk); > - if (dc->desc->fixed_clksrc) > - clk_disable_unprepare(dc->hlcdc->sys_clk); > > return 0; > } > @@ -921,8 +906,6 @@ static int atmel_hlcdc_dc_drm_resume(struct device *dev) > struct drm_device *drm_dev = dev_get_drvdata(dev); > struct atmel_hlcdc_dc *dc = drm_dev->dev_private; > > - if (dc->desc->fixed_clksrc) > - clk_prepare_enable(dc->hlcdc->sys_clk); > clk_prepare_enable(dc->hlcdc->periph_clk); > regmap_write(dc->hlcdc->regmap, ATMEL_HLCDC_IER, dc->suspend.imr); > > -- > 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14282C43603 for ; Tue, 10 Dec 2019 20:34:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E78972077B for ; Tue, 10 Dec 2019 20:34:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E78972077B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 08C0A6E92C; Tue, 10 Dec 2019 20:34:24 +0000 (UTC) Received: from asavdk3.altibox.net (asavdk3.altibox.net [109.247.116.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id D49CE6E92C for ; Tue, 10 Dec 2019 20:34:22 +0000 (UTC) Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 960AF20061; Tue, 10 Dec 2019 21:34:20 +0100 (CET) Date: Tue, 10 Dec 2019 21:34:19 +0100 From: Sam Ravnborg To: Claudiu Beznea Subject: Re: [PATCH 5/5] Revert "drm: atmel-hlcdc: enable sys_clk during initalization." Message-ID: <20191210203419.GB24756@ravnborg.org> References: <1575984287-26787-1-git-send-email-claudiu.beznea@microchip.com> <1575984287-26787-6-git-send-email-claudiu.beznea@microchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1575984287-26787-6-git-send-email-claudiu.beznea@microchip.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=eMA9ckh1 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=XYAwZIGsAAAA:8 a=vRqltxJg2XVFi9nfVjoA:9 a=CjuIK1q_8ugA:10 a=E8ToXWR_bxluHZ7gmE-Z:22 a=pHzHmUro8NiASowvMSCR:22 a=Ew2E2A-JSTLzCXPT_086:22 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, bbrezillon@kernel.org, airlied@linux.ie, Sandeep Sheriker Mallikarjun , nicolas.ferre@microchip.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, ludovic.desroches@microchip.com, lee.jones@linaro.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Cladiu On Tue, Dec 10, 2019 at 03:24:47PM +0200, Claudiu Beznea wrote: > This reverts commit d2c755e66617620b729041c625a6396c81d1231c. > ("drm: atmel-hlcdc: enable sys_clk during initalization."). With > commit "drm: atmel-hlcdc: enable clock before configuring timing engine" > there is no need for this patch. Code is also simpler. > > Cc: Sandeep Sheriker Mallikarjun > Signed-off-by: Claudiu Beznea Getting further in the patches tells me you looked at the patch I referenced in previous mail. Please squash the two patches together - that would make it easier to follow what is done. With the two patches applied sysclk is enabled only in mode_set_nofb() and atomic_enable(). And disabled in atomic_disable(). This is simpler and we drop the conditionals. Also good. So the end result looks OK. Sam > --- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 19 +------------------ > 1 file changed, 1 insertion(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > index 8dc917a1270b..112aa5066cee 100644 > --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > @@ -721,18 +721,10 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) > dc->hlcdc = dev_get_drvdata(dev->dev->parent); > dev->dev_private = dc; > > - if (dc->desc->fixed_clksrc) { > - ret = clk_prepare_enable(dc->hlcdc->sys_clk); > - if (ret) { > - dev_err(dev->dev, "failed to enable sys_clk\n"); > - goto err_destroy_wq; > - } > - } > - > ret = clk_prepare_enable(dc->hlcdc->periph_clk); > if (ret) { > dev_err(dev->dev, "failed to enable periph_clk\n"); > - goto err_sys_clk_disable; > + goto err_destroy_wq; > } > > pm_runtime_enable(dev->dev); > @@ -768,9 +760,6 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev) > err_periph_clk_disable: > pm_runtime_disable(dev->dev); > clk_disable_unprepare(dc->hlcdc->periph_clk); > -err_sys_clk_disable: > - if (dc->desc->fixed_clksrc) > - clk_disable_unprepare(dc->hlcdc->sys_clk); > > err_destroy_wq: > destroy_workqueue(dc->wq); > @@ -795,8 +784,6 @@ static void atmel_hlcdc_dc_unload(struct drm_device *dev) > > pm_runtime_disable(dev->dev); > clk_disable_unprepare(dc->hlcdc->periph_clk); > - if (dc->desc->fixed_clksrc) > - clk_disable_unprepare(dc->hlcdc->sys_clk); > destroy_workqueue(dc->wq); > } > > @@ -910,8 +897,6 @@ static int atmel_hlcdc_dc_drm_suspend(struct device *dev) > regmap_read(regmap, ATMEL_HLCDC_IMR, &dc->suspend.imr); > regmap_write(regmap, ATMEL_HLCDC_IDR, dc->suspend.imr); > clk_disable_unprepare(dc->hlcdc->periph_clk); > - if (dc->desc->fixed_clksrc) > - clk_disable_unprepare(dc->hlcdc->sys_clk); > > return 0; > } > @@ -921,8 +906,6 @@ static int atmel_hlcdc_dc_drm_resume(struct device *dev) > struct drm_device *drm_dev = dev_get_drvdata(dev); > struct atmel_hlcdc_dc *dc = drm_dev->dev_private; > > - if (dc->desc->fixed_clksrc) > - clk_prepare_enable(dc->hlcdc->sys_clk); > clk_prepare_enable(dc->hlcdc->periph_clk); > regmap_write(dc->hlcdc->regmap, ATMEL_HLCDC_IER, dc->suspend.imr); > > -- > 2.7.4 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel