From: "Gupta, Sourab" Subject: Re: [PATCH] drm/i915 : Removed the unconditional cross engine/ring update of MBOX registers Date: Tue, 10 Jun 2014 14:44:30 +0000 Message-ID: <1402411522.9396.134.camel@sourabgu-desktop> References: <1402384724-4751-1-git-send-email-sourab.gupta@intel.com> <20140610072406.GB8056@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F1CC6E6C9 for ; Tue, 10 Jun 2014 07:44:33 -0700 (PDT) In-Reply-To: <20140610072406.GB8056@nuc-i3427.alporthouse.com> Content-Language: en-US Content-ID: <9549697671B6AA409964D18173351F56@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson Cc: "intel-gfx@lists.freedesktop.org" , "Goel, Akash" List-Id: intel-gfx@lists.freedesktop.org On Tue, 2014-06-10 at 07:24 +0000, Chris Wilson wrote: > On Tue, Jun 10, 2014 at 12:48:44PM +0530, sourab.gupta@intel.com wrote: > > From: Akash Goel > > > > Removed the unconditional cross engine/ring update of MBOX registers. > > The MBox update will done only when needed when the actual inter ring > > dependency has been ascertained. Although this late sync could affect > > the Media performance slightly but it shall improve the residency time > > of individual power wells in C6 state. > > NAK. Did you even consider the deadlocks above and beyond the issues with > latency? Maybe suggest that the hardware guys consider a reordering write > FIFO next time like elsewhere on the chip. > -Chris > Hi Chris, We had thought about the deadlock scenarios between two rings but it didn't seem plausible. Below scenario was considered: Let us say Ring1 has to sync for obj1 which is being processed on Ring2. So it inserts Wait command on Ring1 and corresponding Signal command on Ring2. Now, Ring1 will be deadlocked only in the case when Ring2 is waiting for some obj2 to be processed on Ring1. That would mean that Ring2 would have inserted a corresponding signal command on Ring1. Now, this signal command for obj2 on Ring1 has to be has to be there before the wait command for obj1 on Ring1 (because wait/signal command pair is inserted together). So, Ring2 should go ahead to process the Signal command for obj1. Are there any missing points in this scenario we considered? Or, some other scenario for deadlock? Thanks, Sourab