Re: [PATCH 32/47] drm/i915: Reset GPU immediately if submission is disabled

2021-07-12 Thread John Harrison
On 6/24/2021 00:05, Matthew Brost wrote: If submission is disabled by the backend for any reason, reset the GPU immediately in the heartbeat code as the backend can't be reenabled until the GPU is reset. Signed-off-by: Matthew Brost Reviewed-by: John Harrison --- .../gpu/drm/i915/gt/intel

[PATCH v4 00/18] drm/sched dependency tracking and dma-resv fixes

2021-07-12 Thread Daniel Vetter
Hi all, Quick new version since the previous one was a bit too broken: - dropped the bug-on patch to avoid breaking amdgpu's gpu reset failure games - another attempt at splitting job_init/arm, hopefully we're getting there. Note that Christian has brought up a bikeshed on the new functions t

[PATCH v4 02/18] drm/sched: Barriers are needed for entity->last_scheduled

2021-07-12 Thread Daniel Vetter
It might be good enough on x86 with just READ_ONCE, but the write side should then at least be WRITE_ONCE because x86 has total store order. It's definitely not enough on arm. Fix this proplery, which means - explain the need for the barrier in both places - point at the other side in each commen

[PATCH v4 01/18] drm/sched: Split drm_sched_job_init

2021-07-12 Thread Daniel Vetter
This is a very confusingly named function, because not just does it init an object, it arms it and provides a point of no return for pushing a job into the scheduler. It would be nice if that's a bit clearer in the interface. But the real reason is that I want to push the dependency tracking helpe

[PATCH v4 05/18] drm/sched: improve docs around drm_sched_entity

2021-07-12 Thread Daniel Vetter
I found a few too many things that are tricky and not documented, so I started typing. I found a few more things that looked broken while typing, see the varios FIXME in drm_sched_entity. Also some of the usual logics: - actually include sched_entity.c declarations, that was lost in the move he

[PATCH v4 03/18] drm/sched: Add dependency tracking

2021-07-12 Thread Daniel Vetter
Instead of just a callback we can just glue in the gem helpers that panfrost, v3d and lima currently use. There's really not that many ways to skin this cat. On the naming bikeshed: The idea for using _await_ to denote adding dependencies to a job comes from i915, where that's used quite extensive

[PATCH v4 07/18] drm/lima: use scheduler dependency tracking

2021-07-12 Thread Daniel Vetter
Nothing special going on here. Aside reviewing the code, it seems like drm_sched_job_arm() should be moved into lima_sched_context_queue_task and put under some mutex together with drm_sched_push_job(). See the kerneldoc for drm_sched_push_job(). Signed-off-by: Daniel Vetter Cc: Qiang Yu Cc: Su

[PATCH v4 06/18] drm/panfrost: use scheduler dependency tracking

2021-07-12 Thread Daniel Vetter
Just deletes some code that's now more shared. Note that thanks to the split into drm_sched_job_init/arm we can now easily pull the _init() part from under the submission lock way ahead where we're adding the sync file in-fences as dependencies. v2: Correctly clean up the partially set up job, no

[PATCH v4 08/18] drm/v3d: Move drm_sched_job_init to v3d_job_init

2021-07-12 Thread Daniel Vetter
Prep work for using the scheduler dependency handling. We need to call drm_sched_job_init earlier so we can use the new drm_sched_job_await* functions for dependency handling here. v2: Slightly better commit message and rebase to include the drm_sched_job_arm() call (Emma). v3: Cleanup jobs under

[PATCH v4 10/18] drm/etnaviv: Use scheduler dependency handling

2021-07-12 Thread Daniel Vetter
We need to pull the drm_sched_job_init much earlier, but that's very minor surgery. v2: Actually fix up cleanup paths by calling drm_sched_job_init, which I wanted to to in the previous round (and did, for all other drivers). Spotted by Lucas. Signed-off-by: Daniel Vetter Cc: Lucas Stach Cc: Ru

