From: Oscar Mateo Subject: Re: [PATCH] drm/i915: Allow null render state batchbuffers bigger than one page Date: Wed, 3 May 2017 09:12:18 +0000 Message-ID: <2f99e116-a2c1-5acc-9eda-f4ec7d9bda80@intel.com> References: <1493370666-14461-1-git-send-email-oscar.mateo@intel.com> <20170428165313.GA20095@nuc-i3427.alporthouse.com> <8737cnd3e7.fsf@gaia.fi.intel.com> <9da861ba-f292-4aee-a713-f0a8860ad520@intel.com> <87shkmb9uw.fsf@gaia.fi.intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1642198717==" Return-path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8A8E6E011 for ; Wed, 3 May 2017 16:12:12 +0000 (UTC) In-Reply-To: <87shkmb9uw.fsf@gaia.fi.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Mika Kuoppala Cc: intel-gfx@lists.freedesktop.org, Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org This is a multi-part message in MIME format. --===============1642198717== Content-Type: multipart/alternative; boundary="------------F6752993981C53B5A9A68D3A" This is a multi-part message in MIME format. --------------F6752993981C53B5A9A68D3A Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 05/03/2017 08:52 AM, Mika Kuoppala wrote: > Oscar Mateo writes: > >> On 05/02/2017 09:17 AM, Mika Kuoppala wrote: >>> Chris Wilson writes: >>> >>>> On Fri, Apr 28, 2017 at 09:11:06AM +0000, Oscar Mateo wrote: >>>>> The new batchbuffer for CNL surpasses the 4096 byte mark. >>>>> >>>>> Cc: Mika Kuoppala >>>>> Cc: Ben Widawsky >>>>> Signed-off-by: Oscar Mateo >>>> Evil, 4k+ of nothing-ness that userspace then has to configure for itself >>>> for correctness anyway. >>>> >>>> Patch looks ok, but still question the sanity. >>> Is there a requirement for CNL to init the renderstate? >>> >>> I would like to drop the render state init from CNL if >>> we can't find evidence that it needs it. Bspec indicates >>> that it doesnt. >>> >>> -Mika >> Hi Mika, >> >> I can double-check with the hardware architects, but word around here is >> that render state init has never stopped being a requirement. Where did >> you see in the BSpec that it is not required for CNL? >> > It would be great if you could refresh the answer and perhaps > even get some answers to the 'why' parts. > > In the "Context Descriptor Format" section, it says: > "Render CS Only: Render state need not be initialized; the Render > Context Restore Inhibit bit in the Context/Save image in memory should > be set to prevent restoring garbage render context." > > -Mika :_( The same section also says: “See the Logical Ring Context Format section for details.” And then “Logical Ring Context Format” section goes on to say: “It is tedious for software to populate the engine context as per the requirements, it is recommended to implicitly use engine to populate this portion of the context. […] Software must program all the state required to initialize the engine in the ring buffer which would initialize the hardware state.” I’ll try to clarify it... --------------F6752993981C53B5A9A68D3A Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

On 05/03/2017 08:52 AM, Mika Kuoppala wrote:
Oscar Mateo <oscar.mateo@intel.com> writes:

On 05/02/2017 09:17 AM, Mika Kuoppala wrote:
Chris Wilson <chris@chris-wilson.co.uk> writes:

On Fri, Apr 28, 2017 at 09:11:06AM +0000, Oscar Mateo wrote:
The new batchbuffer for CNL surpasses the 4096 byte mark.

Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Evil, 4k+ of nothing-ness that userspace then has to configure for itself
for correctness anyway.

Patch looks ok, but still question the sanity.
Is there a requirement for CNL to init the renderstate?

I would like to drop the render state init from CNL if
we can't find evidence that it needs it. Bspec indicates
that it doesnt.

-Mika
Hi Mika,

I can double-check with the hardware architects, but word around here is 
that render state init has never stopped being a requirement. Where did 
you see in the BSpec that it is not required for CNL?

It would be great if you could refresh the answer and perhaps
even get some answers to the 'why' parts.

In the "Context Descriptor Format" section, it says:
"Render CS Only: Render state need not be initialized; the Render
Context Restore Inhibit bit in the Context/Save image in memory should
be set to prevent restoring garbage render context."

-Mika

:_(

The same section also says:

 

“See the Logical Ring Context Format section for details.”

 

And then “Logical Ring Context Format” section goes on to say:

 

“It is tedious for software to populate the engine context as per the requirements, it is recommended to implicitly use engine to populate this portion of the context. […] Software must program all the state required to initialize the engine in the ring buffer which would initialize the hardware state.”

 

I’ll try to clarify it... --------------F6752993981C53B5A9A68D3A-- --===============1642198717== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============1642198717==--