dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michel Thierry <michel.thierry@intel.com>
To: "Kristian Høgsberg" <krh@bitplanet.net>
Cc: mesa-dev <mesa-dev@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v4 1/2] intel: 48b ppgtt support (EXEC_OBJECT_SUPPORTS_48B_ADDRESS flag)
Date: Tue, 6 Oct 2015 14:12:59 +0100	[thread overview]
Message-ID: <5613C8DB.9090403@intel.com> (raw)
In-Reply-To: <CAOeoa-cy4pUMFw6dksv4HngKY-2ZZOJCV9ZMVuBU4zWC-6YeTw@mail.gmail.com>

On 10/5/2015 7:06 PM, Kristian Høgsberg wrote:
> On Mon, Oct 5, 2015 at 7:03 AM, Michel Thierry <michel.thierry@intel.com> wrote:
>> On 9/14/2015 2:54 PM, Michał Winiarski wrote:
>>>
>>> On Thu, Sep 03, 2015 at 03:23:58PM +0100, Michel Thierry wrote:
>>>>
>>>> Gen8+ supports 48-bit virtual addresses, but some objects must always be
>>>> allocated inside the 32-bit address range.
>>>>
>>>> In specific, any resource used with flat/heapless (0x00000000-0xfffff000)
>>>> General State Heap (GSH) or Instruction State Heap (ISH) must be in a
>>>> 32-bit range, because the General State Offset and Instruction State
>>>> Offset
>>>> are limited to 32-bits.
>>>>
>>>> The i915 driver has been modified to provide a flag to set when the 4GB
>>>> limit is not necessary in a given bo (EXEC_OBJECT_SUPPORTS_48B_ADDRESS).
>>>> 48-bit range will only be used when explicitly requested.
>>>>
>>>> Callers to the existing drm_intel_bo_emit_reloc function should set the
>>>> use_48b_address_range flag beforehand, in order to use full ppgtt range.
>>>>
>>>> v2: Make set/clear functions nops on pre-gen8 platforms, and use them
>>>>       internally in emit_reloc functions (Ben)
>>>>       s/48BADDRESS/48B_ADDRESS/ (Dave)
>>>> v3: Keep set/clear functions internal, no-one needs to use them directly.
>>>> v4: Don't set 48bit-support flag in emit reloc, check for ppgtt type
>>>>       before enabling set/clear function, print full offsets in debug
>>>>       statements, using port of lower_32_bits and upper_32_bits from linux
>>>>       kernel (Michał)
>>>>
>>>> References:
>>>> http://lists.freedesktop.org/archives/intel-gfx/2015-July/072612.html
>>>> Cc: Ben Widawsky <ben@bwidawsk.net>
>>>> Cc: Michał Winiarski <michal.winiarski@intel.com>
>>>
>>>
>>> +Kristian
>>>
>>> LGTM.
>>> Acked-by: Michał Winiarski <michal.winiarski@intel.com>
>>>
>>>> Signed-off-by: Michel Thierry <michel.thierry@intel.com>
>>
>>
>>
>> Hi Kristian,
>>
>> More comments on this?
>> I've resent the mesa patch with the last changes
>> (http://lists.freedesktop.org/archives/dri-devel/2015-October/091752.html).
>>
>> Michał has agreed with the interface and will use it for his work.
>> If mesa doesn't plan to use this for now, it's ok. The kernel changes have
>> been done to prevent any regressions when the support 48-bit flag is not
>> set.
>
> I didn't get any replies to my last comments on this:
>
> http://lists.freedesktop.org/archives/mesa-dev/2015-August/091398.html
>
> Basically, I tried explicitly placing buffers above 8G and didn't see
> the HW problem described (ie it all worked fine).  I still think
> there's some confusion as to what the W/A is about.
>
> Here's my take: the W/A is a SW-only workaround to handle the cases
> where a driver uses heapless and 48-bit ppgtt. The problem is that the
> heaps are limited to 4G but with 48bit ppgtt a buffer can be placed
> anywhere it the 48 bit address space. If that happens it's consideredd
> out-of-bounds for the heap and access fails. To prevent this we need
> to make sure the bos we address in a heapless fashion are placed below
> 4g.
>
> For mesa, we only configure general state base as heap-less, which
> affects scratch bos. What this boils down to is that we need the 4G
> restriction only for the scratch bos set up on 3DSTATE_VS, 3DSTATE_GS
> and 3DSTATE_PS (and tesselation stage eventually). Look for the
> OUT_RELOC64 for stage->scratch_bo in gen8_vs_state.c, gen8_gs_state.c
> and gen8_ps_state.c

I think it also affects _3DSTATE_VIEWPORT_STATE_POINTERS_CC, maybe it 
isn't exclusive to the scratch bos (the error state points to that 
instruction).


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-10-06 13:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03 14:23 [PATCH libdrm v4 0/2] 48-bit virtual address support in i915 Michel Thierry
2015-09-03 14:23 ` [PATCH v4 1/2] intel: 48b ppgtt support (EXEC_OBJECT_SUPPORTS_48B_ADDRESS flag) Michel Thierry
2015-09-14 13:54   ` Michał Winiarski
2015-10-05 14:03     ` Michel Thierry
2015-10-05 18:06       ` Kristian Høgsberg
2015-10-06 13:12         ` Michel Thierry [this message]
2015-10-13 12:16           ` Michel Thierry
2015-10-13 14:13             ` Emil Velikov
2015-10-13 14:55               ` Michel Thierry
2015-10-13 21:51                 ` Kristian Høgsberg
2015-10-14  7:19                   ` [Mesa-dev] " Daniel Vetter
2015-10-14 12:11                     ` Michel Thierry
2015-11-18 22:53                       ` Kristian Høgsberg
2015-12-04 14:24                         ` Michel Thierry
2015-12-10 19:40                           ` Kristian Høgsberg
2015-09-03 14:23 ` [PATCH v4 2/2] intel: add drm_intel_bo_use_48b_address_range to symbol-check test Michel Thierry
2015-10-02 17:35 ` [PATCH libdrm v4 0/2] 48-bit virtual address support in i915 Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5613C8DB.9090403@intel.com \
    --to=michel.thierry@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krh@bitplanet.net \
    --cc=mesa-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox