RE: [PATCH] linux-firmware: update firmware for mhdp8546

2021-05-06 Thread Parshuram Raju Thombare
Please ignore this patch. Regards, Parshuram Thombare >-Original Message- >From: Parshuram Thombare >Sent: Friday, May 7, 2021 10:59 AM >To: linux-firmw...@kernel.org; dri-devel@lists.freedesktop.org >Cc: Swapnil Kashinath Jakhade ; Milind Parab >; kis...@ti.com; nikhil...@ti.com;

[PATCH] linux-firmware: update firmware for mhdp8546

2021-05-06 Thread Parshuram Thombare
This patch updates mhdp8546 firmware to 2.1.0 Fix memory leak in HDCP state machine. Signed-off-by: Parshuram Thombare --- WHENCE | 10 ++ cadence/mhdp8546.bin | Bin 131072 -> 131072 bytes 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/WHENCE b/WHENCE

Re: [PATCH] video: fbdev: imxfb: Fix an error message

2021-05-06 Thread Uwe Kleine-König
Hello Christophe, On Thu, May 06, 2021 at 08:57:05PM +0200, Christophe JAILLET wrote: > 'ret' is known to be 0 here. > No error code is available, so just remove it from the error message. > > Fixes: 72330b0eeefc ("i.MX Framebuffer: Use readl/writel instead of direct > pointer deref") >

Re: [RFC] Add BPF_PROG_TYPE_CGROUP_IOCTL

2021-05-06 Thread Kenny Ho
Sorry for the late reply (I have been working on other stuff.) On Fri, Feb 5, 2021 at 8:49 AM Daniel Vetter wrote: > > So I agree that on one side CU mask can be used for low-level quality > of service guarantees (like the CLOS cache stuff on intel cpus as an > example), and that's going to be

Re: [PATCH V3 1/2] dt-bindings: drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 bindings

2021-05-06 Thread Rob Herring
On Wed, May 05, 2021 at 12:02:17PM +0200, Marek Vasut wrote: > Add DT binding document for TI SN65DSI83 and SN65DSI84 DSI to LVDS bridge. > > Signed-off-by: Marek Vasut > Cc: Douglas Anderson > Cc: Jagan Teki > Cc: Laurent Pinchart > Cc: Linus Walleij > Cc: Rob Herring > Cc: Sam Ravnborg >

Re: Radeon NI: GIT kernel with the nislands_smc commit doesn't boot on a Freescale P5040 board and P.A.Semi Nemo board

2021-05-06 Thread Gustavo A. R. Silva
Hi Christian, On 4/30/21 06:59, Christian Zigotzky wrote: > Hello, > > The Nemo board (A-EON AmigaOne X1000) [1] and the FSL P5040 Cyrus+ board > (A-EON AmigaOne X5000) [2] with installed AMD Radeon HD6970 NI graphics cards > (Cayman > XT) [3] don't boot with the latest git kernel anymore

Re: [PATCH v4 0/4] check sink_count before update is_connected status

2021-05-06 Thread Rob Clark
On Wed, Apr 21, 2021 at 4:38 PM Kuogee Hsieh wrote: > > 1) check sink_count before update is_connected status > 2) initialize audio_comp when audio starts > 3) check main link status before start aux read > 4) dp_link_parse_sink_count() return immediately if aux read failed > > Kuogee Hsieh (4):

Re: [PULL] topic/iomem-mmap-vs-gup

2021-05-06 Thread Linus Torvalds
[ You had a really odd Reply-to on this one ] On Mon, May 3, 2021 at 12:15 PM Daniel Vetter wrote: > > Anyway here's a small pull for you to ponder, now that the big ones are > all through. Well, _now_ I'm all caught up. Knock wood. Anyway, time to look at it: > Follow-up to my pull from last

Re: [PATCH V3 2/2] drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver

2021-05-06 Thread Marek Vasut
On 5/6/21 6:03 PM, Frieder Schrempf wrote: On 06.05.21 17:46, Marek Vasut wrote: On 5/6/21 5:38 PM, Frieder Schrempf wrote: [...] Works on i.MX8MM with SN65DSI84 and a single link LVDS display (1024x600) and from my perspective everything else also looks good. Thanks for your work! I have

