~proton1980/ubuntu/+source/linux/+git/mirror-drm-intel:for-linux-next--gt

Last commit made on 2021-08-24
Get this branch:
git clone -b for-linux-next--gt https://git.launchpad.net/~proton1980/ubuntu/+source/linux/+git/mirror-drm-intel
Only Ghz can upload to this branch. If you are Ghz please log in for upload directions.

Branch merges

Branch information

Name:
for-linux-next--gt
Repository:
lp:~proton1980/ubuntu/+source/linux/+git/mirror-drm-intel

Recent commits

ac5a2df... by Nathan Chancellor <email address hidden>

drm/i915/selftest: Fix use of err in igt_reset_{fail, nop}_engine()

Clang warns:

In file included from drivers/gpu/drm/i915/gt/intel_reset.c:1514:
drivers/gpu/drm/i915/gt/selftest_hangcheck.c:465:62: warning: variable
'err' is uninitialized when used here [-Wuninitialized]
        pr_err("[%s] Create context failed: %d!\n", engine->name, err);
                                                                  ^~~
...
drivers/gpu/drm/i915/gt/selftest_hangcheck.c:580:62: warning: variable
'err' is uninitialized when used here [-Wuninitialized]
        pr_err("[%s] Create context failed: %d!\n", engine->name, err);
                                                                  ^~~
...
2 warnings generated.

This appears to be a copy and paste issue. Use ce directly using the %pe
specifier to pretty print the error code so that err is not used
uninitialized in these functions.

Fixes: 3a7b72665ea5 ("drm/i915/selftest: Bump selftest timeouts for hangcheck")
Reported-by: Dan Carpenter <email address hidden>
Signed-off-by: Nathan Chancellor <email address hidden>
Reviewed-by: Joonas Lahtinen <email address hidden>
Signed-off-by: Joonas Lahtinen <email address hidden>
Link: https://patchwork<email address hidden>

81a14be... by Lucas De Marchi

drm/i915/dg1: remove __maybe_unused leftover

