Re: [Intel-gfx] [PATCH] Revert "i915: use io_mapping_map_user"

2021-06-02 Thread Matthew Auld
On Thu, 27 May 2021 at 19:52, Matthew Auld wrote: > > This reverts commit b739f125e4ebd73d10ed30a856574e13649119ed. > > We are unfortunately seeing more issues like we did in 293837b9ac8d > ("Revert "i915: fix remap_io_sg to verify the pgprot""), except this is > now for the vm_fault_gtt path, whe

Re: [PATCH] vgaarb: Call vga_arb_device_init() after PCI enumeration

2021-06-02 Thread Huacai Chen
Hi, Daniel, On Tue, Jun 1, 2021 at 11:56 PM Daniel Vetter wrote: > > On Fri, May 28, 2021 at 04:26:07PM +0800, Huacai Chen wrote: > > We should call vga_arb_device_init() after PCI enumeration, otherwise it > > may fail to select the default VGA device. Since vga_arb_device_init() > > and PCI enu

Re: [PATCH 0/7] libdrm tests for hot-unplug feature

2021-06-02 Thread Daniel Vetter
On Tue, Jun 1, 2021 at 10:17 PM Andrey Grodzovsky wrote: > Adding some tests to acompany the recently added hot-unplug > feature. For now the test suite is disabled until the feature > propagates from drm-misc-next to drm-next. > > Andrey Grodzovsky (7): > tests/amdgpu: Fix valgrind warning >

Re: [Intel-gfx] [PATCH] Revert "i915: use io_mapping_map_user"