Re: [PATCH V3 2/2] drm/bridge: ti-sn65dsi83: Add TI SN65DSI83 and SN65DSI84 driver

2021-05-06 Thread Marek Vasut
On 5/6/21 7:03 PM, Dave Stevenson wrote: On Thu, 6 May 2021 at 13:48, Marek Vasut wrote: On 5/6/21 11:45 AM, Dave Stevenson wrote: Hi Marek Hi, I'm taking an interest as there are a number of Raspberry Pi users trying to get this chip up and running (not there quite yet). A couple of

[RFC PATCH 77/97] drm/i915/guc: Connect reset modparam updates to GuC policy flags

2021-05-06 Thread Matthew Brost
From: John Harrison Changing the reset module parameter has no effect on a running GuC. The corresponding entry in the ADS must be updated and then the GuC informed via a Host2GuC message. The new debugfs interface to module parameters allows this to happen. However, connecting the parameter

[RFC PATCH 92/97] drm/i915: Add GT PM delayed worker

2021-05-06 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 /

[RFC PATCH 69/97] drm/i915/guc: Handle engine reset failure notification

2021-05-06 Thread Matthew Brost
GuC will notify the driver, via G2H, if it fails to reset an engine. We recover by resorting to a full GPU reset. Signed-off-by: Matthew Brost Signed-off-by: Fernando Pacheco --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 2 + drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 6 +++

[RFC PATCH 95/97] drm/i915/guc: Selftest for GuC flow control

2021-05-06 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

[RFC PATCH 97/97] drm/i915/guc: Unblock GuC submission on Gen11+

2021-05-06 Thread Matthew Brost
From: Daniele Ceraolo Spurio Unblock GuC submission on Gen11+ platforms. Signed-off-by: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 1 + drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 8

[RFC PATCH 80/97] drm/i915/guc: Implement banned contexts for GuC submission

2021-05-06 Thread Matthew Brost
When using GuC submission, if a context gets banned disable scheduling and mark all inflight requests as complete. Cc: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- drivers/gpu/drm/i915/gt/intel_context.h | 13 ++

[RFC PATCH 89/97] drm/i915/guc: Check return of __xa_store when registering a context

2021-05-06 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 --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 14

[RFC PATCH 90/97] drm/i915/guc: Non-static lrc descriptor registration buffer

2021-05-06 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

[RFC PATCH 70/97] drm/i915/guc: Enable the timer expired interrupt for GuC

2021-05-06 Thread Matthew Brost
The GuC can implement execution qunatums, detect hung contexts and other such things but it requires the timer expired interrupt to do so. Signed-off-by: Matthew Brost CC: John Harrison --- drivers/gpu/drm/i915/gt/intel_rps.c | 4 1 file changed, 4 insertions(+) diff --git

[RFC PATCH 91/97] drm/i915/guc: Take GT PM ref when deregistering context

2021-05-06 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 +++

[RFC PATCH 78/97] drm/i915/guc: Include scheduling policies in the debugfs state dump

2021-05-06 Thread Matthew Brost
From: John Harrison Added the scheduling policy parameters to the 'guc_info' debugfs state dump. Signed-off-by: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 13 + drivers/gpu/drm/i915/gt/uc/intel_guc_ads.h | 2 ++

[RFC PATCH 81/97] drm/i915/guc: Allow flexible number of context ids

2021-05-06 Thread Matthew Brost
Number of available GuC contexts ids might be limited. Stop refering 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

[RFC PATCH 86/97] drm/i915/guc: Add golden context to GuC ADS

2021-05-06 Thread Matthew Brost
From: John Harrison The media watchdog mechanism involves GuC doing a silent reset and continue of the hung context. This requires the i915 driver provide a golden context to GuC in the ADS. Signed-off-by: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_gt.c

[RFC PATCH 72/97] drm/i915/guc: Don't complain about reset races