This was added in commit 05e265841f7e ("drm/i915/dg1: add initial DG-1
definitions") so we could continue to add support for DG1 without
risk to expose a broken UAPI. Now that we added DG1 to the PCI ID list
i915 may bind to, remove the leftover.

Fixes: d5ef86b38e4c ("drm/i915: Add pci ids and uapi for DG1")
Signed-off-by: Lucas De Marchi <email address hidden>
Reviewed-by: Maarten Lankhorst <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

ff12ce2... by Dan Carpenter <email address hidden>

drm/i915/gt: Potential error pointer dereference in pinned_context()

If the intel_engine_create_pinned_context() function returns an error
pointer, then dereferencing "ce" will Oops. Use "vm" instead of
"ce->vm".

Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration")
Signed-off-by: Dan Carpenter <email address hidden>
Reviewed-by: Thomas Hellström <email address hidden>
Signed-off-by: Rodrigo Vivi <email address hidden>
Link: https://patchwork.freedesktop.org/patch/msgid/20210813113600.GC30697@kili

8c3363c... by Matthew Auld <email address hidden>

drm/i915/debugfs: hook up ttm_resource_manager_debug

This should give a more complete view of the various bits of internal
resource manager state, for device local-memory.

v2(Thomas):
   - Move the region printing into a nice helper

Signed-off-by: Matthew Auld <email address hidden>
Cc: Thomas Hellström <email address hidden>
Reviewed-by: Thomas Hellström <email address hidden>
Link: https://patchwork.<email address hidden>

5359b74... by Matthew Auld <email address hidden>

drm/i915/buddy: add some pretty printing

Implement the debug hook for the buddy resource manager. For this we
want to print out the status of the memory manager, including how much
memory is still allocatable, what page sizes we have etc. This will be
triggered when TTM is unable to fulfil an allocation request for device
local-memory.

v2(Thomas):
    - s/MB/MiB
    - s/KB/KiB

Signed-off-by: Matthew Auld <email address hidden>
Cc: Thomas Hellström <email address hidden>
Reviewed-by: Thomas Hellström <email address hidden>
Link: https://patchwork.<email address hidden>

c9b6e94... by =?utf-8?q?Thomas_Hellstr=C3=B6m?= <email address hidden>

drm/i915: Ditch the i915_gem_ww_ctx loop member

It's only used by the for_i915_gem_ww() macro and we can use
the (typically) on-stack _err variable in its place.

v2:
- Don't clear the _err variable when entering the loop
  (Matthew Auld, Maarten Lankhorst).
- Use parentheses around the _err macro argument.
- Fix up comment.

Cc: Matthew Auld <email address hidden>
Suggested-by: Maarten Lankhorst <email address hidden>
Signed-off-by: Thomas Hellström <email address hidden>
Reviewed-by: Matthew Auld <email address hidden>
Signed-off-by: Matthew Auld <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

faf8909... by Matthew Brost <email address hidden>

drm/i915: Fix syncmap memory leak

A small race exists between intel_gt_retire_requests_timeout and
intel_timeline_exit which could result in the syncmap not getting
free'd. Rather than work to hard to seal this race, simply cleanup the
syncmap on fini.

unreferenced object 0xffff88813bc53b18 (size 96):
  comm "gem_close_race", pid 5410, jiffies 4294917818 (age 1105.600s)
  hex dump (first 32 bytes):
    01 00 00 00 00 00 00 00 00 00 00 00 0a 00 00 00 ................
    00 00 00 00 00 00 00 00 6b 6b 6b 6b 06 00 00 00 ........kkkk....
  backtrace:
    [<00000000120b863a>] __sync_alloc_leaf+0x1e/0x40 [i915]
    [<00000000042f6959>] __sync_set+0x1bb/0x240 [i915]
    [<0000000090f0e90f>] i915_request_await_dma_fence+0x1c7/0x400 [i915]
    [<0000000056a48219>] i915_request_await_object+0x222/0x360 [i915]
    [<00000000aaac4ee3>] i915_gem_do_execbuffer+0x1bd0/0x2250 [i915]
    [<000000003c9d830f>] i915_gem_execbuffer2_ioctl+0x405/0xce0 [i915]
    [<00000000fd7a8e68>] drm_ioctl_kernel+0xb0/0xf0 [drm]
    [<00000000e721ee87>] drm_ioctl+0x305/0x3c0 [drm]
    [<000000008b0d8986>] __x64_sys_ioctl+0x71/0xb0
    [<0000000076c362a4>] do_syscall_64+0x33/0x80
    [<00000000eb7a4831>] entry_SYSCALL_64_after_hwframe+0x44/0xa9

Signed-off-by: Matthew Brost <email address hidden>
Fixes: 531958f6f357 ("drm/i915/gt: Track timeline activeness in enter/exit")
Cc: <email address hidden>
Reviewed-by: John Harrison <email address hidden>
Signed-off-by: John Harrison <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>

9e9dfd0... by Matt Roper <email address hidden>

drm/i915/dg2: Maintain backward-compatible nested batch behavior

For tgl+, the per-context setting of MI_MODE[12] determines whether
the bits of a nested MI_BATCH_BUFFER_START instruction should be
interpreted in the traditional manner or whether they should
instead use a new tgl+ meaning that breaks backward compatibility, but
allows nesting into 3rd-level batchbuffers. For previous platforms,
the hardware default for this register bit is to maintain
backward-compatible behavior unless a context intentionally opts into
the new behavior; however Xe_HPG flips the hardware default behavior.

From a SW perspective, we want to maintain the backward-compatible
behavior for userspace, so we'll apply a fake workaround to set it back
to the legacy behavior on platforms where the hardware default is to
break compatibility. At the moment there is no Linux userspace that
utilizes third-level batchbuffers, so this will avoid userspace from
needing to make any changes. using the legacy meaning is the correct
thing to do. If/when we have userspace consumers that want to utilize
third-level batch nesting, we can provide a context parameter to allow
them to opt-in.

Bspec: 45974, 45718
Cc: John Harrison <email address hidden>
Signed-off-by: Matt Roper <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>
Reviewed-by: Anusha Srivatsa <email address hidden>

90fd219... by Kees Cook

drm/i915: Use designated initializers for init/exit table

The kernel builds with -Werror=designated-init, and __designated_init
is used by CONFIG_GCC_PLUGIN_RANDSTRUCT for automatically selected (all
function pointer) structures. Include the field names in the init/exit
table. Avoids warnings like:

drivers/gpu/drm/i915/i915_module.c:59:4: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]

Cc: Jani Nikula <email address hidden>
Cc: Joonas Lahtinen <email address hidden>
Cc: Rodrigo Vivi <email address hidden>
Cc: David Airlie <email address hidden>
Cc: <email address hidden>
Cc: <email address hidden>
Fixes: a04ea6ae7c67 ("drm/i915: Use a table for i915_init/exit (v2)")
Signed-off-by: Kees Cook <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: https://patchwork<email address hidden>

d5ef86b... by Maarten Lankhorst <email address hidden>

drm/i915: Add pci ids and uapi for DG1

DG1 has support for local memory, which requires the usage of the
lmem placement extension for creating bo's, and memregion queries
to obtain the size. Because of this, those parts of the uapi are
no longer guarded behind FAKE_LMEM.

According to the pull request referenced below, mesa should be mostly
ready for DG1. VK_EXT_memory_budget is not hooked up yet, but we
should definitely just enable the uapi parts by default.

Signed-off-by: Maarten Lankhorst <email address hidden>
References: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11584
Cc: Jordan Justen <email address hidden>
Cc: Jason Ekstrand <email address hidden>
Link: https://patchwork.freedesktop<email address hidden>
Acked-by: Daniel Vetter <email address hidden>
Acked-by: Jason Ekstrand <email address hidden>