Re: [Intel-gfx] [PATCH i-g-t 1/1] i915/gem_scheduler: Ensure submission order in manycontexts

2021-08-03 Thread Tvrtko Ursulin
On 02/08/2021 21:10, Matthew Brost wrote: On Mon, Aug 02, 2021 at 09:59:01AM +0100, Tvrtko Ursulin wrote: On 30/07/2021 19:06, Matthew Brost wrote: On Fri, Jul 30, 2021 at 10:58:38AM +0100, Tvrtko Ursulin wrote: On 27/07/2021 19:20, Matthew Brost wrote: With GuC submission contexts can g

[Intel-gfx] New uAPI for color management proposal and feedback request v2

2021-08-03 Thread Werner Sembach
Greetings, Original proposal: https://www.mail-archive.com/amd-gfx@lists.freedesktop.org/msg62387.html Abstract: Add "preferred color format", "active color format", "active bpc", and "active Broadcast RGB" drm properties, to control color information send to the monitor. It seems that the "pr

Re: [Intel-gfx] [PATCH 01/21] drm/i915/gvt: integrate into the main Makefile

2021-08-03 Thread Zhenyu Wang
On 2021.07.21 17:53:35 +0200, Christoph Hellwig wrote: > Remove the separately included Makefile and just use the relative > reference from the main i915 Makefile as for source files in other > subdirectories. > We agreed to make gvt mostly self-contained in its own directory before. Although I do

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-03 Thread Zhenyu Wang
On 2021.07.29 09:20:22 +0200, Christoph Hellwig wrote: > On Wed, Jul 28, 2021 at 02:59:25PM -0300, Jason Gunthorpe wrote: > > On Wed, Jul 28, 2021 at 01:38:58PM +, Wang, Zhi A wrote: > > > > > I guess those APIs you were talking about are KVM-only. For other > > > hypervisors, e.g. Xen, ARCN c

Re: [Intel-gfx] [PATCH 4/4] DO_NOT_MERGE: drm/i915/display: Enable PSR2 selective fetch by default

2021-08-03 Thread Gwan-gyeong Mun
On 7/31/21 3:10 AM, José Roberto de Souza wrote: Only to execute tests with PSR2 selective fetch enabled and check what is broken. IGT tests know to fail with this: - kms_cursor_legacy: all tests that checks if evasion happend, I have fix for it making cursor_slowpath() returns true for displ

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Nuke ORIGIN_GTT

2021-08-03 Thread Gwan-gyeong Mun
On 7/31/21 3:10 AM, José Roberto de Souza wrote: There is no users of it, so no need to keep handling for it. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/display/intel_fbc.c | 10 +- drivers/gpu/drm/i915/display/intel_frontbuffer.h |

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Apply CMTG clock disabling WA while DPLL0 is enabled

2021-08-03 Thread Patchwork
== Series Details == Series: drm/i915: Apply CMTG clock disabling WA while DPLL0 is enabled URL : https://patchwork.freedesktop.org/series/93318/ State : failure == Summary == CI Bug Log - changes from CI_DRM_10440_full -> Patchwork_20762_full ==

Re: [Intel-gfx] [PATCH 0/4] Enable GuC submission by default on DG1