2021-05-06 Thread Matthew Brost
From: John Harrison It is impossible to seal all race conditions of resets occurring concurrent to other operations. At least, not without introducing excesive mutex locking. Instead, don't complain if it occurs. In particular, don't complain if trying to send a H2G during a reset. Whatever the

[RFC PATCH 79/97] drm/i915/guc: Don't call ring_is_idle in GuC submission

2021-05-06 Thread Matthew Brost
The engine registers really shouldn't be touched during GuC submission as the GuC owns the registers. Don't call ring_is_idle and tie intel_engine_is_idle strickly the engine pm. Because intel_engine_is_idle tied to the engine pm, retire requests before checking intel_engines_are_idle in

[RFC PATCH 76/97] drm/i915/guc: Hook GuC scheduling policies up

2021-05-06 Thread Matthew Brost
From: John Harrison Use the official driver default scheduling policies for configuring the GuC scheduler rather than a bunch of hardcoded values. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Cc: Jose Souza --- drivers/gpu/drm/i915/gt/intel_engine_types.h | 1 +

[RFC PATCH 83/97] drm/i915/guc: Don't return -EAGAIN to user when guc_ids exhausted

2021-05-06 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

[RFC PATCH 96/97] drm/i915/guc: Update GuC documentation

2021-05-06 Thread Matthew Brost
Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 99 ++- 1 file changed, 77 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index

[RFC PATCH 87/97] drm/i915/guc: Implement GuC priority management

2021-05-06 Thread Matthew Brost
Implement a simple static mapping algorithm of the i915 priority levels (int, -1k to 1k exposed to user) to the 4 GuC levels. Mapping is as follows: i915 level < 0 -> GuC low level (3) i915 level == 0 -> GuC normal level (2) i915 level < INT_MAX-> GuC high level(1)

[RFC PATCH 44/97] drm/i915/guc: Implement GuC submission tasklet

2021-05-06 Thread Matthew Brost
Implement GuC submission tasklet for new interface. The new GuC interface uses H2G to submit contexts to the GuC. Since H2G use a single channel, a single tasklet submits is used for the submission path. As such a global struct intel_engine_cs has been added to leverage the existing scheduling

[RFC PATCH 82/97] drm/i915/guc: Connect the number of guc_ids to debugfs

2021-05-06 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 +++

[RFC PATCH 94/97] drm/i915/guc: Don't call switch_to_kernel_context with GuC submission

2021-05-06 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

[RFC PATCH 84/97] drm/i915/guc: Don't allow requests not ready to consume all guc_ids

2021-05-06 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

[RFC PATCH 22/97] drm/i915/guc: Update CTB response status

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Format of the STATUS dword in CTB response message now follows definition of the HXG header. Update our code and remove any obsolete legacy definitions. GuC: 55.0.0 Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc: Piotr Piórkowski ---

[RFC PATCH 57/97] drm/i915/guc: Add several request trace points

2021-05-06 Thread Matthew Brost
Add trace points for request dependencies and GuC submit. Extended existing request trace points to include submit fence value,, guc_id, and ring tail value. Cc: John Harrison Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 3 ++

[RFC PATCH 85/97] drm/i915/guc: Introduce guc_submit_engine object

2021-05-06 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

[RFC PATCH 74/97] drm/i915/guc: Capture error state on context reset

2021-05-06 Thread Matthew Brost
We receive notification of an engine reset from GuC at its completion. Meaning GuC has potentially cleared any HW state we may have been interested in capturing. GuC resumes scheduling on the engine post-reset, as the resets are meant to be transparent, further muddling our error state. There is

[RFC PATCH 35/97] drm/i915/guc: Improve error message for unsolicited CT response

2021-05-06 Thread Matthew Brost
Improve the error message when a unsolicited CT response is received by printing fence that couldn't be found, the last fence, and all requests with a response outstanding. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 10 +++--- 1 file changed, 7

[RFC PATCH 88/97] drm/i915/guc: Support request cancellation