[PATCH v4 04/18] drm/sched: drop entity parameter from drm_sched_push_job

2021-07-12 Thread Daniel Vetter
Originally a job was only bound to the queue when we pushed this, but now that's done in drm_sched_job_init, making that parameter entirely redundant. Remove it. The same applies to the context parameter in lima_sched_context_queue_task, simplify that too. Reviewed-by: Steven Price (v1) Signed-

[PATCH v4 09/18] drm/v3d: Use scheduler dependency handling

2021-07-12 Thread Daniel Vetter
With the prep work out of the way this isn't tricky anymore. Aside: The chaining of the various jobs is a bit awkward, with the possibility of failure in bad places. I think with the drm_sched_job_init/arm split and maybe preloading the job->dependencies xarray this should be fixable. Cc: Melissa

[PATCH v4 11/18] drm/gem: Delete gem array fencing helpers

2021-07-12 Thread Daniel Vetter
Integrated into the scheduler now and all users converted over. Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: linux-me...@vger.kernel.org Cc: linaro-mm-...@lists.linar

[PATCH v4 12/18] drm/sched: Don't store self-dependencies

2021-07-12 Thread Daniel Vetter
This is essentially part of drm_sched_dependency_optimized(), which only amdgpu seems to make use of. Use it a bit more. This would mean that as-is amdgpu can't use the dependency helpers, at least not with the current approach amdgpu has for deciding whether a vm_flush is needed. Since amdgpu als

[PATCH v4 13/18] drm/sched: Check locking in drm_sched_job_await_implicit

2021-07-12 Thread Daniel Vetter
You really need to hold the reservation here or all kinds of funny things can happen between grabbing the dependencies and inserting the new fences. Signed-off-by: Daniel Vetter Cc: "Christian König" Cc: Daniel Vetter Cc: Luben Tuikov Cc: Andrey Grodzovsky Cc: Alex Deucher Cc: Jack Zhang --

[PATCH v4 15/18] drm/etnaviv: Don't break exclusive fence ordering

2021-07-12 Thread Daniel Vetter
There's only one exclusive slot, and we must not break the ordering. Adding a new exclusive fence drops all previous fences from the dma_resv. To avoid violating the signalling order we err on the side of over-synchronizing by waiting for the existing fences, even if userspace asked us to ignore th

[PATCH v4 14/18] drm/msm: Don't break exclusive fence ordering

2021-07-12 Thread Daniel Vetter
There's only one exclusive slot, and we must not break the ordering. Adding a new exclusive fence drops all previous fences from the dma_resv. To avoid violating the signalling order we err on the side of over-synchronizing by waiting for the existing fences, even if userspace asked us to ignore t

[PATCH v4 18/18] dma-resv: Give the docs a do-over

2021-07-12 Thread Daniel Vetter
Specifically document the new/clarified rules around how the shared fences do not have any ordering requirements against the exclusive fence. But also document all the things a bit better, given how central struct dma_resv to dynamic buffer management the docs have been very inadequat. - Lots mor

[PATCH v4 16/18] drm/i915: delete exclude argument from i915_sw_fence_await_reservation

2021-07-12 Thread Daniel Vetter
No longer used, the last user disappeared with commit d07f0e59b2c762584478920cd2d11fba2980a94a Author: Chris Wilson Date: Fri Oct 28 13:58:44 2016 +0100 drm/i915: Move GEM activity tracking into a common struct reservation_object Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: "T

[PATCH v4 17/18] drm/i915: Don't break exclusive fence ordering

2021-07-12 Thread Daniel Vetter
There's only one exclusive slot, and we must not break the ordering. Adding a new exclusive fence drops all previous fences from the dma_resv. To avoid violating the signalling order we err on the side of over-synchronizing by waiting for the existing fences, even if userspace asked us to ignore th

Re: [PATCH 28/47] drm/i915: Hold reference to intel_context over life of i915_request

