From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932434AbdJ3Qrv (ORCPT ); Mon, 30 Oct 2017 12:47:51 -0400 Received: from mail-wr0-f174.google.com ([209.85.128.174]:43693 "EHLO mail-wr0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932291AbdJ3Qru (ORCPT ); Mon, 30 Oct 2017 12:47:50 -0400 X-Google-Smtp-Source: ABhQp+TIeFiGzXl39dK4R1OXOdqCffWRyFOyyhvXg8YSSm27gOFOeIA3Zogq/86WBM5cj/lOibwLjw== Subject: Re: [RESEND PATCH v2 1/2] soc: amlogic: add Meson GX VPU Domains driver To: Ulf Hansson Cc: Kevin Hilman , Carlo Caione , linux-pm@lists.linux-foundation.org, "open list:ARM/Amlogic Meson..." , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" References: <1509208583-30349-1-git-send-email-narmstrong@baylibre.com> <1509208583-30349-2-git-send-email-narmstrong@baylibre.com> From: Neil Armstrong Organization: Baylibre Message-ID: <4f236610-22d5-b3ef-a5a7-1aba579a0791@baylibre.com> Date: Mon, 30 Oct 2017 17:47:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/10/2017 16:40, Ulf Hansson wrote: > Hi Neil, > > [...] > >> + >> + pm_genpd_init(&vpu_hdmi_pd.genpd, &simple_qos_governor, >> + meson_gx_pwrc_vpu_get_power(&vpu_hdmi_pd)); >> + > > This means that you may initialize the genpd in powered on state. > > For that scenario, I think you will hit a clock unprepare/disable > in-balance issue when genpd calls your ->power_off() callback, simply > because you didn't call clk_prepare_enable() for the clocks first. > > [...] > > Kind regards > Uffe > Hi, I added a "powered" attribute to trace if power-on was done by the driver, but I only protected the shutdown call.... I should indeed protect it in the power_off call instead. Neil