2021-05-06 Thread Matthew Brost
This adds GuC backend support for i915_request_cancel(), which in turn makes CONFIG_DRM_I915_REQUEST_TIMEOUT work. Signed-off-by: Matthew Brost Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_context.c | 9 + drivers/gpu/drm/i915/gt/intel_context.h | 7 +

[RFC PATCH 50/97] drm/i915/guc: Extend deregistration fence to schedule disable

2021-05-06 Thread Matthew Brost
Extend the deregistration context fence to fence whne a GuC context has scheduling disable pending. Cc: John Harrison Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 37 +++ 1 file changed, 30 insertions(+), 7 deletions(-) diff --git

[RFC PATCH 65/97] drm/i915: Reset GPU immediately if submission is disabled

2021-05-06 Thread Matthew Brost
If submission is disabled by the backend for any reason, reset the GPU immediately in the heartbeat code. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/intel_engine_heartbeat.c | 63 +++ .../gpu/drm/i915/gt/intel_engine_heartbeat.h | 4 ++

[RFC PATCH 93/97] drm/i915/guc: Take engine PM when a context is pinned with GuC submission

2021-05-06 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 --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 36 +-- 1 file changed, 33 insertions(+), 3 deletions(-) diff

[RFC PATCH 40/97] drm/i915/guc: Module load failure test for CT buffer creation

2021-05-06 Thread Matthew Brost
From: John Harrison Add several module failure load inject points in the CT buffer creation code path. Signed-off-by: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 8 1 file changed, 8 insertions(+) diff --git

[RFC PATCH 30/97] drm/i915/uc: turn on GuC/HuC auto mode by default

2021-05-06 Thread Matthew Brost
From: Daniele Ceraolo Spurio This will enable HuC loading for Gen11+ by default if the binaries are available on the system. GuC submission still requires explicit enabling by the user. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Brost Cc: Michal Wajdeczko Cc: John Harrison

[RFC PATCH 41/97] drm/i915/guc: Add new GuC interface defines and structures

2021-05-06 Thread Matthew Brost
Add new GuC interface defines and structures while maintaining old ones in parallel. Cc: John Harrison Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 18 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 41 +++ 2 files changed, 59

[RFC PATCH 71/97] drm/i915/guc: Provide mmio list to be saved/restored on engine reset

2021-05-06 Thread Matthew Brost
From: John Harrison The driver must provide GuC with a list of mmio registers that should be saved/restored during a GuC-based engine reset. Unfortunately, the list must be dynamically allocated as its size is variable. That means the driver must generate the list twice - once to work out the

[RFC PATCH 45/97] drm/i915/guc: Add bypass tasklet submission path to GuC

2021-05-06 Thread Matthew Brost
Add bypass tasklet submission path to GuC. The tasklet is only used if H2G channel has backpresure. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 37 +++ 1 file changed, 29 insertions(+), 8 deletions(-) diff --git

[RFC PATCH 48/97] drm/i915/guc: Defer context unpin until scheduling is disabled

2021-05-06 Thread Matthew Brost
With GuC scheduling, it isn't safe to unpin a context while scheduling is enabled for that context as the GuC may touch some of the pinned state (e.g. LRC). To ensure scheduling isn't enabled when an unpin is done, a call back is added to intel_context_unpin when pin count == 1 to disable

[RFC PATCH 18/97] drm/i915/guc: Don't receive all G2H messages in irq handler

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko In irq handler try to receive just single G2H message, let other messages to be received from tasklet. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 67 ---

[RFC PATCH 75/97] drm/i915/guc: Fix for error capture after full GPU reset with GuC