2021-07-12 Thread Matthew Brost
On Mon, Jul 12, 2021 at 11:23:14AM -0700, John Harrison wrote: > On 6/24/2021 00:04, Matthew Brost wrote: > > 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

Re: [PATCH 27/47] drm/i915: Track 'serial' counts for virtual engines

2021-07-12 Thread Matthew Brost
On Mon, Jul 12, 2021 at 11:11:48AM -0700, John Harrison wrote: > On 6/24/2021 00:04, Matthew Brost wrote: > > 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

Re: [PATCH 33/47] drm/i915/guc: Add disable interrupts to guc sanitize

2021-07-12 Thread John Harrison
On 6/24/2021 00:05, Matthew Brost wrote: 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 Reviewed-by: John Harrison --- drivers/gpu/d

Re: [PATCH v4 01/18] drm/sched: Split drm_sched_job_init

2021-07-12 Thread Emma Anholt
On Mon, Jul 12, 2021 at 1:01 PM Daniel Vetter wrote: > > This is a very confusingly named function, because not just does it > init an object, it arms it and provides a point of no return for > pushing a job into the scheduler. It would be nice if that's a bit > clearer in the interface. > > But t

Re: [PATCH 23/47] drm/i915/guc: Update GuC debugfs to support new GuC

2021-07-12 Thread Matthew Brost
On Mon, Jul 12, 2021 at 11:05:59AM -0700, John Harrison wrote: > On 6/24/2021 00:04, Matthew Brost wrote: > > 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 |

Re: [Freedreno] [PATCH v3 1/7] drm/msm/dsi: rename dual DSI to bonded DSI

2021-07-12 Thread abhinavk
On 2021-07-10 15:19, Dmitry Baryshkov wrote: We are preparing to support two independent DSI hosts in the DSI/DPU code. To remove possible confusion (as both configurations can be referenced as dual DSI) let's rename old "dual DSI" (two DSI hosts driving single device, with clocks being locked) t

Re: [Freedreno] [PATCH v3 2/7] drm/msm/dsi: add three helper functions

2021-07-12 Thread abhinavk
On 2021-07-10 15:20, Dmitry Baryshkov wrote: Add three helper functions to be used by display drivers for setting up encoders. Signed-off-by: Dmitry Baryshkov I think there is a kbot error in this patch, with that fixed Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/dsi.c |

Re: [PATCH v3 3/7] drm/msm/dpu: support setting up two independent DSI connectors

2021-07-12 Thread abhinavk
On 2021-07-10 15:20, Dmitry Baryshkov wrote: Move setting up encoders from set_encoder_mode to _dpu_kms_initialize_dsi() / _dpu_kms_initialize_displayport(). This allows us to support not only "single DSI" and "bonded DSI" but also "two independent DSI" configurations. In future this would also

Re: [PATCH] drm/of: free the iterator object on failure

2021-07-12 Thread Steven Price
On 12/07/2021 17:50, Laurent Pinchart wrote: > Hi Steven, > > Thank you for the patch. > > On Mon, Jul 12, 2021 at 04:57:58PM +0100, Steven Price wrote: >> When bailing out due to the sanity check the iterator value needs to be >> freed because the early return prevents for_each_child_of_node() f

Re: [Intel-gfx] [PATCH 28/47] drm/i915: Hold reference to intel_context over life of i915_request

2021-07-12 Thread Matthew Brost
On Mon, Jul 12, 2021 at 08:05:30PM +, Matthew Brost wrote: > On Mon, Jul 12, 2021 at 11:23:14AM -0700, John Harrison wrote: > > On 6/24/2021 00:04, Matthew Brost wrote: > > > Hold a reference to the intel_context over life of an i915_request. > > > Without this an i915_request can exist after t

Re: [PATCH 23/47] drm/i915/guc: Update GuC debugfs to support new GuC

2021-07-12 Thread John Harrison
On 7/12/2021 13:59, Matthew Brost wrote: On Mon, Jul 12, 2021 at 11:05:59AM -0700, John Harrison wrote: On 6/24/2021 00:04, Matthew Brost wrote: 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/i

