From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH 4/5] drm/i915: take power well refs when needed Date: Wed, 16 Oct 2013 14:10:13 +0300 Message-ID: <1381921813.22425.13.camel@intelbox> References: <1381792069-27800-1-git-send-email-jbarnes@virtuousgeek.org> <1381792069-27800-5-git-send-email-jbarnes@virtuousgeek.org> <20131015134044.04cc49de@jbarnes-desktop> Reply-To: imre.deak@intel.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0438192164==" Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id AF0C3E7DE7 for ; Wed, 16 Oct 2013 04:10:16 -0700 (PDT) In-Reply-To: <20131015134044.04cc49de@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jesse Barnes Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org --===============0438192164== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-EfnU/5VH0T/RjaPJcm+0" --=-EfnU/5VH0T/RjaPJcm+0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2013-10-15 at 13:40 -0700, Jesse Barnes wrote: > On Tue, 15 Oct 2013 16:54:00 -0300 > Paulo Zanoni wrote: > [...] > No that's taken into account here. In __intel_set_mode we take a > private ref on the appropriate power well so that we'll preserve state > until we do the first crtc_enable. From then on, the ref is tracked > there and we drop the private one in __intel_set_mode >=20 > > > + if (crtc->active) > > > + intel_display_power_get(dev, > > > + POWER_DOMAIN_PIPE(crt= c->pipe)); > > > + > >=20 > > What about the panel fitter power domains? Sometimes the panel fitter > > is the thing that makes you require a power well, even though you're > > on a pipe that doesn't need it. > >=20 > > And on Haswell you also have to take into account > > TRANSCODER_EDP+PIPE_A versus TRANSCODER_A+PIPE_A, where the first > > doesn't need the power well but the second needs it. >=20 > Yeah I'm still not sure how to handle this in generic code. Maybe the > power well mapping function Imre added will be enough, but it > definitely gets tricky when we look at all the different platforms we > have to (and will have to) handle. Isn't the power domain abstraction a neat idea exactly for the above case? Generic code just asks for the domain it needs and doesn't care how it maps to power wells on the given platform. So for transcoder_edp +pipe_a it'd end up asking for POWER_DOMAIN_PIPE_A and POWER_DOMAIN_TRANSCODER_EDP, both of which is a nop on HSW, and for the other case POWER_DOMAIN_PIPE_A and POWER_DOMAIN_TRANSCODER_A which would enable the power well. You also have the POWER_DOMAIN_PIPE, POWER_DOMAIN_TRANSCODER, POWER_DOMAIN_PIPE_PANEL_FITTER helpers already. --Imre --=-EfnU/5VH0T/RjaPJcm+0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAABAgAGBQJSXnQVAAoJEORIIAnNuWDFBFcIAI2QQn1P4RFsVMxruIbQDL3W tt/ysDGB1S5HBRlJpTMjQjD4wQre/yrm/Ln8uWhOVymoSleDA1WMpWcjuypnwuW0 AHkb+fd6mRW3R06sW2Dv8gv7VKwwY5zmdJDPt0A59Fv6CuVa6YuhRBWI1CCObzGf FsS6UA0GnYqzh28B66NbJjCbYWZpoD+ulyp6Qkba7kM7XTn7+cqj9Y9OGLS68w/V 1xAi9xAx0VhkOzu4vEaSEnq4BLUpbCW71bsVf8SSCYL+9UGMVx92yuZS+T/hHtn7 uK9InhQebKlu7cqPvr9IQg7l27XHSun/jxIshLovElDrPmmHgrCQ1nGwhGI0nac= =/STu -----END PGP SIGNATURE----- --=-EfnU/5VH0T/RjaPJcm+0-- --===============0438192164== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0438192164==--