Re: [PATCH 4/7] drm/i915/gem/ttm: Place new BOs in the requested region

2021-08-03 Thread Thomas Hellström
On 8/4/21 8:49 AM, Thomas Hellström wrote: Hi, Jason, On 7/16/21 12:38 AM, Jason Ekstrand wrote: __i915_gem_ttm_object_init() was ignoring the placement requests coming from the client and always placing all BOs in SMEM upon creation. Instead, compute the requested placement set from the obje

Re: [PATCH 4/7] drm/i915/gem/ttm: Place new BOs in the requested region

2021-08-03 Thread Thomas Hellström
Hi, Jason, On 7/16/21 12:38 AM, Jason Ekstrand wrote: __i915_gem_ttm_object_init() was ignoring the placement requests coming from the client and always placing all BOs in SMEM upon creation. Instead, compute the requested placement set from the object and pass that into ttm_bo_init_reserved().

Re: [PATCH] drm/amdgpu: drop redundant null-pointer checks in amdgpu_ttm_tt_populate() and amdgpu_ttm_tt_unpopulate()

2021-08-03 Thread Christian König
Am 04.08.21 um 03:51 schrieb Tuo Li: The varialbe gtt in the function amdgpu_ttm_tt_populate() and amdgpu_ttm_tt_unpopulate() is guaranteed to be not NULL in the context. Thus the null-pointer checks are redundant and can be dropped. Reported-by: TOTE Robot Signed-off-by: Tuo Li Reviewed-by:

Re: refactor the i915 GVT support

2021-08-03 Thread Zhenyu Wang
On 2021.08.03 11:30:58 -0300, Jason Gunthorpe wrote: > 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 th

Re: [Freedreno] [v2] drm/msm/disp/dpu1: add safe lut config in dpu driver

2021-08-03 Thread kalyan_t
On 2021-08-04 01:43, Stephen Boyd wrote: Quoting Kalyan Thota (2021-08-03 03:41:47) Add safe lut configuration for all the targets in dpu driver as per QOS recommendation. Issue reported on SC7280: With wait-for-safe feature in smmu enabled, RT client buffer levels are checked to be safe befor

[PATCH v34 0/3] Mainline imx6 based SKOV boards

2021-08-03 Thread Oleksij Rempel
changes v4: - add vref-supply to adc@0 - split gpio assignment for the mdio node changes v3: - drop panel bindings patches, it is already in drm-misc-next - remove some new lines - reorder compatibles at the start of the nodes - use lowercase for hex value - add enable-active-high to the regulator

[PATCH v4 1/3] dt-bindings: vendor-prefixes: Add an entry for SKOV A/S

2021-08-03 Thread Oleksij Rempel
Add "skov" entry for the SKOV A/S: https://www.skov.com/en/ Signed-off-by: Oleksij Rempel --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/v

[PATCH v4 3/3] ARM: dts: add SKOV imx6q and imx6dl based boards

2021-08-03 Thread Oleksij Rempel
From: Sam Ravnborg Add SKOV imx6q/dl LT2, LT6 and mi1010ait-1cp1 boards. Signed-off-by: Sam Ravnborg Signed-off-by: Søren Andersen Signed-off-by: Juergen Borleis Signed-off-by: Ulrich Ölmann Signed-off-by: Michael Grzeschik Signed-off-by: Marco Felsch Signed-off-by: Lucas Stach Signed-off

[PATCH v4 2/3] dt-bindings: arm: fsl: add SKOV imx6q and imx6dl based boards

2021-08-03 Thread Oleksij Rempel
Add SKOV imx6q/dl LT2, LT6 and mi1010ait-1cp1 boards. Signed-off-by: Oleksij Rempel --- Documentation/devicetree/bindings/arm/fsl.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/fsl.yaml b/Documentation/devicetree/bindings/arm/fsl.yaml index e

[PATCH v2] drm/radeon: Update pitch for page flip

2021-08-03 Thread Zhenneng Li
When primary bo is updated, crtc's pitch may have not been updated, this will lead to show disorder content when user changes display mode, we update crtc's pitch in page flip to avoid this bug. This refers to amdgpu's pageflip. v1->v2: Update all of the pitch in all of the page_flip functions in