Re: [PATCH 25/47] drm/i915: Add intel_context tracing

2021-07-12 Thread Matthew Brost
On Mon, Jul 12, 2021 at 11:10:40AM -0700, John Harrison wrote: > On 6/24/2021 00:04, Matthew Brost wrote: > > 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 optio

Re: [Intel-gfx] [PATCH 28/47] drm/i915: Hold reference to intel_context over life of i915_request

2021-07-12 Thread John Harrison
On 7/12/2021 14:36, Matthew Brost wrote: On Mon, Jul 12, 2021 at 08:05:30PM +, Matthew Brost wrote: On Mon, Jul 12, 2021 at 11:23:14AM -0700, John Harrison wrote: On 6/24/2021 00:04, Matthew Brost wrote: Hold a reference to the intel_context over life of an i915_request. Without this an i9

Re: [PATCH 25/47] drm/i915: Add intel_context tracing

2021-07-12 Thread John Harrison
On 7/12/2021 14:47, Matthew Brost wrote: On Mon, Jul 12, 2021 at 11:10:40AM -0700, John Harrison wrote: On 6/24/2021 00:04, Matthew Brost wrote: 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_

Re: [PATCH] drm/of: free the iterator object on failure

2021-07-12 Thread Laurent Pinchart
Hi Steven, On Mon, Jul 12, 2021 at 10:31:52PM +0100, Steven Price wrote: > On 12/07/2021 17:50, Laurent Pinchart wrote: > > On Mon, Jul 12, 2021 at 04:57:58PM +0100, Steven Price wrote: > >> When bailing out due to the sanity check the iterator value needs to be > >> freed because the early return

[PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-12 Thread Felix Kuehling
KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE to avoid mmap failures on private read-only or PROT_NONE mappings. v2: protect against mprotect making a mapping writable after the fact v3: update dri

Re: [PATCH AUTOSEL 4.4 08/31] drm/virtio: Fixes a potential NULL pointer dereference on probe failure

2021-07-12 Thread Pavel Machek
Hi! > From: Xie Yongji > > [ Upstream commit 17f46f488a5d82c5568e6e786cd760bba1c2ee09 ] > > The dev->dev_private might not be allocated if virtio_gpu_pci_quirk() > or virtio_gpu_init() failed. In this case, we should avoid the cleanup > in virtio_gpu_release(). The check is in wrong place at l

Re: [PATCH 34/47] drm/i915/guc: Suspend/resume implementation for new interface

2021-07-12 Thread John Harrison
On 6/24/2021 00:05, Matthew Brost wrote: 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 C

Re: [PATCH 35/47] drm/i915/guc: Handle context reset notification

2021-07-12 Thread John Harrison
On 6/24/2021 00:05, Matthew Brost wrote: 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 Sig

Re: [PATCH 36/47] drm/i915/guc: Handle engine reset failure notification

2021-07-12 Thread John Harrison
On 6/24/2021 00:05, Matthew Brost wrote: 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 Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/uc/intel_guc.h

Re: [PATCH 37/47] drm/i915/guc: Enable the timer expired interrupt for GuC

2021-07-12 Thread John Harrison
On 6/24/2021 00:05, Matthew Brost wrote: 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 Reviewed-by: John Harrison --- drivers/gpu/drm/i915/gt/intel_

Re: [PATCH 41/47] drm/i915/guc: Capture error state on context reset

2021-07-12 Thread John Harrison
On 6/24/2021 00:05, Matthew Brost wrote: 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, fu

[PATCH 1/2] drm/i915/gem: Correct the locking and pin pattern for dma-buf (v5)

2021-07-12 Thread Jason Ekstrand
From: Thomas Hellström If our exported dma-bufs are imported by another instance of our driver, that instance will typically have the imported dma-bufs locked during dma_buf_map_attachment(). But the exporter also locks the same reservation object in the map_dma_buf() callback, which leads to rec

[PATCH 2/2] drm/i915/gem: Migrate to system at dma-buf attach time (v5)

2021-07-12 Thread Jason Ekstrand
From: Thomas Hellström Until we support p2p dma or as a complement to that, migrate data to system memory at dma-buf attach time if possible. v2: - Rebase on dynamic exporter. Update the igt_dmabuf_import_same_driver selftest to migrate if we are LMEM capable. v3: - Migrate also in the pin() c

Re: [PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms

2021-07-12 Thread kernel test robot
Hi Ryan, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20210712] [cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13 v5.13-rc7 v5.14-rc1] [If your patch

Re: [PATCH 02/16] drm/i915/guc/slpc: Initial definitions for slpc

2021-07-12 Thread Belgaumkar, Vinay
On 7/10/2021 7:27 AM, Michal Wajdeczko wrote: Hi Vinay, On 10.07.2021 03:20, Vinay Belgaumkar wrote: Add macros to check for slpc support. This feature is currently supported for gen12+ and enabled whenever guc submission is enabled/selected. please try to use consistent names across all p

[PATCH 0/4] CMDQ refinement of Mediatek DRM driver

2021-07-12 Thread Chun-Kuang Hu
These refinements include using standard mailbox callback interface, timeout detection, and a fixed cmdq_handle. Chun-Kuang Hu (4): drm/mediatek: Use mailbox rx_callback instead of cmdq_task_cb drm/mediatek: Remove struct cmdq_client drm/mediatek: Detect CMDQ execution timeout drm/mediatek

[PATCH 1/4] drm/mediatek: Use mailbox rx_callback instead of cmdq_task_cb

2021-07-12 Thread Chun-Kuang Hu
rx_callback is a standard mailbox callback mechanism and could cover the function of proprietary cmdq_task_cb, so use the standard one instead of the proprietary one. Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 16 +--- 1 file changed, 13 insertions(+),

[PATCH 2/4] drm/mediatek: Remove struct cmdq_client

2021-07-12 Thread Chun-Kuang Hu
In mailbox rx_callback, it pass struct mbox_client to callback function, but it could not map back to mtk_drm_crtc instance because struct cmdq_client use a pointer to struct mbox_client: struct cmdq_client { struct mbox_client client; struct mbox_chan *chan; }; struct mtk_drm_crt

[PATCH 4/4] drm/mediatek: Add cmdq_handle in mtk_crtc

2021-07-12 Thread Chun-Kuang Hu
One mtk_crtc need just one cmdq_handle, so add one cmdq_handle in mtk_crtc to prevent frequently allocation and free of cmdq_handle. Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 28 - 1 file changed, 18 insertions(+), 10 deletions(-) diff --

[PATCH 3/4] drm/mediatek: Detect CMDQ execution timeout

2021-07-12 Thread Chun-Kuang Hu
CMDQ is used to update display register in vblank period, so it should be execute in next vblank. If it fail to execute in next 2 vblank, tiemout happen. Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-)

Re: [PATCH v2] drm/mediatek: clear pending flag when cmdq packet is done.

2021-07-12 Thread Chun-Kuang Hu
Hi, Yongqiang: Yongqiang Niu 於 2021年7月12日 週一 下午2:42寫道: > > In cmdq mode, packet may be flushed before it is executed, so > the pending flag should be cleared after cmdq packet is done. I would like this patch to base on the series [1] because that series use the standard mailbox callback interfa

Re: [Intel-gfx] [PATCH 04/16] drm/i915/guc/slpc: Lay out slpc init/enable/disable/fini

2021-07-12 Thread Belgaumkar, Vinay
On 7/10/2021 7:35 AM, Michal Wajdeczko wrote: On 10.07.2021 03:20, Vinay Belgaumkar wrote: Declare header and source files for SLPC, along with init and enable/disable function templates. later you claim that "disable" is not needed Changed. Signed-off-by: Vinay Belgaumkar Signed-

Re: [PATCH 1/3] drm/amdgpu: create amdgpu_vkms

2021-07-12 Thread kernel test robot
Hi Ryan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20210712] [also build test WARNING on v5.14-rc1] [cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14

Re: [PATCH 1/3] drm/amdgpu: create amdgpu_vkms

2021-07-12 Thread kernel test robot
Hi Ryan, Thank you for the patch! Yet something to improve: [auto build test ERROR on next-20210712] [also build test ERROR on v5.14-rc1] [cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13

Re: [PATCH 3/3] drm/amdgpu: replace dce_virtual with amdgpu_vkms

2021-07-12 Thread kernel test robot
Hi Ryan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on next-20210712] [cannot apply to drm-intel/for-linux-next drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.14-rc1 v5.13 v5.13-rc7 v5.14-rc1] [If your

Re: [RFC PATCH v2 1/4] drm_print.h: rewrap __DRM_DEFINE_DBG_RATELIMITED macro

2021-07-12 Thread jim . cromie
On Sun, Jul 11, 2021 at 10:17 AM Joe Perches wrote: > > On Sat, 2021-07-10 at 23:49 -0600, Jim Cromie wrote: > > whitespace only, to diff-minimize a later commit. > > no functional changes > [] > > diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h > [] > > @@ -524,19 +524,24 @@ void _

Re: [Intel-gfx] [PATCH v2 3/3] drm/i915/uapi: reject set_domain for discrete

2021-07-12 Thread Kenneth Graunke
On Friday, July 2, 2021 12:22:58 PM PDT Daniel Vetter wrote: > On Fri, Jul 02, 2021 at 03:31:08PM +0100, Tvrtko Ursulin wrote: > > > > On 01/07/2021 16:10, Matthew Auld wrote: > > > The CPU domain should be static for discrete, and on DG1 we don't need > > > any flushing since everything is alread

Re: [PATCH v4 02/18] drm/sched: Barriers are needed for entity->last_scheduled

2021-07-12 Thread Christian König
Am 12.07.21 um 19:53 schrieb Daniel Vetter: It might be good enough on x86 with just READ_ONCE, but the write side should then at least be WRITE_ONCE because x86 has total store order. It's definitely not enough on arm. Fix this proplery, which means - explain the need for the barrier in both p

Re: [PATCH v4 01/18] drm/sched: Split drm_sched_job_init

2021-07-12 Thread Christian König
Am 12.07.21 um 19:53 schrieb Daniel Vetter: This is a very confusingly named function, because not just does it init an object, it arms it and provides a point of no return for pushing a job into the scheduler. It would be nice if that's a bit clearer in the interface. But the real reason is tha

Re: [PATCH v4 02/18] drm/sched: Barriers are needed for entity->last_scheduled

2021-07-12 Thread Daniel Vetter
On Tue, Jul 13, 2021 at 8:35 AM Christian König wrote: > > Am 12.07.21 um 19:53 schrieb Daniel Vetter: > > It might be good enough on x86 with just READ_ONCE, but the write side > > should then at least be WRITE_ONCE because x86 has total store order. > > > > It's definitely not enough on arm. > >

Re: [PATCH v4 01/18] drm/sched: Split drm_sched_job_init

2021-07-12 Thread Daniel Vetter
On Tue, Jul 13, 2021 at 8:40 AM Christian König wrote: > > Am 12.07.21 um 19:53 schrieb Daniel Vetter: > > This is a very confusingly named function, because not just does it > > init an object, it arms it and provides a point of no return for > > pushing a job into the scheduler. It would be nice

Re: [PATCH v3 1/1] drm/ttm: Fix COW check

2021-07-12 Thread Christian König
Am 13.07.21 um 00:06 schrieb Felix Kuehling: KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE to avoid mmap failures on private read-only or PROT_NONE mappings. v2: protect against mprotect makin

<    1   2