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

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

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

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

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

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

[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

[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

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

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

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

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

[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

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

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

Re: [PATCH 31/47] drm/i915/guc: Reset implementation for new GuC interface

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

Re: [PATCH 1/1] drm: bridge: Mark deprecated operations in drm_bridge_funcs

2021-07-12 Thread Sam Ravnborg
Hi Laurent, On Sat, Jul 10, 2021 at 11:46:24PM +0300, Laurent Pinchart wrote: > Hi Sam, > > Thank you for the patch. > > On Sat, Jul 10, 2021 at 10:42:40AM +0200, Sam Ravnborg wrote: > > drm_bridge_funcs includes several duplicated operations as atomic > > variants has been added over time. > >

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

2021-07-12 Thread Ryan Taylor
Move dce_virtual into amdgpu_vkms and update all references to dce_virtual with amdgpu_vkms. Signed-off-by: Ryan Taylor --- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 195 drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.h | 3 - dr

[PATCH 2/3] drm/amdgpu: cleanup dce_virtual

2021-07-12 Thread Ryan Taylor
Remove obsolete functions and variables from dce_virtual. Signed-off-by: Ryan Taylor --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 568 +-- 1 file changed, 3 insertions(+), 565 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/

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

2021-07-12 Thread Ryan Taylor
Modify the VKMS driver into an api that dce_virtual can use to create virtual displays that obey drm's atomic modesetting api. Signed-off-by: Ryan Taylor --- drivers/gpu/drm/amd/amdgpu/Makefile | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_drv.

[PATCH 0/3] drm/amdgpu: modernize virtual display feature

2021-07-12 Thread Ryan Taylor
The amdgpu vkms interface provides a virtual KMS interface for several use cases: devices without display hardware, platforms where the actual display hardware is not useful (e.g., servers), SR-IOV virtual functions, device emulation/simulation, and device bring up prior to display hardware being u

Re: Linux 5.14-rc1

2021-07-12 Thread Christian König
Hi guys, Am 12.07.21 um 21:14 schrieb Linus Torvalds: On Mon, Jul 12, 2021 at 12:08 AM Jon Masters wrote: I happened to be installing a Fedora 34 (x86) VM for something and did a test kernel compile that hung on boot. Setting up a serial console I get the below backtrace from ttm but I have no

Re: [PATCH 30/47] drm/i915/guc: Direct all breadcrumbs for a class to single breadcrumbs

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

Re: Linux 5.14-rc1

2021-07-12 Thread Linus Torvalds
On Mon, Jul 12, 2021 at 12:08 AM Jon Masters wrote: > > I happened to be installing a Fedora 34 (x86) VM for something and did a > test kernel compile that hung on boot. Setting up a serial console I get > the below backtrace from ttm but I have not had chance to look at it. It's a NULL pointer i

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

Re: [PATCH 29/47] drm/i915/guc: Disable bonding extension with GuC submission

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

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

2021-07-12 Thread John Harrison
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, but user space holds a reference to the request from an out fence). In th

[PATCH] drm/mediatek: Test component initialization earlier in the function mtk_drm_crtc_create

2021-07-12 Thread Dafna Hirschfeld
The initialization is currently tested in a later stage in the function for no reason. In addition, the test '!comp' will never fail since comp is set with the '&' operator. Instead, test if a comp was not initialized by testing "!comp->dev". Signed-off-by: Dafna Hirschfeld --- drivers/gpu/drm/m

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

2021-07-12 Thread John Harrison
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 submission mode, the decomposition of virtual to physical engines does not happen

Re: [Intel-gfx] [PATCH 16/47] drm/i915/guc: Disable engine barriers with GuC during unpin

2021-07-12 Thread Daniel Vetter
On Mon, Jul 12, 2021 at 7:57 PM John Harrison wrote: > > On 7/9/2021 20:00, Matthew Brost wrote: > > On Fri, Jul 09, 2021 at 03:53:29PM -0700, John Harrison wrote: > >> On 6/24/2021 00:04, Matthew Brost wrote: > >>> Disable engine barriers for unpinning with GuC. This feature isn't > >>> needed wi

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

2021-07-12 Thread John Harrison
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 option. Cc: John Harrison Signed-off-by: Matthew Brost --- drivers/gpu/drm/

Re: [PATCH 24/47] drm/i915/guc: Add several request trace points

2021-07-12 Thread John Harrison
On 6/24/2021 00:04, Matthew Brost wrote: Add trace points for request dependencies and GuC submit. Extended existing request trace points to include submit fence value,, guc_id, Excessive punctuation. Or maybe should say 'fence value, tail, guc_id'? With that fixed: Reviewed-by: John Harrison

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

2021-07-12 Thread John Harrison
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 | 22 drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h | 3 ++ .../gpu/drm/i915/

Re: [PATCH 0/4] vkms: Switch to shadow-buffered plane state

2021-07-12 Thread Thomas Zimmermann
Hi Am 12.07.21 um 16:26 schrieb Sumera Priyadarsini: On Mon, Jul 12, 2021 at 6:53 PM Thomas Zimmermann wrote: Hi Am 12.07.21 um 13:56 schrieb Sumera Priyadarsini: On Mon, Jul 5, 2021 at 1:16 PM Thomas Zimmermann wrote: Vkms copies each plane's framebuffer into the output buffer; essentia

Re: [PATCH 16/47] drm/i915/guc: Disable engine barriers with GuC during unpin

2021-07-12 Thread John Harrison
On 7/9/2021 20:00, Matthew Brost wrote: On Fri, Jul 09, 2021 at 03:53:29PM -0700, John Harrison wrote: On 6/24/2021 00:04, Matthew Brost wrote: Disable engine barriers for unpinning with GuC. This feature isn't needed with the GuC as it disables context scheduling before unpinning which guarant

Re: [PATCH 17/47] drm/i915/guc: Extend deregistration fence to schedule disable

2021-07-12 Thread John Harrison
On 7/9/2021 20:36, Matthew Brost wrote: On Fri, Jul 09, 2021 at 03:59:11PM -0700, John Harrison wrote: On 6/24/2021 00:04, Matthew Brost wrote: Extend the deregistration context fence to fence whne a GuC context has scheduling disable pending. Cc: John Harrison Signed-off-by: Matthew Brost -

Re: Aw: Re: [PATCH] soc: mediatek: mmsys: fix HDMI output on mt7623/bananapi-r2

2021-07-12 Thread Dafna Hirschfeld
Hi, On 12.07.21 19:16, Frank Wunderlich wrote: Hi, it turns out that problem is the read+or of the new value i reverted my patch and changed reg = readl_relaxed(mmsys->regs + routes[i].addr) | routes[i].val; writel_relaxed(reg, mmsys->regs + routes[i].addr); to writel_relaxed(routes[i].val,

Re: [PATCH 1/2 v3] drm/panel: Add DT bindings for Samsung LMS380KF01

2021-07-12 Thread Rob Herring
On Thu, 08 Jul 2021 01:43:14 +0200, Linus Walleij wrote: > This adds device tree bindings for the Samsung Mobile Displays > LMS380KF01 RGB DPI display panel. > > Cc: devicet...@vger.kernel.org > Cc: phone-de...@vger.kernel.org > Cc: Douglas Anderson > Cc: Noralf Trønnes > Signed-off-by: Linus Wa

Aw: Re: [PATCH] soc: mediatek: mmsys: fix HDMI output on mt7623/bananapi-r2

2021-07-12 Thread Frank Wunderlich
Hi, it turns out that problem is the read+or of the new value i reverted my patch and changed reg = readl_relaxed(mmsys->regs + routes[i].addr) | routes[i].val; writel_relaxed(reg, mmsys->regs + routes[i].addr); to writel_relaxed(routes[i].val, mmsys->regs + routes[i].addr); and it works too,

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

2021-07-12 Thread Laurent Pinchart
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() from > doing the dereference itself. > > Fixes: 4ee48cc55

Re: [PATCH] drm/fourcc: Add modifier definitions for Arm Fixed Rate Compression

2021-07-12 Thread Simon Ser
Thanks a lot for the documentation, I appreciate the effort.

Re: drm/i915/ttm Initialize the ttm device and memory managers

2021-07-12 Thread Matthew Auld
On Mon, 12 Jul 2021 at 16:17, Colin Ian King wrote: > > Hi, > > Static analysis with Coverity on linux-next has found a potential issue > in drivers/gpu/drm/i915/selftests/intel_memory_region.c in function > igt_mock_fill - the problematic commit is as follows: > > commit d148738923fdb5077089e48ec

Re: [PATCH v2 1/2] dt-bindings: display: rockchip: Add compatible for rk3568 HDMI

2021-07-12 Thread Rob Herring
On Wed, 07 Jul 2021 14:03:22 +0200, Benjamin Gaignard wrote: > Define a new compatible for rk3568 HDMI. > This version of HDMI hardware block needs two new clocks hclk_vio and hclk > to provide phy reference clocks. > > Signed-off-by: Benjamin Gaignard > --- > version 2: > - Add the clocks needed

Re: [PATCH] drm/fourcc: Add modifier definitions for Arm Fixed Rate Compression

2021-07-12 Thread Liviu Dudau
On Thu, Jul 01, 2021 at 06:07:09PM +0100, Normunds Rieksts wrote: > Arm Fixed Rate Compression (AFRC) is a proprietary fixed rate image > compression protocol and format. > It is designed to provide guaranteed bandwidth and memory footprint > reductions in graphics and media use-cases. > > This pa

Re: [PATCH 1/2] drm: add crtc background color property

2021-07-12 Thread Harry Wentland
On 2021-07-12 4:03 a.m., Pekka Paalanen wrote: > On Fri, 9 Jul 2021 18:23:26 +0200 > Raphael Gallais-Pou wrote: > >> On 7/9/21 10:04 AM, Pekka Paalanen wrote: >>> On Wed, 7 Jul 2021 08:48:47 + >>> Raphael GALLAIS-POU - foss wrote: >>> Some display controllers can be programmed to p

Re: [PATCH 1/8] drm/i915: Explicitly track DRM clients

2021-07-12 Thread Daniel Vetter
On Mon, Jul 12, 2021 at 04:51:42PM +0100, Tvrtko Ursulin wrote: > > On 12/07/2021 15:42, Daniel Vetter wrote: > > On Mon, Jul 12, 2021 at 01:17:12PM +0100, Tvrtko Ursulin wrote: > > > From: Tvrtko Ursulin > > > > > > Tracking DRM clients more explicitly will allow later patches to > > > accumula

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

2021-07-12 Thread Steven Price
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() from doing the dereference itself. Fixes: 4ee48cc5586b ("drm: of: Fix double-free bug") Signed-off-by: Steven Price --- drivers/gpu/drm/drm_of.c | 4 +++- 1 fi

Re: [PATCH 1/8] drm/i915: Explicitly track DRM clients

2021-07-12 Thread Tvrtko Ursulin
On 12/07/2021 15:42, Daniel Vetter wrote: On Mon, Jul 12, 2021 at 01:17:12PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Tracking DRM clients more explicitly will allow later patches to accumulate past and current GPU usage in a centralised place and also consolidate access to owning t

Re: [PATCH 0/2] Add "BACKGROUND_COLOR" drm property

2021-07-12 Thread Raphael Gallais-Pou
On 7/9/21 11:23 AM, Simon Ser wrote: > On Friday, July 9th, 2021 at 11:09, Raphael Gallais-Pou > wrote: > >> We don't usually test with piglit and igt-gpu-tools. Instead, modetest >> utility of the libdrm is used quite often (as is it the case in order to >> test this property). > Just to make

Re: [PATCH v2, 2/3] drm/mediatek: add mt8183 aal support

2021-07-12 Thread Chun-Kuang Hu
Hi, Yongqiang: Yongqiang Niu 於 2021年7月12日 週一 上午9:03寫道: > > This patch add mt8183 private data Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, Chun-Kuang. > > Signed-off-by: Yongqiang Niu >

Re: [PATCH v2, 1/3] drm/mediatek: Separate aal module

2021-07-12 Thread Chun-Kuang Hu
Hi, Yongqiang: Yongqiang Niu 於 2021年7月12日 週一 上午9:03寫道: > > mt8183 aal has no gamma function Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, Chun-Kuang. > > Signed-off-by: Yongqiang Niu > -

Re: [RFC PATCH 08/17] dt-bindings: display: bridge: Add Samsung MIPI DSIM bridge

2021-07-12 Thread Jagan Teki
On Mon, Jul 12, 2021 at 8:43 PM Rob Herring wrote: > > On Sun, Jul 04, 2021 at 02:32:21PM +0530, Jagan Teki wrote: > > Samsing MIPI DSIM bridge can be found on Exynos and NXP's > > i.MX8M Mini and Nano SoC's. > > > > This dt-bindings replaces legacy exynos_dsim.txt. > > > > Used the example node f

  1   2   >