RE: [PATCH v5] drm/ast: Fixed CVE for DP501

2021-08-03 Thread Kuo-Hsiang Chou
-Original Message- From: Thomas Zimmermann [mailto:tzimmerm...@suse.de] Sent: Tuesday, August 03, 2021 4:58 PM To: Kuo-Hsiang Chou ; dri-devel@lists.freedesktop.org; linux-ker...@vger.kernel.org Subject: Re: [PATCH v5] drm/ast: Fixed CVE for DP501 Hi Am 29.04.21 um 11:21 schrieb Kuo-H

[PATCH] drm/amdgpu: drop redundant null-pointer checks in amdgpu_ttm_tt_populate() and amdgpu_ttm_tt_unpopulate()

2021-08-03 Thread Tuo Li
The varialbe gtt in the function amdgpu_ttm_tt_populate() and amdgpu_ttm_tt_unpopulate() is guaranteed to be not NULL in the context. Thus the null-pointer checks are redundant and can be dropped. Reported-by: TOTE Robot Signed-off-by: Tuo Li --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++--

[PATCH v4 3/3] drm/panel-simple: add Gopher 2b LCD panel

2021-08-03 Thread Artjom Vejsel
The Gopher 2b LCD panel is used in Gopher 2b handhelds. It's simple panel with NewVision NV3047 driver, but SPI lines are not connected. It has no specific name, since it's unique to that handhelds. lot name at AliExpress: 4.3 inch 40PIN TFT LCD Screen COG NV3047 Drive IC 480(RGB)*272 No Touch 24B

[PATCH v4 2/3] dt-bindings: Add DT bindings for QiShenglong Gopher 2b panel

2021-08-03 Thread Artjom Vejsel
Add DT bindings for QiShenglong Gopher 2b 4.3" 480(RGB)x272 TFT LCD panel. Signed-off-by: Artjom Vejsel --- .../devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/D

[PATCH v4 1/3] dt-bindings: Add QiShenglong vendor prefix

2021-08-03 Thread Artjom Vejsel
Add vendor prefix for Shenzhen QiShenglong Industrialist Co., Ltd. QiShenglong is a Chinese manufacturer of handheld gaming consoles, most of which run (very old) versions of Linux. QiShenglong is known as Hamy. Signed-off-by: Artjom Vejsel --- Documentation/devicetree/bindings/vendor-prefixes.y

[PATCH v4 0/3] add Gopher 2b LCD panel

2021-08-03 Thread Artjom Vejsel
The Gopher 2b LCD panel is used in Gopher 2b handhelds. It's simple panel with NewVision NV3047 driver, but SPI lines are not connected. It has no specific name, since it's unique to that handhelds. lot name at AliExpress: 4.3 inch 40PIN TFT LCD Screen COG NV3047 Drive IC 480(RGB)*272 No Touch 24Bi

Re: [PATCH 2/4] drm/dp_mst: Only create connector for connected end device

2021-08-03 Thread Lyude Paul
On Tue, 2021-08-03 at 19:58 -0400, Lyude Paul wrote: > On Wed, 2021-07-21 at 00:03 +0800, Wayne Lin wrote: > > [Why] > > Currently, we will create connectors for all output ports no matter > > it's connected or not. However, in MST, we can only determine > > whether an output port really stands for

Re: [PATCH 2/4] drm/dp_mst: Only create connector for connected end device

2021-08-03 Thread Lyude Paul
On Wed, 2021-07-21 at 00:03 +0800, Wayne Lin wrote: > [Why] > Currently, we will create connectors for all output ports no matter > it's connected or not. However, in MST, we can only determine > whether an output port really stands for a "connector" till it is > connected and check its peer device