2021-08-03 Thread Daniel Vetter
On Tue, Aug 3, 2021 at 6:53 AM Matthew Brost wrote: > > Minimum set of patches to enable GuC submission on DG1 and enable it by > default. > > A little difficult to test as IGTs do not work with DG1 due to a bunch > of uAPI features being disabled (e.g. relocations, caching memory > options, etc..

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for remove rcu support from i915_address_space (rev2)

2021-08-03 Thread Patchwork
== Series Details == Series: remove rcu support from i915_address_space (rev2) URL : https://patchwork.freedesktop.org/series/93314/ State : warning == Summary == $ dim checkpatch origin/drm-tip 21c76a470088 drm/i915: Drop code to handle set-vm races from execbuf -:17: WARNING:COMMIT_LOG_LONG_

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for remove rcu support from i915_address_space (rev2)

2021-08-03 Thread Patchwork
== Series Details == Series: remove rcu support from i915_address_space (rev2) URL : https://patchwork.freedesktop.org/series/93314/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. -drivers/gpu/drm

[Intel-gfx] [PATCH 1/2] drm/i915: Disable gpu relocations

2021-08-03 Thread Daniel Vetter
Media userspace was the last userspace to still use them, and they converted now too: https://github.com/intel/media-driver/commit/144020c37770083974bedf59902b70b8f444c799 This means no reason anymore to make relocations faster than they've been for the first 9 years of gem. This code was added i

[Intel-gfx] [PATCH 2/2] drm/i915: delete gpu reloc code

2021-08-03 Thread Daniel Vetter
It's already removed, this just garbage collects it all. v2: Rebase over s/GEN/GRAPHICS_VER/ v3: Also ditch eb.reloc_pool and eb.reloc_context (Maarten) Signed-off-by: Daniel Vetter Cc: Jon Bloomfield Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Joonas Lahtinen Cc: "Thomas

[Intel-gfx] ✗ Fi.CI.BAT: failure for remove rcu support from i915_address_space (rev2)

2021-08-03 Thread Patchwork
== Series Details == Series: remove rcu support from i915_address_space (rev2) URL : https://patchwork.freedesktop.org/series/93314/ State : failure == Summary == CI Bug Log - changes from CI_DRM_10440 -> Patchwork_20764 Summary ---

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Apply CMTG clock disabling WA while DPLL0 is enabled

2021-08-03 Thread Imre Deak
On Tue, Aug 03, 2021 at 12:08:05PM +, Patchwork wrote: > == Series Details == > > Series: drm/i915: Apply CMTG clock disabling WA while DPLL0 is enabled > URL : https://patchwork.freedesktop.org/series/93318/ > State : failure Pushed to -din, thanks for the review. The DPLL0 dependecy was c

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Apply CMTG clock disabling WA while DPLL0 is enabled

2021-08-03 Thread Patchwork
== Series Details == Series: drm/i915: Apply CMTG clock disabling WA while DPLL0 is enabled URL : https://patchwork.freedesktop.org/series/93318/ State : success == Summary == CI Bug Log - changes from CI_DRM_10440 -> Patchwork_20762 Summar

Re: [Intel-gfx] [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-08-03 Thread Daniel Vetter
On Wed, Jul 28, 2021 at 4:22 PM Matthew Auld wrote: > > On Mon, 26 Jul 2021 at 17:10, Tvrtko Ursulin > wrote: > > > > > > On 26/07/2021 16:14, Jason Ekstrand wrote: > > > On Mon, Jul 26, 2021 at 3:31 AM Maarten Lankhorst > > > wrote: > > >> > > >> Op 23-07-2021 om 13:34 schreef Matthew Auld: > >

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Disable gpu relocations

2021-08-03 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915: Disable gpu relocations URL : https://patchwork.freedesktop.org/series/93340/ State : warning == Summary == $ dim checkpatch origin/drm-tip 42973b3c2f93 drm/i915: Disable gpu relocations -:12: WARNING:COMMIT_LOG_LONG_LINE: Possi

Re: [Intel-gfx] [PATCH v2 0/9] drm: Add privacy-screen class and connector properties

2021-08-03 Thread Marco Trevisan
Hi Rajat, The merge proposals are now in place after discussing a bit more with upstream: - https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/merge_requests/49 - https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1952 - https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_r

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Apply CMTG clock disabling WA while DPLL0 is enabled

2021-08-03 Thread Patchwork
== Series Details == Series: drm/i915: Apply CMTG clock disabling WA while DPLL0 is enabled URL : https://patchwork.freedesktop.org/series/93318/ State : success == Summary == CI Bug Log - changes from CI_DRM_10440_full -> Patchwork_20762_full ==

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Disable gpu relocations

2021-08-03 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915: Disable gpu relocations URL : https://patchwork.freedesktop.org/series/93340/ State : success == Summary == CI Bug Log - changes from CI_DRM_10442 -> Patchwork_20765 Summary

Re: [Intel-gfx] [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-08-03 Thread Jason Ekstrand
On Tue, Aug 3, 2021 at 10:09 AM Daniel Vetter wrote: > On Wed, Jul 28, 2021 at 4:22 PM Matthew Auld > wrote: > > > > On Mon, 26 Jul 2021 at 17:10, Tvrtko Ursulin > > wrote: > > > > > > > > > On 26/07/2021 16:14, Jason Ekstrand wrote: > > > > On Mon, Jul 26, 2021 at 3:31 AM Maarten Lankhorst > >

Re: [Intel-gfx] [PATCH 2/2] drm/i915: delete gpu reloc code

2021-08-03 Thread Jason Ekstrand
Both are Reviewed-by: Jason Ekstrand On Tue, Aug 3, 2021 at 7:49 AM Daniel Vetter wrote: > > It's already removed, this just garbage collects it all. > > v2: Rebase over s/GEN/GRAPHICS_VER/ > > v3: Also ditch eb.reloc_pool and eb.reloc_context (Maarten) > > Signed-off-by: Daniel Vetter > Cc: J

Re: [Intel-gfx] [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-08-03 Thread Maarten Lankhorst
Op 2021-08-03 om 17:45 schreef Jason Ekstrand: > On Tue, Aug 3, 2021 at 10:09 AM Daniel Vetter wrote: >> On Wed, Jul 28, 2021 at 4:22 PM Matthew Auld >> wrote: >>> On Mon, 26 Jul 2021 at 17:10, Tvrtko Ursulin >>> wrote: On 26/07/2021 16:14, Jason Ekstrand wrote: > On Mon, Jul 26, 2

[Intel-gfx] ✓ Fi.CI.IGT: success for Enable GuC submission by default on DG1

2021-08-03 Thread Patchwork
== Series Details == Series: Enable GuC submission by default on DG1 URL : https://patchwork.freedesktop.org/series/93325/ State : success == Summary == CI Bug Log - changes from CI_DRM_10440_full -> Patchwork_20763_full Summary ---

Re: [Intel-gfx] [PATCH v3 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set

2021-08-03 Thread Alex Williamson
On Wed, 28 Jul 2021 21:49:18 -0300 Jason Gunthorpe wrote: > Keep track of all the vfio_devices that have been added to the device set > and use this list in vfio_pci_try_bus_reset() instead of trying to work > backwards from the pci_device. > > The dev_set->lock directly prevents devices from jo

Re: [Intel-gfx] [PATCH v3 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set

2021-08-03 Thread Alex Williamson
On Tue, 3 Aug 2021 13:41:52 -0300 Jason Gunthorpe wrote: > On Tue, Aug 03, 2021 at 10:34:06AM -0600, Alex Williamson wrote: > > I think the vfio_pci_find_reset_target() function needs to be re-worked > > to just tell us true/false that it's ok to reset the provided device, > > not to anoint an arb

Re: [Intel-gfx] [PATCH 4/4] DO_NOT_MERGE: drm/i915/display: Enable PSR2 selective fetch by default

2021-08-03 Thread Souza, Jose
On Tue, 2021-08-03 at 14:17 +0300, Gwan-gyeong Mun wrote: > > On 7/31/21 3:10 AM, José Roberto de Souza wrote: > > Only to execute tests with PSR2 selective fetch enabled and check what > > is broken. > > > > IGT tests know to fail with this: > > - kms_cursor_legacy: all tests that checks if evas

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Nuke ORIGIN_GTT

2021-08-03 Thread Souza, Jose
On Tue, 2021-08-03 at 14:20 +0300, Gwan-gyeong Mun wrote: > > On 7/31/21 3:10 AM, José Roberto de Souza wrote: > > There is no users of it, so no need to keep handling for it. > > > > Cc: Gwan-gyeong Mun > > Signed-off-by: José Roberto de Souza > > --- > > drivers/gpu/drm/i915/display/intel_f

Re: [Intel-gfx] [PATCH 0/4] Enable GuC submission by default on DG1

2021-08-03 Thread Matthew Brost
On Tue, Aug 03, 2021 at 02:15:13PM +0200, Daniel Vetter wrote: > On Tue, Aug 3, 2021 at 6:53 AM Matthew Brost wrote: > > > > Minimum set of patches to enable GuC submission on DG1 and enable it by > > default. > > > > A little difficult to test as IGTs do not work with DG1 due to a bunch > > of uA

Re: [Intel-gfx] refactor the i915 GVT support

2021-08-03 Thread Jason Gunthorpe
On Tue, Aug 03, 2021 at 05:43:15PM +0800, Zhenyu Wang wrote: > Acked-by: Zhenyu Wang > > Thanks a lot for this effort! Great, do we have a submission plan for this? how much does it clash with my open_device/etc patch? ie does the whole thing have to go through the vfio tree? Thanks, Jason

[Intel-gfx] [PATCH 2/8] drm/i915/gt: Refactor _wa_add to reuse wa_index and wa_list_grow

2021-08-03 Thread Umesh Nerlige Ramappa
From: Chris Wilson Switch the search and grow code of the _wa_add to use _wa_index and _wa_list_grow. Signed-off-by: Chris Wilson Reviewed-by: Umesh Nerlige Ramappa --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 124 +++- 1 file changed, 71 insertions(+), 53 deletions(-) d

[Intel-gfx] [PATCH 3/8] drm/i915/gt: Check for conflicting RING_NONPRIV

2021-08-03 Thread Umesh Nerlige Ramappa
From: Chris Wilson Strip the encoded bits from the register offset so that we only use the address for looking up the RING_NONPRIV entry. Signed-off-by: Chris Wilson Reviewed-by: Umesh Nerlige Ramappa --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 66 + 1 file changed,

[Intel-gfx] [PATCH 1/8] drm/i915/gt: Lock intel_engine_apply_whitelist with uncore->lock

2021-08-03 Thread Umesh Nerlige Ramappa
Refactor intel_engine_apply_whitelist into locked and unlocked versions so that a caller who already has the lock can apply whitelist. v2: Fix sparse warning v3: (Chris) - Drop prefix and suffix for static function - Use longest to shortest line ordering for variable declaration Signed-off-by: Um

[Intel-gfx] [PATCH 6/8] drm/i915/perf: Whitelist OA report trigger registers

2021-08-03 Thread Umesh Nerlige Ramappa
OA reports can be triggered into the OA buffer by writing into the OAREPORTTRIG registers. Whitelist the registers to allow non-privileged user to trigger reports. Whitelist registers only if perf_stream_paranoid is set to 0. In i915_perf_open_ioctl, this setting is checked and the whitelist is en

[Intel-gfx] [PATCH 7/8] drm/i915/perf: Whitelist OA counter and buffer registers

2021-08-03 Thread Umesh Nerlige Ramappa
It is useful to have markers in the OA reports to identify triggered reports. Whitelist some OA counters that can be used as markers. A triggered report can be found faster if we can sample the HW tail and head registers when the report was triggered. Whitelist OA buffer specific registers. v2: -

[Intel-gfx] [PATCH 0/8] Enable triggered perf query for Xe_HP

2021-08-03 Thread Umesh Nerlige Ramappa
This is a revival of the patch series to support triggered perf query reports from here - https://patchwork.freedesktop.org/series/83831/ The patches were not pushed earlier because corresponding UMD changes were missing. This revival addresses UMD changes in GPUvis for this series. GPUvis uses th

[Intel-gfx] [PATCH 4/8] drm/i915/gt: Enable dynamic adjustment of RING_NONPRIV

2021-08-03 Thread Umesh Nerlige Ramappa
From: Chris Wilson The OA subsystem would like to enable its privileged clients access to the OA registers from execbuf. This requires temporarily removing the HW validation from those registers for the duration of the OA client, for which we need to allow OA to dynamically adjust the set of RING

[Intel-gfx] [PATCH 5/8] drm/i915/perf: Ensure observation logic is not clock gated

2021-08-03 Thread Umesh Nerlige Ramappa
From: Piotr Maciejewski A clock gating switch can control if the performance monitoring and observation logic is enaled or not. Ensure that we enable the clocks. v2: Separate code from other patches (Lionel) v3: Reset PMON enable when disabling perf to save power (Lionel) v4: Use intel_uncore_rm

[Intel-gfx] [PATCH 8/8] drm/i915/perf: Map OA buffer to user space for gen12 performance query

2021-08-03 Thread Umesh Nerlige Ramappa
i915 used to support time based sampling mode which is good for overall system monitoring, but is not enough for query mode used to measure a single draw call or dispatch. Gen9-Gen11 are using current i915 perf implementation for query, but Gen12+ requires a new approach for query based on triggere

Re: [Intel-gfx] [PATCH 0/8] Enable triggered perf query for Xe_HP

2021-08-03 Thread Umesh Nerlige Ramappa
+ Joonas On Tue, Aug 03, 2021 at 01:13:41PM -0700, Umesh Nerlige Ramappa wrote: This is a revival of the patch series to support triggered perf query reports from here - https://patchwork.freedesktop.org/series/83831/ The patches were not pushed earlier because corresponding UMD changes were mi

Re: [Intel-gfx] [PATCH 6/7] drm/i915/display/adl_p: Correctly program MBUS DBOX A credits

2021-08-03 Thread Souza, Jose
On Fri, 2021-07-09 at 22:41 -0700, Matt Roper wrote: > On Thu, Jul 08, 2021 at 02:18:26PM -0700, José Roberto de Souza wrote: > > Alderlake-P have different values for MBUS DBOX A credits depending > > if MBUS join is enabled or not. > > > > BSpec: 50343 > > BSpec: 54369 > > Cc: Matt Atwood > > S

Re: [Intel-gfx] [PATCH 0/8] Enable triggered perf query for Xe_HP

2021-08-03 Thread Umesh Nerlige Ramappa
On Tue, Aug 03, 2021 at 01:18:38PM -0700, Umesh Nerlige Ramappa wrote: + Joonas On Tue, Aug 03, 2021 at 01:13:41PM -0700, Umesh Nerlige Ramappa wrote: This is a revival of the patch series to support triggered perf query reports from here - https://patchwork.freedesktop.org/series/83831/ The p

Re: [Intel-gfx] [PATCH v3 09/14] vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set

2021-08-03 Thread Jason Gunthorpe
On Tue, Aug 03, 2021 at 10:34:06AM -0600, Alex Williamson wrote: > On Wed, 28 Jul 2021 21:49:18 -0300 > Jason Gunthorpe wrote: > > > Keep track of all the vfio_devices that have been added to the device set > > and use this list in vfio_pci_try_bus_reset() instead of trying to work > > backwards

[Intel-gfx] ✗ Fi.CI.DOCS: warning for Enable triggered perf query for Xe_HP

2021-08-03 Thread Patchwork
== Series Details == Series: Enable triggered perf query for Xe_HP URL : https://patchwork.freedesktop.org/series/93357/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 ./include/uapi/drm/i915_drm.h:2408: warning: This comment starts with '/**', but isn't a kernel-d

[Intel-gfx] ✗ Fi.CI.BAT: failure for Enable triggered perf query for Xe_HP

2021-08-03 Thread Patchwork
== Series Details == Series: Enable triggered perf query for Xe_HP URL : https://patchwork.freedesktop.org/series/93357/ State : failure == Summary == CI Bug Log - changes from CI_DRM_10442 -> Patchwork_20766 Summary --- **FAILURE**

[Intel-gfx] [PATCH 08/46] drm/i915/guc: Take GT PM ref when deregistering context

2021-08-03 Thread Matthew Brost
Taking a PM reference to prevent intel_gt_wait_for_idle from short circuiting while a deregister context H2G is in flight. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_engine_pm.h | 5 + drivers/gpu/drm/i915/gt/intel_gt_pm.h | 13 +++ drivers/gpu/drm/i915/gt/uc/int

[Intel-gfx] [PATCH 07/46] drm/i915/guc: Non-static lrc descriptor registration buffer

2021-08-03 Thread Matthew Brost
Dynamically allocate space for lrc descriptor registration with the GuC rather than using a large static buffer indexed by the guc_id. If no space is available to register a context, fall back to tasklet flow control mechanism. Only allow 1/2 of the space to be allocated outside the tasklet to prev

[Intel-gfx] [PATCH 00/46] Parallel submission aka multi-bb execbuf

2021-08-03 Thread Matthew Brost
As discussed in [1] we are introducing a new parallel submission uAPI for the i915 which allows more than 1 BB to be submitted in an execbuf IOCTL. This is the implemenation for both GuC and execlists. In addition to selftests in the series, an IGT is available implemented in the first 4 patches [

[Intel-gfx] [PATCH 06/46] drm/i915/guc: Check return of __xa_store when registering a context

2021-08-03 Thread Matthew Brost
Check return of __xa_store when registering a context as this can fail in a rare case if not memory can not be allocated. If this occurs fall back on the tasklet flow control and try again in the future. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c| 16 +

[Intel-gfx] [PATCH 04/46] drm/i915/guc: Don't allow requests not ready to consume all guc_ids

2021-08-03 Thread Matthew Brost
Add a heuristic which checks if over half of the available guc_ids are currently consumed by requests not ready to be submitted. If this heuristic is true at request creation time (normal guc_id allocation location) force all submissions + guc_ids allocations to tasklet. Signed-off-by: Matthew Bro

[Intel-gfx] [PATCH 11/46] drm/i915/guc: Don't call switch_to_kernel_context with GuC submission

2021-08-03 Thread Matthew Brost
Calling switch_to_kernel_context isn't needed if the engine PM reference is taken while all contexts are pinned. By not calling switch_to_kernel_context we save on issuing a request to the engine. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_engine_pm.c | 4 1 file changed

[Intel-gfx] [PATCH 02/46] drm/i915/guc: Connect the number of guc_ids to debugfs

2021-08-03 Thread Matthew Brost
For testing purposes it may make sense to reduce the number of guc_ids available to be allocated. Add debugfs support for setting the number of guc_ids. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_debugfs.c| 31 +++ .../gpu/drm/i915/gt/uc/intel_guc_submi

[Intel-gfx] [PATCH 01/46] drm/i915/guc: Allow flexible number of context ids

2021-08-03 Thread Matthew Brost
Number of available GuC contexts ids might be limited. Stop referring in code to macro and use variable instead. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 2 ++ .../gpu/drm/i915/gt/uc/intel_guc_submission.c| 16 +

[Intel-gfx] [PATCH 05/46] drm/i915/guc: Introduce guc_submit_engine object

2021-08-03 Thread Matthew Brost
Move fields related to controlling the GuC submission state machine to a unique object (guc_submit_engine) rather than the global GuC state (intel_guc). This encapsulation allows multiple instances of submission objects to operate in parallel and a single instance can block if needed while another

[Intel-gfx] [PATCH 15/46] drm/i915/guc: Introduce context parent-child relationship

2021-08-03 Thread Matthew Brost
Introduce context parent-child relationship. Once this relationship is created all pinning / unpinning operations are directed to the parent context. The parent context is responsible for pinning all of its' children and itself. This is a precursor to the full GuC multi-lrc implementation but alig

[Intel-gfx] [PATCH 03/46] drm/i915/guc: Don't return -EAGAIN to user when guc_ids exhausted

2021-08-03 Thread Matthew Brost
Rather than returning -EAGAIN to the user when no guc_ids are available, implement a fair sharing algorithm in the kernel which blocks submissons until guc_ids become available. Submissions are released one at a time, based on priority, until the guc_id pressure is released to ensure fair sharing o

[Intel-gfx] [PATCH 16/46] drm/i915/guc: Implement GuC parent-child context pin / unpin functions

2021-08-03 Thread Matthew Brost
Implement GuC parent-child context pin / unpin functions in which in any contexts in the relationship are pinned all the contexts are pinned. The parent owns most of the pinning / unpinning process and the children direct any pins / unpins to the parent. Patch implements a number of unused functio

[Intel-gfx] [PATCH 09/46] drm/i915: Add GT PM unpark worker

2021-08-03 Thread Matthew Brost
Sometimes it is desirable to queue work up for later if the GT PM isn't held and run that work on next GT PM unpark. Implemented with a list in the GT of all pending work, workqueues in the list, a callback to add a workqueue to the list, and finally a wakeref post_get callback that iterates / dra

[Intel-gfx] [PATCH 31/46] drm/i915: Move secure execbuf check to execbuf2

2021-08-03 Thread Matthew Brost
Goal is to remove all input sanity checks from the core submission. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 35 +++ 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i91

[Intel-gfx] [PATCH 13/46] drm/i915: Add logical engine mapping

2021-08-03 Thread Matthew Brost
Add logical engine mapping. This is required for split-frame, as workloads need to be placed on engines in a logically contiguous manner. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 60 --- drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 +

[Intel-gfx] [PATCH 23/46] drm/i915/guc: Insert submit fences between requests in parent-child relationship

2021-08-03 Thread Matthew Brost
The GuC must receive requests in the order submitted for contexts in a parent-child relationship to function correctly. To ensure this, insert a submit fence between the current request and last request submitted for requests / contexts in a parent child relationship. This is conceptually similar t

[Intel-gfx] [PATCH 22/46] drm/i915/guc: Implement multi-lrc submission

2021-08-03 Thread Matthew Brost
Implement multi-lrc submission via a single workqueue entry and single H2G. The workqueue entry contains an updated tail value for each request, of all the contexts in the multi-lrc submission, and updates these values simultaneously. As such, the tasklet and bypass path have been updated to coales

[Intel-gfx] [PATCH 12/46] drm/i915/guc: Selftest for GuC flow control

2021-08-03 Thread Matthew Brost
Add 5 selftests for hard (from user space) to recreate flow conditions. Test listed below: 1. A test to verify that the number of guc_ids can be exhausted and all submissions still complete. 2. A test to verify that the flow control state machine can recover from a full GPU reset. 3. A teset to

[Intel-gfx] [PATCH 10/46] drm/i915/guc: Take engine PM when a context is pinned with GuC submission

2021-08-03 Thread Matthew Brost
Taking a PM reference to prevent intel_gt_wait_for_idle from short circuiting while a scheduling of user context could be enabled. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/Makefile | 1 + .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 36 +-- 2 file

[Intel-gfx] [PATCH 18/46] drm/i915/guc: Ensure GuC schedule operations do not operate on child contexts

2021-08-03 Thread Matthew Brost
In GuC parent-child contexts the parent context controls the scheduling, ensure only the parent does the scheduling operations. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 52 +++ 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a

[Intel-gfx] [PATCH 21/46] drm/i915/guc: Add guc_child_context_destroy

2021-08-03 Thread Matthew Brost
Since child contexts do not own the guc_ids or GuC context registration, child contexts can simply be freed on destroy. Add guc_child_context_destroy context operation to do this. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 +++ 1 file changed, 7 in

[Intel-gfx] [PATCH 32/46] drm/i915: Move input/exec fence handling to i915_gem_execbuffer2

2021-08-03 Thread Matthew Brost
Move the job of creating an input/exec fences (from a file descriptor) out of i915_gem_do_execbuffer. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 75 +++ 1 file changed, 43 insertions(+), 32 deletions(-) diff --

[Intel-gfx] [PATCH 30/46] drm/i915/guc: Implement no mid batch preemption for multi-lrc

2021-08-03 Thread Matthew Brost
For some users of multi-lrc, e.g. split frame, it isn't safe to preempt mid BB. To safely enable preemption at the BB boundary, a handshake between to parent and child is needed. This is implemented via custom emit_bb_start & emit_fini_breadcrumb functions and enabled via by default if a context is

[Intel-gfx] [PATCH 25/46] drm/i915/guc: Update debugfs for GuC multi-lrc

2021-08-03 Thread Matthew Brost
Display the workqueue status in debugfs for GuC contexts that are in parent-child relationship. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 56 +-- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/inte

[Intel-gfx] [PATCH 24/46] drm/i915/guc: Implement multi-lrc reset

2021-08-03 Thread Matthew Brost
Update context and full GPU reset to work with multi-lrc. The idea is parent context tracks all the active requests inflight for itself and its' children. The parent context owns the reset replaying / canceling requests as needed. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_co

[Intel-gfx] [PATCH 29/46] drm/i915/guc: Extend GuC flow control selftest for multi-lrc

2021-08-03 Thread Matthew Brost
Prove multi-lrc and single-lrc are independent. Prove multi-lrc guc_ids flow control works. Prove multi-lrc hanging the tastlet can recover from a GPU reset. Cc: John Harrison Signed-off-by: Matthew Brost --- .../i915/gt/uc/selftest_guc_flow_control.c| 299 ++ .../drm/i915/g

[Intel-gfx] [PATCH 33/46] drm/i915: Move output fence handling to i915_gem_execbuffer2

2021-08-03 Thread Matthew Brost
Move the job of creating a new file descriptor and passing it back to userspace to i915_gem_execbuffer2. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 45 ++- 1 file changed, 25 insertions(+), 20 deletions(-) diff

[Intel-gfx] [PATCH 19/46] drm/i915/guc: Assign contexts in parent-child relationship consecutive guc_ids

2021-08-03 Thread Matthew Brost
Assign contexts in parent-child relationship consecutive guc_ids. This is accomplished by partitioning guc_id space between ones that need to be consecutive (1/16 available guc_ids) and ones that do not (15/16 of available guc_ids). The consecutive search is implemented via the bitmap API. This is

[Intel-gfx] [PATCH 17/46] drm/i915/guc: Add multi-lrc context registration

2021-08-03 Thread Matthew Brost
Add multi-lrc context registration H2G. In addition a workqueue and process descriptor are setup during multi-lrc context registration as these data structures are needed for multi-lrc submission. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context_types.h | 6 + drivers/gpu

[Intel-gfx] [PATCH 34/46] drm/i915: Return output fence from i915_gem_do_execbuffer

2021-08-03 Thread Matthew Brost
Move the job of creating a new sync fence and installing it onto a file descriptor to i915_gem_execbuffer2. Suggested-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 39 +-- 1 file changed, 19 insertions(+), 20 deletions(-) di

[Intel-gfx] [PATCH 27/46] drm/i915/doc: Update parallel submit doc to point to i915_drm.h

2021-08-03 Thread Matthew Brost
Update parallel submit doc to point to i915_drm.h Signed-off-by: Matthew Brost --- Documentation/gpu/rfc/i915_parallel_execbuf.h | 122 -- Documentation/gpu/rfc/i915_scheduler.rst | 4 +- 2 files changed, 2 insertions(+), 124 deletions(-) delete mode 100644 Documentation/

[Intel-gfx] [PATCH 36/46] drm/i915: Allow callers of i915_gem_do_execbuffer to override the batch index

2021-08-03 Thread Matthew Brost
Allow specifying the batch directly over what is inferred from passed in execbuf flags. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem

[Intel-gfx] [PATCH 46/46] drm/i915/guc: Add delay before disabling scheduling on contexts

2021-08-03 Thread Matthew Brost
Some workloads use lots of contexts that continually pin / unpin contexts. With GuC submission an unpin translates to a schedule disable H2G which puts pressure on both the i915 and GuC. A schedule disable can also block future requests from being submitted until the operation completes. None of th

[Intel-gfx] [PATCH 38/46] drm/i915: Only track object dependencies on first request

2021-08-03 Thread Matthew Brost
Only track object dependencies on the first request generated from the execbuf, this help with the upcoming multi-bb execbuf extension. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/

[Intel-gfx] [PATCH 14/46] drm/i915: Expose logical engine instance to user

2021-08-03 Thread Matthew Brost
Expose logical engine instance to user via query engine info IOCTL. This is required for split-frame workloads as these needs to be placed on engines in a logically contiguous order. The logical mapping can change based on fusing. Rather than having user have knowledge of the fusing we simply just

[Intel-gfx] [PATCH 26/46] drm/i915: Connect UAPI to GuC multi-lrc interface

2021-08-03 Thread Matthew Brost
Introduce 'set parallel submit' extension to connect UAPI to GuC multi-lrc interface. Kernel doc in new uAPI should explain it all. Cc: Tvrtko Ursulin Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 157 +- .../gpu/drm/i915/gem/i915_gem_context_t

[Intel-gfx] [PATCH 41/46] drm/i915: Eliminate unnecessary VMA calls for multi-BB submission

2021-08-03 Thread Matthew Brost
Certain VMA functions in the execbuf IOCTL only need to be called on first or last BB of a multi-BB submission. eb_relocate() on the first and eb_release_vmas() on the last. Doing so will save CPU / GPU cycles. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 127

[Intel-gfx] [PATCH 37/46] drm/i915: Teach execbuf there can be more than one batch in the objects list

2021-08-03 Thread Matthew Brost
In case of multiple batches all batches will be at the beginning in the exex objects array or at the end based on the existing execbuffer2 flag. Batches not executed in the current execbuf call will not be processed for relocations or but will be pinned in same manner as the current batch. This w

[Intel-gfx] [PATCH 44/46] drm/i915: Enable multi-bb execbuf

2021-08-03 Thread Matthew Brost
Enable multi-bb execbuf by enabling the set_parallel extension. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index 2b0d

[Intel-gfx] [PATCH 35/46] drm/i915: Store batch index in struct i915_execbuffer

2021-08-03 Thread Matthew Brost
This will help with upcoming extensions where more than 1 batch can be submitted in a single execbuf IOCTL. Signed-off-by: Tvrtko Ursulin Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) di

[Intel-gfx] [PATCH 42/46] drm/i915: Hold all parallel requests until last request, properly handle error

2021-08-03 Thread Matthew Brost
Hold all parallel requests, via a submit fence, until the last request is generated. If an error occurs in the middle of generating the requests, skip the requests signal the backend of the error via a request flag. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c|

[Intel-gfx] [PATCH 45/46] drm/i915/execlists: Weak parallel submission support for execlists

2021-08-03 Thread Matthew Brost
A weak implementation of parallel submission (multi-bb execbuf IOCTL) for execlists. Basically doing as little as possible to support this interface for execlists - basically just passing submit fences between each request generated and virtual engines are not allowed. This is on par with what is t

[Intel-gfx] [PATCH 39/46] drm/i915: Force parallel contexts to use copy engine for reloc

2021-08-03 Thread Matthew Brost
Submitting to a subset of hardware contexts is not allowed, so use the copy engine for GPU relocations when using a parallel context. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/

[Intel-gfx] [PATCH 20/46] drm/i915/guc: Add hang check to GuC submit engine

2021-08-03 Thread Matthew Brost
The heartbeat uses a single instance of a GuC submit engine (GSE) to do the hang check. As such if a different GSE's state machine hangs, the heartbeat cannot detect this hang. Add timer to each GSE which in turn can disable all submissions if it is hung. Cc: John Harrison Signed-off-by: Matthew

[Intel-gfx] [PATCH 28/46] drm/i915/guc: Add basic GuC multi-lrc selftest

2021-08-03 Thread Matthew Brost
Add very basic (single submission) multi-lrc selftest. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 1 + .../drm/i915/gt/uc/selftest_guc_multi_lrc.c | 168 ++ .../drm/i915/selftests/i915_live_selftests.h | 1 + 3 files changed, 170 inser

[Intel-gfx] [PATCH 43/46] drm/i915/guc: Handle errors in multi-lrc requests

2021-08-03 Thread Matthew Brost
If an error occurs in the front end when multi-lrc requests are getting generated we need to skip these in the backend but we still need to emit the breadcrumbs seqno. An issues arrises because with multi-lrc breadcrumbs there is a handshake between the parent and children to make forwad progress.

[Intel-gfx] [PATCH 40/46] drm/i915: Multi-batch execbuffer2

2021-08-03 Thread Matthew Brost
For contexts with width set to two or more, we add a mode to execbuf2 which implies there are N batch buffers in the buffer list, each of which will be sent to one of the engines from the engine map array (I915_CONTEXT_PARAM_ENGINES, I915_CONTEXT_ENGINES_EXT_PARALLEL_SUBMIT). Those N batches can e

[Intel-gfx] [drm-intel:for-linux-next-fixes 2/2] WARNING: modpost: vmlinux.o(.text.unlikely+0x105a3b): Section mismatch in reference from the function i915_globals_exit() to the function .exit.text:__

2021-08-03 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm-intel for-linux-next-fixes head: 1354d830cb8f9be966cc07fc61368af27ffb7c4a commit: 1354d830cb8f9be966cc07fc61368af27ffb7c4a [2/2] drm/i915: Call i915_globals_exit() if pci_register_device() fails config: i386-allyesconfig (attached as .config) compiler: g

Re: [Intel-gfx] [PATCH 6/7] drm/i915/display/adl_p: Correctly program MBUS DBOX A credits

2021-08-03 Thread Matt Roper
On Tue, Aug 03, 2021 at 01:19:12PM -0700, Souza, Jose wrote: > On Fri, 2021-07-09 at 22:41 -0700, Matt Roper wrote: > > On Thu, Jul 08, 2021 at 02:18:26PM -0700, José Roberto de Souza wrote: > > > Alderlake-P have different values for MBUS DBOX A credits depending > > > if MBUS join is enabled or n

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Parallel submission aka multi-bb execbuf (rev2)

2021-08-03 Thread Patchwork
== Series Details == Series: Parallel submission aka multi-bb execbuf (rev2) URL : https://patchwork.freedesktop.org/series/92789/ State : warning == Summary == $ dim checkpatch origin/drm-tip 5e27ca906d33 drm/i915/guc: Allow flexible number of context ids 27bc3be5a17a drm/i915/guc: Connect th

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Parallel submission aka multi-bb execbuf (rev2)

2021-08-03 Thread Patchwork
== Series Details == Series: Parallel submission aka multi-bb execbuf (rev2) URL : https://patchwork.freedesktop.org/series/92789/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. +drivers/gpu/drm/i

[Intel-gfx] ✗ Fi.CI.DOCS: warning for Parallel submission aka multi-bb execbuf (rev2)

2021-08-03 Thread Patchwork
== Series Details == Series: Parallel submission aka multi-bb execbuf (rev2) URL : https://patchwork.freedesktop.org/series/92789/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 /home/cidrm/kernel/Documentation/gpu/i915:525: ./drivers/gpu/drm/i915/gt/uc/intel_guc_s

[Intel-gfx] ✓ Fi.CI.BAT: success for Parallel submission aka multi-bb execbuf (rev2)

2021-08-03 Thread Patchwork
== Series Details == Series: Parallel submission aka multi-bb execbuf (rev2) URL : https://patchwork.freedesktop.org/series/92789/ State : success == Summary == CI Bug Log - changes from CI_DRM_10442 -> Patchwork_20767 Summary --- **

[Intel-gfx] [drm-intel:for-linux-next-fixes 2/2] WARNING: modpost: vmlinux.o(.text+0x12afa56): Section mismatch in reference from the function i915_globals_exit() to the function .exit.text:__i915_glo

2021-08-03 Thread kernel test robot
tree: git://anongit.freedesktop.org/drm-intel for-linux-next-fixes head: 1354d830cb8f9be966cc07fc61368af27ffb7c4a commit: 1354d830cb8f9be966cc07fc61368af27ffb7c4a [2/2] drm/i915: Call i915_globals_exit() if pci_register_device() fails config: x86_64-randconfig-a011-20210803 (attached as

Re: [Intel-gfx] [PATCH v4 03/18] drm/i915/dg2: Add forcewake table

2021-08-03 Thread Souza, Jose
On Thu, 2021-07-29 at 09:59 -0700, Matt Roper wrote: > The DG2 forcewake table is very similar to the one used by XeHP SDV (and > both platforms are even presented as a single table in the bspec). For > the most part DG2 starts using a few additional ranges that were > 'reserved' on XeHP SDV and s

  1   2   >