From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932480AbeCLJou (ORCPT ); Mon, 12 Mar 2018 05:44:50 -0400 Received: from mail.bootlin.com ([62.4.15.54]:47950 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752315AbeCLJoq (ORCPT ); Mon, 12 Mar 2018 05:44:46 -0400 Date: Mon, 12 Mar 2018 10:44:34 +0100 From: Maxime Ripard To: megous@megous.com Cc: dev@linux-sunxi.org, Jernej Skrabec , David Airlie , Chen-Yu Tsai , "open list:DRM DRIVERS FOR ALLWINNER A10" , "moderated list:ARM/Allwinner sunXi SoC support" , open list Subject: Re: [PATCH] drm/sun4i: Fix exclusivity of the TCON clocks Message-ID: <20180312094434.uucwvqy6pykxpbl7@flea> References: <20180310110511.14697-1-megous@megous.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kxorl7wmyoc5euui" Content-Disposition: inline In-Reply-To: <20180310110511.14697-1-megous@megous.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --kxorl7wmyoc5euui Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 10, 2018 at 12:05:11PM +0100, megous@megous.com wrote: > From: Ondrej Jirman >=20 > Currently the exclusivity is enabled when the rate is set by > the mode setting functions. These functions are called by > mode_set_nofb callback of drm_crc_helper. Then exclusivity > is disabled when tcon is disabled by atomic_disable > callback. >=20 > What happens is that mode_set_nofb can be called once when > mode chnages, and afterwards the system can call atomic_enable > and atomic_disable multiple times without further calls to > mode_set_nofb. >=20 > This happens: >=20 > mode_set_nofb - clk exclusivity is enabled > atomic_enable > atomic_disable - clk exclusivity is disabled > atomic_enable > atomic_disable - clk exclusivity is already disabled, leading to WARN > in clk_rate_exclusive_put >=20 > Solution is to enable exclusivity in sun4i_tcon_channel_set_status. >=20 > Signed-off-by: Ondrej Jirman > Cc: Jernej Skrabec Applied, thanks! Maxime --=20 Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com --kxorl7wmyoc5euui Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlqmTAEACgkQ0rTAlCFN r3TPwg//b7vKYKfMhDWGAMmVXElwe+zPE9T44HYyPmAog0/IQ21ozLhDHamXuwLI uKsnX34srxGU1ap7qrUDuOlCVNJqB5HYS72KhS/h2E12JWtQe/qBy1whPyVU7on6 qlfVHRIuLr/m1rV9VJqmSqQvTtA6mBJ4J1+yRAUbhVR3ll7Wlq0Y5s9KzK4qsBn/ wxki064FqJaj00JpQNwiAsffmtsVnJs+XW+ibEBEFzkhBEGlnL7nyvIuu6Pa+4Ub StwN8/FngArIB16USOgJZJsGu4WQpN8aICwbagpvaH6BvaHVLSNmkU0IqCcWQUqg nLJXLYanA/033Of0AgWqmt4tmvc5bhdvPv1Jwe6QcY8ueVK5YFlRBLexWDVTXPDm T2G3tB3Z4JxEEq+X/CLC4ERgkZMmXgGEtYmcgDuUapruGQ7cAHNPETY/OxfzKWX9 2MXuYd6gXNMrSqZTCCVm3EpeGquyW5QKXycsd8evfLybshXwbHoZrErkB6ApAR7f CuJa6BN+1VRL6dlHX9vegAYbVKQbQQTu7ecZA4NBFRv+FrjNhP4NbntJnRIuaVAF 5YYiU3PGF+LQFma8Kd0RXEsodXK0elGCZZdDUHCxWhynlEJTMSYWDdg3VS5i4bwE f7OYV3ikYgEQEXP1f5frZqEbaFdgoldS049G2uTRzdWsJDzIUtE= =eBVF -----END PGP SIGNATURE----- --kxorl7wmyoc5euui-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@bootlin.com (Maxime Ripard) Date: Mon, 12 Mar 2018 10:44:34 +0100 Subject: [PATCH] drm/sun4i: Fix exclusivity of the TCON clocks In-Reply-To: <20180310110511.14697-1-megous@megous.com> References: <20180310110511.14697-1-megous@megous.com> Message-ID: <20180312094434.uucwvqy6pykxpbl7@flea> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Sat, Mar 10, 2018 at 12:05:11PM +0100, megous at megous.com wrote: > From: Ondrej Jirman > > Currently the exclusivity is enabled when the rate is set by > the mode setting functions. These functions are called by > mode_set_nofb callback of drm_crc_helper. Then exclusivity > is disabled when tcon is disabled by atomic_disable > callback. > > What happens is that mode_set_nofb can be called once when > mode chnages, and afterwards the system can call atomic_enable > and atomic_disable multiple times without further calls to > mode_set_nofb. > > This happens: > > mode_set_nofb - clk exclusivity is enabled > atomic_enable > atomic_disable - clk exclusivity is disabled > atomic_enable > atomic_disable - clk exclusivity is already disabled, leading to WARN > in clk_rate_exclusive_put > > Solution is to enable exclusivity in sun4i_tcon_channel_set_status. > > Signed-off-by: Ondrej Jirman > Cc: Jernej Skrabec Applied, thanks! Maxime -- Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH] drm/sun4i: Fix exclusivity of the TCON clocks Date: Mon, 12 Mar 2018 10:44:34 +0100 Message-ID: <20180312094434.uucwvqy6pykxpbl7@flea> References: <20180310110511.14697-1-megous@megous.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1378644079==" Return-path: Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id D91E36E24D for ; Mon, 12 Mar 2018 09:44:45 +0000 (UTC) In-Reply-To: <20180310110511.14697-1-megous@megous.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: megous@megous.com Cc: Jernej Skrabec , dev@linux-sunxi.org, open list , "open list:DRM DRIVERS FOR ALLWINNER A10" , David Airlie , Chen-Yu Tsai , "moderated list:ARM/Allwinner sunXi SoC support" List-Id: dri-devel@lists.freedesktop.org --===============1378644079== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kxorl7wmyoc5euui" Content-Disposition: inline --kxorl7wmyoc5euui Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 10, 2018 at 12:05:11PM +0100, megous@megous.com wrote: > From: Ondrej Jirman >=20 > Currently the exclusivity is enabled when the rate is set by > the mode setting functions. These functions are called by > mode_set_nofb callback of drm_crc_helper. Then exclusivity > is disabled when tcon is disabled by atomic_disable > callback. >=20 > What happens is that mode_set_nofb can be called once when > mode chnages, and afterwards the system can call atomic_enable > and atomic_disable multiple times without further calls to > mode_set_nofb. >=20 > This happens: >=20 > mode_set_nofb - clk exclusivity is enabled > atomic_enable > atomic_disable - clk exclusivity is disabled > atomic_enable > atomic_disable - clk exclusivity is already disabled, leading to WARN > in clk_rate_exclusive_put >=20 > Solution is to enable exclusivity in sun4i_tcon_channel_set_status. >=20 > Signed-off-by: Ondrej Jirman > Cc: Jernej Skrabec Applied, thanks! Maxime --=20 Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com --kxorl7wmyoc5euui Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlqmTAEACgkQ0rTAlCFN r3TPwg//b7vKYKfMhDWGAMmVXElwe+zPE9T44HYyPmAog0/IQ21ozLhDHamXuwLI uKsnX34srxGU1ap7qrUDuOlCVNJqB5HYS72KhS/h2E12JWtQe/qBy1whPyVU7on6 qlfVHRIuLr/m1rV9VJqmSqQvTtA6mBJ4J1+yRAUbhVR3ll7Wlq0Y5s9KzK4qsBn/ wxki064FqJaj00JpQNwiAsffmtsVnJs+XW+ibEBEFzkhBEGlnL7nyvIuu6Pa+4Ub StwN8/FngArIB16USOgJZJsGu4WQpN8aICwbagpvaH6BvaHVLSNmkU0IqCcWQUqg nLJXLYanA/033Of0AgWqmt4tmvc5bhdvPv1Jwe6QcY8ueVK5YFlRBLexWDVTXPDm T2G3tB3Z4JxEEq+X/CLC4ERgkZMmXgGEtYmcgDuUapruGQ7cAHNPETY/OxfzKWX9 2MXuYd6gXNMrSqZTCCVm3EpeGquyW5QKXycsd8evfLybshXwbHoZrErkB6ApAR7f CuJa6BN+1VRL6dlHX9vegAYbVKQbQQTu7ecZA4NBFRv+FrjNhP4NbntJnRIuaVAF 5YYiU3PGF+LQFma8Kd0RXEsodXK0elGCZZdDUHCxWhynlEJTMSYWDdg3VS5i4bwE f7OYV3ikYgEQEXP1f5frZqEbaFdgoldS049G2uTRzdWsJDzIUtE= =eBVF -----END PGP SIGNATURE----- --kxorl7wmyoc5euui-- --===============1378644079== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1378644079==--