2021-06-02 Thread Daniel Vetter
On Wed, Jun 2, 2021 at 9:28 AM Matthew Auld wrote: > > On Thu, 27 May 2021 at 19:52, Matthew Auld wrote: > > > > This reverts commit b739f125e4ebd73d10ed30a856574e13649119ed. > > > > We are unfortunately seeing more issues like we did in 293837b9ac8d > > ("Revert "i915: fix remap_io_sg to verify

[PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF

2021-06-02 Thread Souptick Joarder
Kernel test robot throws below warning when CONFIG_OF is not set. >> drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34: warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable] static const struct of_device_id rockchip_dp_dt_ids[] = { Fixed it by defining rockchip_dp_dt_ids

Re: Linux Graphics Next: Userspace submission update

2021-06-02 Thread Michel Dänzer
On 2021-06-01 12:49 p.m., Michel Dänzer wrote: > On 2021-06-01 12:21 p.m., Christian König wrote: > >> Another question is if that is sufficient as security for the display server >> or if we need further handling down the road? I mean essentially we are >> moving the reliability problem into th

Merging TTM branches through the Intel tree?

2021-06-02 Thread Thomas Hellström
Christian, Are you OK with merging the TTM brances from the i915 TTM enablement series through the intel tree? Thanks, Thomas

[PATCH] drm/ttm: nuke VM_MIXEDMAP on BO mappings

2021-06-02 Thread Christian König
We discussed if that is really the right approach for quite a while now, but digging deeper into a bug report on arm turned out that this is actually horrible broken right now. The reason for this is that vmf_insert_mixed_prot() always tries to grab a reference to the underlaying page on architect

Re: Merging TTM branches through the Intel tree?

2021-06-02 Thread Christian König
Uff I'm just waiting for feedback from Philip to merge a large patch set for TTM through drm-misc-next. I'm pretty sure we will run into merge conflicts if you try to push your changes through the Intel tree. Christian. Am 02.06.21 um 10:26 schrieb Thomas Hellström: Christian, Are you OK wit

[PATCH v10 00/11] Move LMEM (VRAM) management over to TTM

2021-06-02 Thread Thomas Hellström
This is an initial patch series to move discrete memory management over to TTM. It will be followed up shortly with adding more functionality. The buddy allocator is temporarily removed along with its selftests and It is replaced with the TTM range manager and some selftests are adjusted to accoun

[PATCH v10 01/11] drm/i915/ttm Initialize the ttm device and memory managers

2021-06-02 Thread Thomas Hellström
Temporarily remove the buddy allocator and related selftests and hook up the TTM range manager for i915 regions. Also modify the mock region selftests somewhat to account for a fragmenting manager. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld #v2 --- v2: - Fix an error unwind in lm

[PATCH v10 02/11] drm/i915/ttm: Embed a ttm buffer object in the i915 gem object

2021-06-02 Thread Thomas Hellström
Embed a struct ttm_buffer_object into the i915 gem object, making sure we alias the gem object part. It's a bit unfortunate that the struct ttm_buffer_ojbect embeds a gem object since we otherwise could make the TTM part private to the TTM backend, and use the usual i915 gem object for the other ba

[PATCH v10 03/11] drm/ttm: Add a generic TTM memcpy move for page-based iomem

2021-06-02 Thread Thomas Hellström
The internal ttm_bo_util memcpy uses ioremap functionality, and while it probably might be possible to use it for copying in- and out of sglist represented io memory, using io_mem_reserve() / io_mem_free() callbacks, that would cause problems with fault(). Instead, implement a method mapping page-b

[PATCH v10 04/11] drm: Add a prefetching memcpy_from_wc

2021-06-02 Thread Thomas Hellström
Reading out of write-combining mapped memory is typically very slow since the CPU doesn't prefetch. However some archs have special instructions to do this. So add a best-effort memcpy_from_wc taking dma-buf-map pointer arguments that attempts to use a fast prefetching memcpy and otherwise falls b

[PATCH v10 05/11] drm/ttm: Use drm_memcpy_from_wc for TTM bo moves

2021-06-02 Thread Thomas Hellström
Use fast wc memcpy for reading out of wc memory for TTM bo moves. Cc: Dave Airlie Cc: Christian König Cc: Daniel Vetter Signed-off-by: Thomas Hellström Reviewed-by: Christian König #v4 -- v4: - Clarify when we try drm_memcpy_from_wc_dbm (Reported by Matthew Auld) - Be paranoid about when drm_

[PATCH v10 06/11] drm/ttm: Document and optimize ttm_bo_pipeline_gutting()

2021-06-02 Thread Thomas Hellström
If the bo is idle when calling ttm_bo_pipeline_gutting(), we unnecessarily create a ghost object and push it out to delayed destroy. Fix this by adding a path for idle, and document the function. Also avoid having the bo end up in a bad state vulnerable to user-space triggered kernel BUGs if the c

[PATCH v10 07/11] drm/ttm, drm/amdgpu: Allow the driver some control over swapping

2021-06-02 Thread Thomas Hellström
We are calling the eviction_valuable driver callback at eviction time to determine whether we actually can evict a buffer object. The upcoming i915 TTM backend needs the same functionality for swapout, and that might actually be beneficial to other drivers as well. Add an eviction_valuable call al

[PATCH v10 08/11] drm/i915/ttm: Introduce a TTM i915 gem object backend

2021-06-02 Thread Thomas Hellström
Most logical place to introduce TTM buffer objects is as an i915 gem object backend. We need to add some ops to account for added functionality like delayed delete and LRU list manipulation. Initially we support only LMEM and SYSTEM memory, but SYSTEM (which in this case means evicted LMEM objects

[PATCH v10 10/11] drm/vma: Add a driver_private member to vma_node.

2021-06-02 Thread Thomas Hellström
From: Maarten Lankhorst This allows drivers to distinguish between different types of vma_node's. The readonly flag was unused and is thus removed. This is a temporary solution, until i915 is converted completely to use ttm for bo's. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellstr

[PATCH v10 11/11] drm/i915: Use ttm mmap handling for ttm bo's.

2021-06-02 Thread Thomas Hellström
From: Maarten Lankhorst Use the ttm handlers for servicing page faults, and vm_access. We do our own validation of read-only access, otherwise use the ttm handlers as much as possible. Because the ttm handlers expect the vma_node at vma->base, we slightly need to massage the mmap handlers to lo

[PATCH v10 09/11] drm/i915/lmem: Verify checks for lmem residency

2021-06-02 Thread Thomas Hellström
Since objects can be migrated or evicted when not pinned or locked, update the checks for lmem residency or future residency so that the value returned is not immediately stale. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: Simplify i915_gem_object_migratable() (Reported by M

Re: [PATCH v9 07/10] mm: Device exclusive memory access

2021-06-02 Thread Balbir Singh
On Wed, May 26, 2021 at 12:17:18AM -0700, John Hubbard wrote: > On 5/25/21 4:51 AM, Balbir Singh wrote: > ... > > > How beneficial is this code to nouveau users? I see that it permits a > > > part of OpenCL to be implemented, but how useful/important is this in > > > the real world? > > > > That

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Daniel Stone
Hi Christian, On Tue, 1 Jun 2021 at 13:51, Christian König wrote: > Am 01.06.21 um 14:30 schrieb Daniel Vetter: > > If you want to enable this use-case with driver magic and without the > > compositor being aware of what's going on, the solution is EGLStreams. > > Not sure we want to go there, bu

Re: [PATCH 5/9] drm: Add Client Cap for advance gamma mode

2021-06-02 Thread Pekka Paalanen
On Tue, 1 Jun 2021 16:11:31 +0530 Uma Shankar wrote: > Introduced a client cap for advance cap mode capability. Userspace Typo: "cap mode" should be "gamma mode"? > should set this to get to be able to use the new gamma_mode property. > > If this is not set, driver will work in legacy mode. >

Re: [PATCH] drm/ttm: nuke VM_MIXEDMAP on BO mappings

2021-06-02 Thread Intel
On 6/2/21 10:30 AM, Christian König wrote: We discussed if that is really the right approach for quite a while now, but digging deeper into a bug report on arm turned out that this is actually horrible broken right now. The reason for this is that vmf_insert_mixed_prot() always tries to grab a

Re: [PATCH 1/9] drm: Add gamma mode property

2021-06-02 Thread Pekka Paalanen
On Tue, 1 Jun 2021 16:11:27 +0530 Uma Shankar wrote: > Add a gamma mode property to enable various kind of > gamma modes supported by platforms like: Interpolated, Split, > Multi Segmented, Logarithmic etc. Userspace can get this property > and should be able to get the platform capabilities wrt

[PATCH] drm/rockchip: defined struct vop_driver_dt_match[] under CONFIG_OF

2021-06-02 Thread Souptick Joarder
kernel test robot throws warning when CONFIG_OF not set. >> drivers/gpu/drm/rockchip/rockchip_vop_reg.c:1038:34: warning: unused variable 'vop_driver_dt_match' [-Wunused-const-variable] static const struct of_device_id vop_driver_dt_match[] = { Fixed it by defining vop_driver_dt_match[] under

Re: Merging TTM branches through the Intel tree?

2021-06-02 Thread Intel
On 6/2/21 10:32 AM, Christian König wrote: Uff I'm just waiting for feedback from Philip to merge a large patch set for TTM through drm-misc-next. I'm pretty sure we will run into merge conflicts if you try to push your changes through the Intel tree. Christian. OK, so what would be the

Re: [PATCH 2/7] xf86drm: Add function to retrieve char device path

2021-06-02 Thread Simon Ser
Do we really need to make this a public API?

Re: [PATCH 00/21] Add Support for Plane Color Lut and CSC features

2021-06-02 Thread Pekka Paalanen
On Tue, 1 Jun 2021 16:21:57 +0530 Uma Shankar wrote: > This is how a typical display color hardware pipeline looks like: > +---+ > |RAM| > | +--++-++-+ | > | | FB 1 || FB 2

Re: [PATCH 01/21] drm: Add Enhanced Gamma and color lut range attributes

2021-06-02 Thread Pekka Paalanen
On Tue, 1 Jun 2021 16:21:58 +0530 Uma Shankar wrote: > Existing LUT precision structure is having only 16 bit > precision. This is not enough for upcoming enhanced hardwares > and advance usecases like HDR processing. Hence added a new > structure with 32 bit precision values. > > This also def

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Marek Olšák
Yes, we can't break anything because we don't want to complicate things for us. It's pretty much all NAK'd already. We are trying to gather more knowledge and then make better decisions. The idea we are considering is that we'll expose memory-based sync objects to userspace for read only, and the

[PATCH] drm/i915/gem/mman: only allow WC for lmem

2021-06-02 Thread Matthew Auld
For dgfx where we now have lmem and ttm, we can only support single mmap mode for the lifetime of the object, and for lmem objects this should be WC, so reject all other mapping modes for mmap_offset, including if the object can be placed in both smem and lmem. Signed-off-by: Matthew Auld Cc: Tho

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Marek Olšák
On Wed, Jun 2, 2021 at 5:34 AM Marek Olšák wrote: > Yes, we can't break anything because we don't want to complicate things > for us. It's pretty much all NAK'd already. We are trying to gather more > knowledge and then make better decisions. > > The idea we are considering is that we'll expose m

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Christian König
Am 02.06.21 um 10:57 schrieb Daniel Stone: Hi Christian, On Tue, 1 Jun 2021 at 13:51, Christian König wrote: Am 01.06.21 um 14:30 schrieb Daniel Vetter: If you want to enable this use-case with driver magic and without the compositor being aware of what's going on, the solution is EGLStreams.

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest()

2021-06-02 Thread Tvrtko Ursulin
On 01/06/2021 10:19, Ursulin, Tvrtko wrote: [Don't see this on intel-gfx so I have to reply with top post.] Reviewed-by: Tvrtko Ursulin Pushed with commit text wrapped and Fixes: tag fixed, thanks for the patch! Regards, Tvrtko -Original Message- From: Zhihao Cheng Sent: Satu

Re: [Intel-gfx] [PATCH -next] drm/i915: use DEVICE_ATTR_RO macro

2021-06-02 Thread Tvrtko Ursulin
On 01/06/2021 10:15, Tvrtko Ursulin wrote: On 28/05/2021 11:04, YueHaibing wrote: Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(), which makes the code a bit shorter and easier to read. Signed-off-by: YueHaibing ---   drivers/gpu/drm/i915/i915_pmu.c   |  8 +++-   drivers/gpu/

Re: Merging TTM branches through the Intel tree?

2021-06-02 Thread Christian König
Am 02.06.21 um 11:16 schrieb Thomas Hellström (Intel): On 6/2/21 10:32 AM, Christian König wrote: Uff I'm just waiting for feedback from Philip to merge a large patch set for TTM through drm-misc-next. I'm pretty sure we will run into merge conflicts if you try to push your changes through t

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Marek Olšák
On Wed, Jun 2, 2021 at 5:44 AM Christian König < ckoenig.leichtzumer...@gmail.com> wrote: > Am 02.06.21 um 10:57 schrieb Daniel Stone: > > Hi Christian, > > > > On Tue, 1 Jun 2021 at 13:51, Christian König > > wrote: > >> Am 01.06.21 um 14:30 schrieb Daniel Vetter: > >>> If you want to enable thi

Re: [PATCH] drm/ttm: nuke VM_MIXEDMAP on BO mappings

2021-06-02 Thread Christian König
Am 02.06.21 um 11:07 schrieb Thomas Hellström (Intel): On 6/2/21 10:30 AM, Christian König wrote: We discussed if that is really the right approach for quite a while now, but digging deeper into a bug report on arm turned out that this is actually horrible broken right now. The reason for

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-02 Thread Christian König
Am 02.06.21 um 11:58 schrieb Marek Olšák: On Wed, Jun 2, 2021 at 5:44 AM Christian König > wrote: Am 02.06.21 um 10:57 schrieb Daniel Stone: > Hi Christian, > > On Tue, 1 Jun 2021 at 13:51, Christian König > mailto:ckoenig.leichtzumer

Re: [PATCH] drm/rockchip: defined struct rockchip_dp_dt_ids[] under CONFIG_OF

2021-06-02 Thread Robin Murphy
On 2021-06-02 09:02, Souptick Joarder wrote: Kernel test robot throws below warning when CONFIG_OF is not set. drivers/gpu/drm/rockchip/analogix_dp-rockchip.c:457:34: warning: unused variable 'rockchip_dp_dt_ids' [-Wunused-const-variable] static const struct of_device_id rockchip_dp_dt_ids

[PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

2021-06-02 Thread Christian König
To improve the handling we want the establish the resource object as base class for the backend allocations. v2: add missing error handling Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 54 +++--- driv

[PATCH 03/10] drm/ttm: flip over the sys manager to self allocated nodes

2021-06-02 Thread Christian König
Make sure to allocate a resource object here. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_sys_manager.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm_sys_manager.c b/drivers/gpu/drm/ttm/ttm_sys_manager.c index 474221e863d0..2b75f493c3c9 100644

[PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Christian König
Start with the range manager to make the resource object the base class for the allocated nodes. While at it cleanup a lot of the code around that. Signed-off-by: Christian König Reviewed-by: Matthew Auld --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + drivers/gpu/drm/drm_gem_vram_helper.c

[PATCH 05/10] drm/amdkfd: use resource cursor in svm_migrate_copy_to_vram v2

2021-06-02 Thread Christian König
Access to the mm_node is now forbidden. So instead of hand wiring that use the cursor functionality. v2: fix handling as pointed out by Philip. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 68 1 file changed, 10 insertions(+), 58 deletio

[PATCH 06/10] drm/amdgpu: switch the GTT backend to self alloc

2021-06-02 Thread Christian König
Similar to the TTM range manager. Signed-off-by: Christian König Reviewed-by: Matthew Auld --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 36 + 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/drm/a

[PATCH 08/10] drm/nouveau: switch the TTM backends to self alloc

2021-06-02 Thread Christian König
Similar to the TTM range manager. Signed-off-by: Christian König Reviewed-by: Matthew Auld --- drivers/gpu/drm/nouveau/nouveau_mem.h | 1 + drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.h b/drivers/gpu/drm/nou

[PATCH 07/10] drm/amdgpu: switch the VRAM backend to self alloc

2021-06-02 Thread Christian König
Similar to the TTM range manager. Signed-off-by: Christian König Reviewed-by: Matthew Auld --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 51 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/

[PATCH 09/10] drm/vmwgfx: switch the TTM backends to self alloc

2021-06-02 Thread Christian König
Similar to the TTM range manager. Signed-off-by: Christian König Reviewed-by: Matthew Auld --- drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 18 + drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 37 ++- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/d

[PATCH 04/10] drm/amdgpu: revert "drm/amdgpu: stop allocating dummy GTT nodes"

2021-06-02 Thread Christian König
TTM is going to need this again since we are moving the resource allocation into the backend. Signed-off-by: Christian König Acked-by: Matthew Auld --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 68 - 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/drivers

[PATCH 10/10] drm/ttm: flip the switch for driver allocated resources v2

2021-06-02 Thread Christian König
Instead of both driver and TTM allocating memory finalize embedding the ttm_resource object as base into the driver backends. v2: fix typo in vmwgfx grid mgr and double init in amdgpu_vram_mgr.c Signed-off-by: Christian König Reviewed-by: Matthew Auld --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_

Re: [Intel-gfx] [PATCH] Revert "i915: use io_mapping_map_user"

2021-06-02 Thread Matthew Auld
On Wed, 2 Jun 2021 at 09:01, Daniel Vetter wrote: > > On Wed, Jun 2, 2021 at 9:28 AM Matthew Auld > wrote: > > > > On Thu, 27 May 2021 at 19:52, Matthew Auld wrote: > > > > > > This reverts commit b739f125e4ebd73d10ed30a856574e13649119ed. > > > > > > We are unfortunately seeing more issues like

Re: [PATCH] vgaarb: Call vga_arb_device_init() after PCI enumeration

2021-06-02 Thread Huacai Chen
Hi, Daniel, On Wed, Jun 2, 2021 at 2:03 AM Daniel Vetter wrote: > > On Tue, Jun 01, 2021 at 07:12:27PM +0200, Greg KH wrote: > > On Tue, Jun 01, 2021 at 05:56:40PM +0200, Daniel Vetter wrote: > > > On Fri, May 28, 2021 at 04:26:07PM +0800, Huacai Chen wrote: > > > > We should call vga_arb_device_

Re: [Freedreno] [RFC PATCH 00/13] drm/msm: Add Display Stream Compression Support

2021-06-02 Thread Vinod Koul
On 26-05-21, 09:00, Jeffrey Hugo wrote: > On Tue, May 25, 2021 at 11:46 PM Vinod Koul wrote: > > On 21-05-21, 08:09, Jeffrey Hugo wrote: > > > On Fri, May 21, 2021 at 6:50 AM Vinod Koul wrote: > > > > > > > > Display Stream Compression (DSC) compresses the display stream in host > > > > which >

Re: [Freedreno] [RFC PATCH 00/13] drm/msm: Add Display Stream Compression Support

2021-06-02 Thread Vinod Koul
On 27-05-21, 16:30, Rob Clark wrote: > On Wed, May 26, 2021 at 8:00 AM Jeffrey Hugo wrote: > > On Tue, May 25, 2021 at 11:46 PM Vinod Koul wrote: > > Frankly, I don't like the MSM ACPI solution that I've seen on the laptops. > > The ACPI assumes the entire MDSS (including DSI parts) and GPU is o

Re: [RFC PATCH 03/13] drm/msm/dsi: add support for dsc data

2021-06-02 Thread Vinod Koul
On 28-05-21, 02:45, Dmitry Baryshkov wrote: > On 21/05/2021 15:49, Vinod Koul wrote: > > DSC needs some configuration from device tree, add support to read and > > store these params and add DSC structures in msm_drv > > > > Signed-off-by: Vinod Koul > > --- > > drivers/gpu/drm/msm/dsi/dsi_host

[PATCH 1/7] dma-buf: fix inconsistent debug print

2021-06-02 Thread Christian König
The code tries to acquire the rcu protected fence list, but then ignores individual fences which have been modified while holding the rcu. Stop that madness and just note cleanly that the list was concurrently modified. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 19 -

[PATCH 2/7] dma-buf: add SPDX header and fix style in dma-resv.c

2021-06-02 Thread Christian König
No functional change. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c | 128 +++-- 1 file changed, 65 insertions(+), 63 deletions(-) diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c index 6ddbeb5dfbf6..87f5d82d992a 100644 --- a/d

[PATCH 3/7] dma-buf: cleanup dma-resv shared fence debugging a bit

2021-06-02 Thread Christian König
Make that a function instead of inline. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c | 18 ++ include/linux/dma-resv.h | 15 +++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c

[PATCH 4/7] dma-buf: rename and cleanup dma_resv_get_excl

2021-06-02 Thread Christian König
When the comment needs to state explicitly that this doesn't get a reference to the object then the function is named rather badly. Rename the function and use rcu_dereference_check(), this way it can be used from both rcu as well as lock protected critical sections. Signed-off-by: Christian Köni

[PATCH 5/7] dma-buf: rename and cleanup dma_resv_get_list

2021-06-02 Thread Christian König
When the comment needs to state explicitly that this is doesn't get a reference to the object then the function is named rather badly. Rename the function and use it in even more places. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c| 32 +-- .

[PATCH 7/7] dma-buf: drop the _rcu postfix on function names

2021-06-02 Thread Christian König
The functions can be called both in _rcu context as well as while holding the lock. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 3 +-- drivers/dma-buf/dma-resv.c| 24 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c |

[PATCH 6/7] dma-buf: rename dma_resv_get_excl_rcu to _unlocked

2021-06-02 Thread Christian König
That describes much better what the function is doing here. Signed-off-by: Christian König --- drivers/gpu/drm/drm_gem.c| 2 +- drivers/gpu/drm/drm_gem_atomic_helper.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 2 +- drivers/gpu/drm/i915/display/intel_display

Re: [RFC PATCH 03/13] drm/msm/dsi: add support for dsc data

2021-06-02 Thread Vinod Koul
On 28-05-21, 13:29, Dmitry Baryshkov wrote: > On 21/05/2021 15:49, Vinod Koul wrote: > > DSC needs some configuration from device tree, add support to read and > > store these params and add DSC structures in msm_drv > > > > Signed-off-by: Vinod Koul > > --- > > drivers/gpu/drm/msm/dsi/dsi_host

Re: [PATCH] drm/ttm: nuke VM_MIXEDMAP on BO mappings

2021-06-02 Thread Intel
Hi, On 6/2/21 12:03 PM, Christian König wrote: Am 02.06.21 um 11:07 schrieb Thomas Hellström (Intel): On 6/2/21 10:30 AM, Christian König wrote: We discussed if that is really the right approach for quite a while now, but digging deeper into a bug report on arm turned out that this is actu

Re: [PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Intel
On 6/2/21 12:09 PM, Christian König wrote: Start with the range manager to make the resource object the base class for the allocated nodes. While at it cleanup a lot of the code around that. Signed-off-by: Christian König Reviewed-by: Matthew Auld --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm

Re: [PATCH 1/4] drm/panfrost: Add cycle counter job requirement

2021-06-02 Thread Steven Price
On 27/05/2021 21:38, alyssa.rosenzw...@collabora.com wrote: > From: Alyssa Rosenzweig > > Extend the Panfrost UABI with a new job requirement for cycle counters > (and GPU timestamps, by extension). This requirement is used in > userspace to implement ARB_shader_clock, an OpenGL extension reporti

Re: [PATCH 2/4] drm/panfrost: Add CYCLE_COUNT_START/STOP commands

2021-06-02 Thread Steven Price
On 27/05/2021 21:38, alyssa.rosenzw...@collabora.com wrote: > From: Alyssa Rosenzweig > > Add additional values of GPU_COMMAND required to enable and disable the > cycle (and timestamp) counters. Values from mali_kbase. > > Signed-off-by: Alyssa Rosenzweig Reviewed-by: Steven Price > --- >

Re: [PATCH 3/4] drm/panfrost: Add permon acquire/release helpers

2021-06-02 Thread Steven Price
On 27/05/2021 21:38, alyssa.rosenzw...@collabora.com wrote: > From: Alyssa Rosenzweig > > Wrap the underlying CYCLE_COUNT_START/STOP commands in a safe interface > that ensures the commands are only issued where required by guarding > behind an atomic counter. In particular, we need to be careful

Re: [PATCH 4/4] drm/panfrost: Handle PANFROST_JD_REQ_PERMON

2021-06-02 Thread Steven Price
On 27/05/2021 21:38, alyssa.rosenzw...@collabora.com wrote: > From: Alyssa Rosenzweig > > If a job requires cycle counters or timestamps, we must enable cycle > counting just before issuing the job, and disable as soon as the job > completes. > > Since this extends the UABI, we bump the driver m

Re: [PATCH] drm/i915/gem/mman: only allow WC for lmem

2021-06-02 Thread Thomas Hellström
Hi, On 6/2/21 11:36 AM, Matthew Auld wrote: For dgfx where we now have lmem and ttm, we can only support single mmap mode for the lifetime of the object, and for lmem objects this should be WC, so reject all other mapping modes for mmap_offset, including if the object can be placed in both smem

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

2021-06-02 Thread Tvrtko Ursulin
On 02/06/2021 02:20, John Harrison wrote: On 6/1/2021 02:31, Tvrtko Ursulin wrote: On 27/05/2021 18:01, John Harrison wrote: On 5/27/2021 01:53, Tvrtko Ursulin wrote: On 26/05/2021 19:45, John Harrison wrote: On 5/26/2021 01:40, Tvrtko Ursulin wrote: On 25/05/2021 18:52, Matthew Brost wrot

Re: [PATCH] drm/ttm: nuke VM_MIXEDMAP on BO mappings

2021-06-02 Thread Christian König
Am 02.06.21 um 13:24 schrieb Thomas Hellström (Intel): [SNIP] @@ -576,14 +565,10 @@ static void ttm_bo_mmap_vma_setup(struct ttm_buffer_object *bo, struct vm_area_s     vma->vm_private_data = bo;   -    /* - * We'd like to use VM_PFNMAP on shared mappings, where - * (vma->vm_flag

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

2021-06-02 Thread Tvrtko Ursulin
On 06/05/2021 20:14, 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 happ

Re: [PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Christian König
Am 02.06.21 um 13:44 schrieb Thomas Hellström (Intel): On 6/2/21 12:09 PM, Christian König wrote: Start with the range manager to make the resource object the base class for the allocated nodes. While at it cleanup a lot of the code around that. Signed-off-by: Christian König Reviewed-by: Ma

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

2021-06-02 Thread Tvrtko Ursulin
On 06/05/2021 20:14, 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

Re: [PATCH] drm/ttm: nuke VM_MIXEDMAP on BO mappings

2021-06-02 Thread Thomas Hellström
On 6/2/21 2:04 PM, Christian König wrote: Am 02.06.21 um 13:24 schrieb Thomas Hellström (Intel): [SNIP] @@ -576,14 +565,10 @@ static void ttm_bo_mmap_vma_setup(struct ttm_buffer_object *bo, struct vm_area_s     vma->vm_private_data = bo;   -    /* - * We'd like to use VM_PFNMAP on

Re: [PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Intel
On 6/2/21 2:11 PM, Christian König wrote: Am 02.06.21 um 13:44 schrieb Thomas Hellström (Intel): On 6/2/21 12:09 PM, Christian König wrote: Start with the range manager to make the resource object the base class for the allocated nodes. While at it cleanup a lot of the code around that. Si

Re: [PATCH 1/7] dma-buf: fix inconsistent debug print

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 01:17:08PM +0200, Christian König wrote: > The code tries to acquire the rcu protected fence list, but then ignores > individual fences which have been modified while holding the rcu. > > Stop that madness and just note cleanly that the list was concurrently > modified. >

Re: [PATCH 2/7] dma-buf: add SPDX header and fix style in dma-resv.c

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 01:17:09PM +0200, Christian König wrote: > No functional change. > > Signed-off-by: Christian König Acked-by: Daniel Vetter Maybe add the checkpatch warnings you're fixing here to the commit message. I didn't know that initcalls should be at the bottom ... -Daniel > -

Re: [PATCH 1/7] dma-buf: fix inconsistent debug print

2021-06-02 Thread Christian König
Am 02.06.21 um 14:33 schrieb Daniel Vetter: On Wed, Jun 02, 2021 at 01:17:08PM +0200, Christian König wrote: The code tries to acquire the rcu protected fence list, but then ignores individual fences which have been modified while holding the rcu. Stop that madness and just note cleanly that

Re: [PATCH 3/7] dma-buf: cleanup dma-resv shared fence debugging a bit

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 01:17:10PM +0200, Christian König wrote: > Make that a function instead of inline. > > Signed-off-by: Christian König Hm yeah pulling that out makes some sense. > --- > drivers/dma-buf/dma-resv.c | 18 ++ > include/linux/dma-resv.h | 15 +++

Re: [PATCH 4/7] dma-buf: rename and cleanup dma_resv_get_excl

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 01:17:11PM +0200, Christian König wrote: > When the comment needs to state explicitly that this > doesn't get a reference to the object then the function > is named rather badly. > > Rename the function and use rcu_dereference_check(), this > way it can be used from both rc

Re: [PATCH 4/7] dma-buf: rename and cleanup dma_resv_get_excl

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 01:17:11PM +0200, Christian König wrote: > When the comment needs to state explicitly that this > doesn't get a reference to the object then the function > is named rather badly. > > Rename the function and use rcu_dereference_check(), this > way it can be used from both rc

Re: [PATCH 5/7] dma-buf: rename and cleanup dma_resv_get_list

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 01:17:12PM +0200, Christian König wrote: > When the comment needs to state explicitly that this is doesn't get a > reference > to the object then the function is named rather badly. > > Rename the function and use it in even more places. > > Signed-off-by: Christian König

Re: [PATCH 2/7] dma-buf: add SPDX header and fix style in dma-resv.c

2021-06-02 Thread Christian König
Am 02.06.21 um 14:34 schrieb Daniel Vetter: On Wed, Jun 02, 2021 at 01:17:09PM +0200, Christian König wrote: No functional change. Signed-off-by: Christian König Acked-by: Daniel Vetter Maybe add the checkpatch warnings you're fixing here to the commit message. I didn't know that initcal

Re: [PATCH 6/7] dma-buf: rename dma_resv_get_excl_rcu to _unlocked

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 01:17:13PM +0200, Christian König wrote: > That describes much better what the function is doing here. > > Signed-off-by: Christian König Acked-by: Daniel Vetter > --- > drivers/gpu/drm/drm_gem.c| 2 +- > drivers/gpu/drm/drm_gem_atomic_helper.c

Re: [PATCH 7/7] dma-buf: drop the _rcu postfix on function names

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 01:17:14PM +0200, Christian König wrote: > The functions can be called both in _rcu context as well > as while holding the lock. > > Signed-off-by: Christian König Please add to both functions some kerneldoc like "Callers are not required to hold specific locks, but maybe

Re: [PATCH 1/7] dma-buf: fix inconsistent debug print

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 02:36:58PM +0200, Christian König wrote: > > > Am 02.06.21 um 14:33 schrieb Daniel Vetter: > > On Wed, Jun 02, 2021 at 01:17:08PM +0200, Christian König wrote: > > > The code tries to acquire the rcu protected fence list, but then ignores > > > individual fences which have

Re: [PATCH 2/7] dma-buf: add SPDX header and fix style in dma-resv.c

2021-06-02 Thread Daniel Vetter
On Wed, Jun 02, 2021 at 02:47:25PM +0200, Christian König wrote: > > > Am 02.06.21 um 14:34 schrieb Daniel Vetter: > > On Wed, Jun 02, 2021 at 01:17:09PM +0200, Christian König wrote: > > > No functional change. > > > > > > Signed-off-by: Christian König > > Acked-by: Daniel Vetter > > > > Ma

Re: [PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Christian König
Am 02.06.21 um 14:33 schrieb Thomas Hellström (Intel): On 6/2/21 2:11 PM, Christian König wrote: Am 02.06.21 um 13:44 schrieb Thomas Hellström (Intel): On 6/2/21 12:09 PM, Christian König wrote: Start with the range manager to make the resource object the base class for the allocated node

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

2021-06-02 Thread Tvrtko Ursulin
On 06/05/2021 20:14, 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 wh

[PATCH 1/2] dma-buf: fix inconsistent debug print v2

2021-06-02 Thread Christian König
Drop the whole rcu handling since we are holding the resv lock anyway. v2: drop all rcu handling instead. Signed-off-by: Christian König --- drivers/dma-buf/dma-buf.c | 27 +-- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/dri

[PATCH 2/2] dma-buf: add SPDX header and fix style in dma-resv.c

2021-06-02 Thread Christian König
dma_resv_lockdep() seems to have some space/tab mixups. Fix that and move the function to the end of the file. Also fix some minor things checkpatch.pl pointed out while at it. No functional change. Signed-off-by: Christian König --- drivers/dma-buf/dma-resv.c | 128 +++

Re: [PATCH 03/11] drm/panfrost: Use xarray and helpers for depedency tracking

2021-06-02 Thread Steven Price
On 21/05/2021 10:09, Daniel Vetter wrote: > More consistency and prep work for the next patch. > > Aside: I wonder whether we shouldn't just move this entire xarray > business into the scheduler so that not everyone has to reinvent the > same wheels. Cc'ing some scheduler people for this too. > >

Re: [PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Intel
On 6/2/21 3:07 PM, Christian König wrote: Am 02.06.21 um 14:33 schrieb Thomas Hellström (Intel): On 6/2/21 2:11 PM, Christian König wrote: Am 02.06.21 um 13:44 schrieb Thomas Hellström (Intel): On 6/2/21 12:09 PM, Christian König wrote: Start with the range manager to make the resource

Re: [PATCH 02/10] drm/ttm: flip over the range manager to self allocated nodes

2021-06-02 Thread Christian König
Am 02.06.21 um 16:13 schrieb Thomas Hellström (Intel): On 6/2/21 3:07 PM, Christian König wrote: Am 02.06.21 um 14:33 schrieb Thomas Hellström (Intel): On 6/2/21 2:11 PM, Christian König wrote: Am 02.06.21 um 13:44 schrieb Thomas Hellström (Intel): On 6/2/21 12:09 PM, Christian König wro

Re: [PATCH 0/7] libdrm tests for hot-unplug feature

2021-06-02 Thread Andrey Grodzovsky
On 2021-06-02 3:59 a.m., Daniel Vetter wrote: On Tue, Jun 1, 2021 at 10:17 PM Andrey Grodzovsky wrote: Adding some tests to acompany the recently added hot-unplug feature. For now the test suite is disabled until the feature propagates from drm-misc-next to drm-next. Andrey Grodzovsky (7):

Re: [PATCH 2/7] xf86drm: Add function to retrieve char device path

2021-06-02 Thread Andrey Grodzovsky
It calls drmNodeIsDRM which is private function itself so - if i implement it in amdgpu part I still need to expose drmNodeIsDRM. Note that this function is basically a subset of drmGetDeviceNameFromFd2 Andrey On 2021-06-02 5:16 a.m., Simon Ser wrote: Do we really need to make this a public A

  1   2   3   >