[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_globals_flush()

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: (subset) [PATCH v2 0/8] arm: ep93xx: CCF conversion

2021-08-03 Thread Mark Brown
On Mon, 26 Jul 2021 16:59:48 +0300, Nikita Shubin wrote: > This series series of patches converts ep93xx to Common Clock Framework. > > It consists of preparation patches to use clk_prepare_enable where it is > needed, instead of clk_enable used in ep93xx drivers prior to CCF and > a patch convert

[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:__i915_globals

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

[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

[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|

[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

[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/

[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

[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

[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

[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

[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

[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.

[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

[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/

[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

[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

[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

[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

[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 +

[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

[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/

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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

[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 --

[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

[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

[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

[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

[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

[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

[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

[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

[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 +

[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

[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

[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 +

[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 [

[PATCH v2 8/8] drm/kmb: Enable support for fbcon (framebuffer console)

2021-08-03 Thread Anitha Chrisanthus
From: Edmund Dea Enable support for fbcon (framebuffer console). The user can initialize fbcon by loading kmb-drm with the parameter console=1. v2: added missing static clk_enable Signed-off-by: Edmund Dea Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_drv.c | 11 +++

[PATCH v2 7/8] drm/kmb: Enable ADV bridge after modeset

2021-08-03 Thread Anitha Chrisanthus
On KMB, ADV bridge must be programmed and powered on prior to MIPI DSI HW initialization. Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver") Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_dsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/k

[PATCH v2 6/8] drm/kmb: Corrected typo in handle_lcd_irq

2021-08-03 Thread Anitha Chrisanthus
Check for Overflow bits for layer3 in the irq handler. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/

[PATCH v2 5/8] drm/kmb: Disable change of plane parameters

2021-08-03 Thread Anitha Chrisanthus
From: Edmund Dea Due to HW limitations, KMB cannot change height, width, or pixel format after initial plane configuration. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Signed-off-by: Edmund Dea Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_crtc.c | 2 ++

[PATCH v2 3/8] drm/kmb: Limit supported mode to 1080p

2021-08-03 Thread Anitha Chrisanthus
KMB only supports single resolution(1080p), this commit checks for 1920x1080x60 or 1920x1080x59 in crtc_mode_valid. Also, modes with vfp < 4 are not supported in KMB display. This change prunes display modes with vfp < 4. v2: added vfp check Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay

[PATCH v2 4/8] drm/kmb: Remove clearing DPHY regs

2021-08-03 Thread Anitha Chrisanthus
From: Edmund Dea Don't clear the shared DPHY registers common to MIPI Rx and MIPI Tx during DSI initialization since this was causing MIPI Rx reset. Rest of the writes are bitwise, so do not affect Mipi Rx side. Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver") Signed-off-by:

[PATCH v2 2/8] drm/kmb : W/A for 256B cache alignment for video

2021-08-03 Thread Anitha Chrisanthus
For B0 silicon, the media driver pads the decoded video dmabufs for 256B alignment. This is the backing buffer of the framebuffer and info in the drm frame buffer is not correct for these buffers as this is done internally in the media driver. This change extracts the meta data info from dmabuf pri

[PATCH v2 1/8] drm/kmb: Work around for higher system clock

2021-08-03 Thread Anitha Chrisanthus
Use a different value for system clock offset in the ppl/llp ratio calculations for clocks higher than 500 Mhz. Fixes: 98521f4d4b4c ("drm/kmb: Mipi DSI part of the display driver") Signed-off-by: Anitha Chrisanthus --- drivers/gpu/drm/kmb/kmb_dsi.c | 11 ++- 1 file changed, 10 insertions

Re: [PATCH] dma-buf: heaps: Set allocation limit for system heap

2021-08-03 Thread Hridya Valsaraju
On Mon, Aug 2, 2021 at 7:18 PM John Stultz wrote: > > On Thu, Jul 22, 2021 at 12:07 PM Hridya Valsaraju wrote: > > This patch limits the size of total memory that can be requested in a > > single allocation from the system heap. This would prevent a > > buggy/malicious client from depleting syste

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

2021-08-03 Thread Rajat Jain
Hello DRM / GPU maintainers, On Tue, Aug 3, 2021 at 8:20 AM Marco Trevisan wrote: > > 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.o

Re: [PATCH v2 0/6] eDP: Support probing eDP panels dynamically instead of hardcoding

2021-08-03 Thread Sam Ravnborg
Hi Douglas, On Fri, Jul 30, 2021 at 02:26:19PM -0700, Douglas Anderson wrote: > The goal of this patch series is to move away from hardcoding exact > eDP panels in device tree files. As discussed in the various patches > in this series (I'm not repeating everything here), most eDP panels > are 99%

Re: [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: [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

[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

[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

[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

[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

[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

[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: -

[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,

[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

[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

Re: [v2] drm/msm/disp/dpu1: add safe lut config in dpu driver

2021-08-03 Thread Stephen Boyd
Quoting Kalyan Thota (2021-08-03 03:41:47) > Add safe lut configuration for all the targets in dpu > driver as per QOS recommendation. > > Issue reported on SC7280: > > With wait-for-safe feature in smmu enabled, RT client > buffer levels are checked to be safe before smmu invalidation. > Since dis

Re: [PATCH V5 2/2] drm/vkms: Add support for virtual hardware mode

2021-08-03 Thread Melissa Wen
On 08/01, Sumera Priyadarsini wrote: > Add a virtual hardware or vblank-less mode as a module > to enable VKMS to emulate virtual hardware drivers. This means > no vertical blanking events occur and pageflips are completed > arbitrarily and when required for updating the frame. > > Add a new drm_c

Re: [PATCH v3] drm/msm/dp: update is_connected status base on sink count at dp_pm_resume()

2021-08-03 Thread Stephen Boyd
Quoting Kuogee Hsieh (2021-08-03 09:25:13) > Currently at dp_pm_resume() is_connected state is decided base on hpd > connection > status only. This will put is_connected in wrongly "true" state at the > scenario > that dongle attached to DUT but without hmdi cable connecting to it. Fix this > pro

RE: [PATCH v2 00/14] drm: Make DRM's IRQ helpers legacy

2021-08-03 Thread Chrisanthus, Anitha
Hi Thomas, Can you please hold off on applying the kmb patch, I am seeing some issues while testing. Modetest works, but video playback only plays once, and it fails the second time with this patch. Thanks, Anitha > -Original Message- > From: Sam Ravnborg > Sent: Tuesday, August 3, 20

Re: [PATCH v2] drm/panel: s6d27a1: Add driver for Samsung S6D27A1 display panel

2021-08-03 Thread Sam Ravnborg
Hi Markuss, On Tue, Aug 03, 2021 at 08:24:50PM +0300, Markuss Broks wrote: > This adds a driver for Samsung S6D27A1 display controller and panel. > This panel is found in the Samsung GT-I8160 mobile phone, > and possibly some other mobile phones. > > This display needs manufacturer commands to con

Re: [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

[PATCH v2] drm/panel: s6d27a1: Add driver for Samsung S6D27A1 display panel

2021-08-03 Thread Markuss Broks
This adds a driver for Samsung S6D27A1 display controller and panel. This panel is found in the Samsung GT-I8160 mobile phone, and possibly some other mobile phones. This display needs manufacturer commands to configure it to a working state; the commands used in this driver were taken from downst

Re: [Freedreno] [PATCH v2 07/14] drm/msm: Convert to Linux IRQ interfaces

2021-08-03 Thread abhinavk
On 2021-08-03 02:06, Thomas Zimmermann wrote: Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it. DRM IRQ callbacks are now being called directly or inlined. Signed-off-by: Thomas Zimmer

Re: [PATCH v2 0/9] PCI/VGA: Rework default VGA device selection

2021-08-03 Thread Bjorn Helgaas
On Sat, Jul 24, 2021 at 05:30:02PM +0800, Huacai Chen wrote: > Hi, Bjorn, > > On Sat, Jul 24, 2021 at 8:10 AM Bjorn Helgaas wrote: > > > > On Fri, Jul 23, 2021 at 05:53:36PM +0800, Huacai Chen wrote: > > > Hi, Bjorn, > > > > > > On Fri, Jul 23, 2021 at 5:29 AM Bjorn Helgaas wrote: > > > > > > >

Re: [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

  1   2   >