2021-05-06 Thread Matthew Brost
From: John Harrison In the case of a full GPU reset (e.g. because GuC has died or because GuC's hang detection has been disabled), the driver can't rely on GuC reporting the guilty context. Instead, the driver needs to scan all active contexts and find one that is currently executing, as per the

[RFC PATCH 56/97] drm/i915/guc: Update GuC debugfs to support new GuC

2021-05-06 Thread Matthew Brost
Update GuC debugfs to support the new GuC structures. Signed-off-by: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 22 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h | 3 ++ .../gpu/drm/i915/gt/uc/intel_guc_debugfs.c| 23 +++-

[RFC PATCH 60/97] drm/i915: Track 'serial' counts for virtual engines

2021-05-06 Thread Matthew Brost
From: John Harrison The serial number tracking of engines happens at the backend of request submission and was expecting to only be given physical engines. However, in GuC submission mode, the decomposition of virtual to physical engines does not happen in i915. Instead, requests are submitted

[RFC PATCH 53/97] drm/i915/guc: Disable semaphores when using GuC scheduling

2021-05-06 Thread Matthew Brost
Disable semaphores when using GuC scheduling as semaphores are broken in the current GuC firmware. Cc: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[RFC PATCH 73/97] drm/i915/guc: Enable GuC engine reset

2021-05-06 Thread Matthew Brost
From: John Harrison Clear the 'disable resets' flag to allow GuC to reset hung contexts (detected via pre-emption timeout). Signed-off-by: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[RFC PATCH 46/97] drm/i915/guc: Implement GuC context operations for new inteface

2021-05-06 Thread Matthew Brost
Implement GuC context operations which includes GuC specific operations pin, unpin, and destroy. Signed-off-by: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context.c | 5 + drivers/gpu/drm/i915/gt/intel_context_types.h | 22 +-

[RFC PATCH 67/97] drm/i915/guc: Suspend/resume implementation for new interface

2021-05-06 Thread Matthew Brost
The new GuC interface introduces an MMIO H2G command, INTEL_GUC_ACTION_RESET_CLIENT, which is used to implement suspend. This MMIO tears down any active contexts generating a context reset G2H CTB for each. Once that step completes the GuC tears down the CTB channels. It is safe to suspend once

[RFC PATCH 37/97] drm/i915/guc: Add stall timer to non blocking CTB send function

2021-05-06 Thread Matthew Brost
Implement a stall timer which fails H2G CTBs once a period of time with no forward progress is reached to prevent deadlock. Also update to ct_write to return -EDEADLK rather than -EPIPE on a corrupted descriptor. Signed-off-by: John Harrison Signed-off-by: Daniele Ceraolo Spurio Signed-off-by:

[RFC PATCH 31/97] drm/i915/guc: Early initialization of GuC send registers

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Base offset and count of the GuC scratch registers, used for sending MMIO messages to GuC, can be initialized earlier with other GuC members that also depends on platform. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio ---

[RFC PATCH 59/97] drm/i915/guc: GuC virtual engines

2021-05-06 Thread Matthew Brost
Implement GuC virtual engines. Rather simple implementation, basically just allocate an engine, setup context enter / exit function to virtual engine specific functions, set all other variables / functions to guc versions, and set the engine mask to that of all the siblings. Cc: Daniele Ceraolo

[RFC PATCH 62/97] drm/i915/guc: Disable bonding extension with GuC submission

2021-05-06 Thread Matthew Brost
Update the bonding extension to return -ENODEV when using GuC submission as this extension fundamentally will not work with the GuC submission interface. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 5 + 1 file changed, 5 insertions(+) diff --git

[RFC PATCH 49/97] drm/i915/guc: Disable engine barriers with GuC during unpin

2021-05-06 Thread Matthew Brost
Disable engine barriers for unpinning with GuC. This feature isn't needed with the GuC as it disables context scheduling before unpinning which guarantees the HW will not reference the context. Hence it is not necessary to defer unpinning until a kernel context request completes on each engine in

[RFC PATCH 36/97] drm/i915/guc: Add non blocking CTB send function

2021-05-06 Thread Matthew Brost
Add non blocking CTB send function, intel_guc_send_nb. In order to support a non blocking CTB send function a spin lock is needed to protect the CTB descriptors fields. Also the non blocking call must not update the fence value as this value is owned by the blocking call (intel_guc_send). The

[RFC PATCH 54/97] drm/i915/guc: Ensure G2H response has space in buffer

2021-05-06 Thread Matthew Brost
Ensure G2H response has space in the buffer before sending H2G CTB as the GuC can't handle any backpressure on the G2H interface. Signed-off-by: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 13 +++- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c

[RFC PATCH 58/97] drm/i915: Add intel_context tracing

2021-05-06 Thread Matthew Brost
Add intel_context tracing. These trace points are particular helpful when debugging the GuC firmware and can be enabled via CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS kernel config option. Cc: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_context.c | 6 +

[RFC PATCH 55/97] drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC

2021-05-06 Thread Matthew Brost
When running the GuC the GPU can't be considered idle if the GuC still has contexts pinned. As such, a call has been added in intel_gt_wait_for_idle to idle the UC and in turn the GuC by waiting for the number of unpinned contexts to go to zero. Cc: John Harrison Signed-off-by: Matthew Brost

[RFC PATCH 64/97] drm/i915/guc: Reset implementation for new GuC interface

2021-05-06 Thread Matthew Brost
Reset implementation for new GuC interface. This is the legacy reset implementation which is called when the i915 owns the engine hang check. Future patches will offload the engine hang check to GuC but we will continue to maintain this legacy path as a fallback and this code path is also required

[RFC PATCH 66/97] drm/i915/guc: Add disable interrupts to guc sanitize

2021-05-06 Thread Matthew Brost
Add disable GuC interrupts to intel_guc_sanitize(). Part of this requires moving the guc_*_interrupt wrapper function into header file intel_guc.h. Signed-off-by: Matthew Brost Cc: Daniele Ceraolo Spurio ct); } +static inline void intel_guc_reset_interrupts(struct intel_guc *guc) +{ +

[RFC PATCH 20/97] drm/i915/guc: Introduce unified HXG messages

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko New GuC firmware will unify format of MMIO and CTB H2G messages. Introduce their definitions now to allow gradual transition of our code to match new changes. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc: Michał Winiarski ---

[RFC PATCH 33/97] drm/i915: Engine relative MMIO

2021-05-06 Thread Matthew Brost
From: John Harrison With virtual engines, it is no longer possible to know which specific physical engine a given request will be executed on at the time that request is generated. This means that the request itself must be engine agnostic - any direct register writes must be relative to the

[RFC PATCH 34/97] drm/i915/guc: Use guc_class instead of engine_class in fw interface

2021-05-06 Thread Matthew Brost
From: Daniele Ceraolo Spurio GuC has its own defines for the engine classes. They're currently mapping 1:1 to the defines used by the driver, but there is no guarantee this will continue in the future. Given that we've been caught off-guard in the past by similar divergences, we can prepare for

[RFC PATCH 68/97] drm/i915/guc: Handle context reset notification

2021-05-06 Thread Matthew Brost
GuC will issue a reset on detecting an engine hang and will notify the driver via a G2H message. The driver will service the notification by resetting the guilty context to a simple state or banning it completely. Cc: Matthew Brost Cc: John Harrison Signed-off-by: Matthew Brost ---

[RFC PATCH 61/97] drm/i915: Hold reference to intel_context over life of i915_request

2021-05-06 Thread Matthew Brost
Hold a reference to the intel_context over life of an i915_request. Without this an i915_request can exist after the context has been destroyed (e.g. request retired, context closed, but user space holds a reference to the request from an out fence). In the case of GuC submission + virtual engine,

[RFC PATCH 47/97] drm/i915/guc: Insert fence on context when deregistering

2021-05-06 Thread Matthew Brost
Sometime during context pinning a context with the same guc_id is registered with the GuC. In this a case deregister must be before before the context can be registered. A fence is inserted on all requests while the deregister is in flight. Once the G2H is received indicating the deregistration is

[RFC PATCH 63/97] drm/i915/guc: Direct all breadcrumbs for a class to single breadcrumbs

2021-05-06 Thread Matthew Brost
With GuC virtual engines the physical engine which a request executes and completes on isn't known to the i915. Therefore we can't attach a request to a physical engines breadcrumbs. To work around this we create a single breadcrumbs per engine class when using GuC submission and direct all

[RFC PATCH 39/97] drm/i915/guc: Increase size of CTB buffers

2021-05-06 Thread Matthew Brost
With the introduction of non-blocking CTBs more than one CTB can be in flight at a time. Increasing the size of the CTBs should reduce how often software hits the case where no space is available in the CTB buffer. Cc: John Harrison Signed-off-by: Matthew Brost ---

[RFC PATCH 15/97] drm/i915/guc: Relax CTB response timeout

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko In upcoming patch we will allow more CTB requests to be sent in parallel to the GuC for procesing, so we shouldn't assume any more that GuC will always reply without 10ms. Use bigger value from CONFIG_DRM_I915_HEARTBEAT_INTERVAL instead. Signed-off-by: Michal Wajdeczko

[RFC PATCH 23/97] drm/i915/guc: Support per context scheduling policies

2021-05-06 Thread Matthew Brost
From: John Harrison GuC firmware v53.0.0 introduced per context scheduling policies. This includes changes to some of the ADS structures which are required to load the firmware even if not using GuC submission. Signed-off-by: John Harrison Signed-off-by: Matthew Brost ---

[RFC PATCH 52/97] drm/i915/guc: Ensure request ordering via completion fences

2021-05-06 Thread Matthew Brost
If two requests are on the same ring, they are explicitly ordered by the HW. So, a submission fence is sufficient to ensure ordering when using the new GuC submission interface. Conversely, if two requests share a timeline and are on the same physical engine but different context this doesn't

[RFC PATCH 32/97] drm/i915: Introduce i915_sched_engine object

2021-05-06 Thread Matthew Brost
Introduce i915_sched_engine object which is lower level data structure that i915_scheduler / generic code can operate on without touching execlist specific structures. This allows additional submission backends to be added without breaking the layer. Cc: Daniele Ceraolo Spurio Signed-off-by:

[RFC PATCH 24/97] drm/i915/guc: Add flag for mark broken CTB

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Once CTB descriptor is found in error state, either set by GuC or us, there is no need continue checking descriptor any more, we can rely on our internal flag. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc: Piotr Piórkowski ---

[RFC PATCH 25/97] drm/i915/guc: New definition of the CTB descriptor

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Definition of the CTB descriptor has changed, leaving only minimal shared fields like HEAD/TAIL/STATUS. Both HEAD and TAIL are now in dwords. Add some ABI documentation and implement required changes. GuC: 57.0.0 GuC: 60.0.0 Signed-off-by: Michal Wajdeczko

[RFC PATCH 16/97] drm/i915/guc: Start protecting access to CTB descriptors

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko We want to stop using guc.send_mutex while sending CTB messages so we have to start protecting access to CTB send descriptor. For completeness protect also CTB send descriptor. Add spinlock to struct intel_guc_ct_buffer and start using it. Signed-off-by: Michal

[RFC PATCH 12/97] drm/i915/guc: Don't repeat CTB layout calculations

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko We can retrieve offsets to cmds buffers and descriptor from actual pointers that we already keep locally. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 16 ++-- 1 file changed, 10 insertions(+),

[RFC PATCH 10/97] drm/i915: Promote ptrdiff() to i915_utils.h

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Generic helpers should be placed in i915_utils.h. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/i915_utils.h | 5 + drivers/gpu/drm/i915/i915_vma.h | 5 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

[RFC PATCH 38/97] drm/i915/guc: Optimize CTB writes and reads

2021-05-06 Thread Matthew Brost
CTB writes are now in the path of command submission and should be optimized for performance. Rather than reading CTB descriptor values (e.g. head, tail, size) which could result in accesses across the PCIe bus, store shadow local copies and only read/write the descriptor values when absolutely

[RFC PATCH 42/97] drm/i915/guc: Remove GuC stage descriptor, add lrc descriptor

2021-05-06 Thread Matthew Brost
Remove old GuC stage descriptor, add lrc descriptor which will be used by the new GuC interface implemented in this patch series. Cc: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 4 +- drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 65

[RFC PATCH 26/97] drm/i915/guc: New definition of the CTB registration action

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Definition of the CTB registration action has changed. Add some ABI documentation and implement required changes. GuC: 57.0.0 Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h | 107 ++

[RFC PATCH 27/97] drm/i915/guc: New CTB based communication

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Format of the CTB messages has changed: - support for multiple formats - message fence is now part of the header - reuse of unified HXG message formats Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc: Piotr Piórkowski ---

[RFC PATCH 43/97] drm/i915/guc: Add lrc descriptor context lookup array

2021-05-06 Thread Matthew Brost
Add lrc descriptor context lookup array which can resolve the intel_context from the lrc descriptor index. In addition to lookup, it can determine in the lrc descriptor context is currently registered with the GuC by checking if an entry for a descriptor index is present. Future patches in the

[RFC PATCH 28/97] drm/i915/guc: Kill guc_clients.ct_pool

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko CTB pool is now maintained internally by the GuC as part of its "private data". No need to allocate separate buffer and pass it to GuC as yet another ADS. GuC: 57.0.0 Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc: Janusz Krzysztofik Cc: Matthew Brost

[RFC PATCH 29/97] drm/i915/guc: Update firmware to v60.1.2

2021-05-06 Thread Matthew Brost
From: John Harrison Signed-off-by: John Harrison Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 25 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c

[RFC PATCH 51/97] drm/i915: Disable preempt busywait when using GuC scheduling

2021-05-06 Thread Matthew Brost
Disable preempt busywait when using GuC scheduling. This isn't need as the GuC control preemption when scheduling. Cc: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[RFC PATCH 17/97] drm/i915/guc: Stop using mutex while sending CTB messages

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko We are no longer using descriptor to hold G2H replies and we are protecting access to the descriptor and command buffer by the separate spinlock, so we can stop using mutex. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost ---

[RFC PATCH 14/97] drm/i915/guc: Update sizes of CTB buffers

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Future GuC will require CTB buffers sizes to be multiple of 4K. Make these changes now as this shouldn't impact us too much. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 60

[RFC PATCH 21/97] drm/i915/guc: Update MMIO based communication

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko The MMIO based Host-to-GuC communication protocol has been updated to use unified HXG messages. Update our intel_guc_send_mmio() function by correctly handle BUSY, RETRY and FAILURE replies. Also update our documentation. GuC: 55.0.0 Signed-off-by: Michal Wajdeczko

[RFC PATCH 19/97] drm/i915/guc: Always copy CT message to new allocation

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Since most of future CT traffic will be based on G2H requests, instead of copying incoming CT message to static buffer and then create new allocation for such request, always copy incoming CT message to new allocation. Also by doing it while reading CT header, we can

[RFC PATCH 07/97] drm/i915/guc: Remove sample_forcewake h2g action

2021-05-06 Thread Matthew Brost
From: Rodrigo Vivi This action is no-op in the GuC side for a few versions already and it is getting entirely removed soon, in an upcoming version. Time to remove before we face communication issues. Cc: Vinay Belgaumkar Signed-off-by: Rodrigo Vivi Signed-off-by: Matthew Brost ---

[RFC PATCH 09/97] drm/i915/guc: Stop using fence/status from CTB descriptor

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Stop using fence/status from CTB descriptor as future GuC ABI will no longer support replies over CTB descriptor. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost --- .../gt/uc/abi/guc_communication_ctb_abi.h | 4 +-

[RFC PATCH 05/97] drm/i915/guc: use probe_error log for CT enablement failure

2021-05-06 Thread Matthew Brost
From: Daniele Ceraolo Spurio We have a couple of failure injection points in the CT enablement path, so we need to use i915_probe_error() to select the appropriate log level. A new macro (CT_PROBE_ERROR) has been added to the set of CT logging macros to be used in this scenario and upcoming

[RFC PATCH 08/97] drm/i915/guc: Keep strict GuC ABI definitions

2021-05-06 Thread Matthew Brost
From: Michal Wajdeczko Our fwif.h file is now mix of strict firmware ABI definitions and set of our helpers. In anticipation of upcoming changes to the GuC interface try to keep them separate in smaller maintainable files. Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc:

  1   2   >