Re: [PATCH 00/45] TTM move refactoring

2020-09-23 Thread Dave Airlie
On Thu, 24 Sep 2020 at 15:19, Dave Airlie wrote: > > This refactors how TTM moves get called between core and drivers. > Full series is also: https://github.com/airlied/linux/tree/ttm-no-more-bind (it's based on top of Christian's last series). Dave. ___

[PATCH 36/45] drm/ttm: drop move_notify callback.

2020-09-23 Thread Dave Airlie
From: Dave Airlie This isn't used anymore. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c| 2 -- include/drm/ttm/ttm_bo_driver.h | 11 --- 2 files changed, 13 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index ba69c682e53b..eb

[PATCH 40/45] drm/amdgpu/ttm: use new ttm helper to create temp tt

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 29 ++--- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index e1133acb8536..1fbcb16a

[PATCH 37/45] drm/ttm: add a helper to allocate a temp tt for copies.

2020-09-23 Thread Dave Airlie
From: Dave Airlie All the accel moves do the same pattern here, provide a helper Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c| 28 include/drm/ttm/ttm_bo_driver.h | 5 + 2 files changed, 33 insertions(+) diff --git a/drivers/gpu/drm/ttm/ttm

[PATCH 45/45] drm/ttm: add a new helper for a cleaning up after a ram move

2020-09-23 Thread Dave Airlie
From: Dave Airlie This is a pretty common pattern in the drivers. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 13 ++--- drivers/gpu/drm/nouveau/nouveau_bo.c| 14 +++--- drivers/gpu/drm/radeon/radeon_ttm.c | 13 ++--- drivers/gpu/drm/

[PATCH 28/45] drm/nouveau/ttm: memcpy waits for bo already

2020-09-23 Thread Dave Airlie
From: Dave Airlie no need for driver to wait here. Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index cb2a0f1bf7ff..9e3fbe0

[PATCH 26/45] drm/ttm: remove bind/unbind callbacks.

2020-09-23 Thread Dave Airlie
From: Dave Airlie If a driver wants to bind/unbind then it should implement a move callback. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 8 +++-- drivers/gpu/drm/nouveau/nouveau_bo.c | 8 ++--- drivers/gpu/drm/qxl/qxl_ttm.c | 20 ---

[PATCH 24/45] drm/ttm: handle binding in move callback

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 8 drivers/gpu/drm/nouveau/nouveau_bo.c | 8 drivers/gpu/drm/radeon/radeon_ttm.c| 8 drivers/gpu/drm/ttm/ttm_bo_util.c | 6 -- drivers/gpu/drm/vmwg

[PATCH 39/45] drm/radeon/ttm: use new helper to create tmp tt

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_ttm.c | 28 ++-- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index b38bc688f665..b004857f536b 1006

[PATCH 41/45] drm/amdgpu/ttm: use helper function for caching/populate

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 1fbcb16a3c24..099752bc42e9 100644 --- a/dri

[PATCH 23/45] drm/ttm: move bind out of move_to_new_tt_mem

2020-09-23 Thread Dave Airlie
From: Dave Airlie Move the bind out of this for now. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 drivers/gpu/drm/nouveau/nouveau_bo.c| 4 +++- drivers/gpu/drm/radeon/radeon_ttm.c | 4 drivers/gpu/drm/ttm/ttm_bo.c| 7 +++ dri

[PATCH 03/45] drm/amdgpu/ttm: handle tt moves properly.

2020-09-23 Thread Dave Airlie
From: Dave Airlie The core move code currently handles use_tt moves, for amdgpu this was being handled also in the driver, but not using the same paths. If moving between TT/SYSTEM (all the use_tt paths on amdgpu) use the core move function. Eventually the core will be flipped over to calling t

[PATCH 12/45] drm/ttm: drop free old node wrapper.

2020-09-23 Thread Dave Airlie
From: Dave Airlie This isn't really used anymore, if drivers needs it later, just add back an inline wrapper. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo_util.c | 11 +++ include/drm/ttm/ttm_bo_driver.h | 9 - 2 files changed, 3 insertions(+), 17 deletions(-)

[PATCH 43/45] drm/nouveau/ttm: use helper for placement + populaate

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 93f24b828ede..1786c92bf3fc 100644 --- a/drivers/gpu/drm/no

[PATCH 27/45] drm/radeon/ttm: cleanup move exit paths

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_ttm.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 496e7b1e14ad..490c7355c9cc 100644 --- a/

[PATCH 32/45] drm/amdgpu/ttm: switch to invalidate notify callback

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 8 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 2 +- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/a

[PATCH 31/45] drm/radeon: switch to invalidate notify callback

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_object.c | 7 +-- drivers/gpu/drm/radeon/radeon_object.h | 4 +--- drivers/gpu/drm/radeon/radeon_ttm.c| 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_obje

[PATCH 42/45] drm/radeon/ttm: use helper function for caching/populate

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_ttm.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index b004857f536b..ccd588bd4ea5 100644 --- a/drivers/gpu/dr

[PATCH 25/45] drm/ttm: don't call ttm_bo_move_ttm from drivers

2020-09-23 Thread Dave Airlie
From: Dave Airlie Drop the interface completely Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 12 ++-- drivers/gpu/drm/nouveau/nouveau_bo.c | 10 -- drivers/gpu/drm/radeon/radeon_ttm.c| 12 ++-- drivers/gpu/drm/ttm/ttm_bo_util

[PATCH 44/45] drm/ttm: move more functionality into helper function.

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 -- drivers/gpu/drm/nouveau/nouveau_bo.c| 7 --- drivers/gpu/drm/radeon/radeon_ttm.c | 8 drivers/gpu/drm/ttm/ttm_bo.c| 4 4 files changed, 4 insertions

[PATCH 29/45] drm/ttm: don't expose move old to system helper to drivers.

2020-09-23 Thread Dave Airlie
From: Dave Airlie This is just used internally by fallback paths. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo_util.c | 22 -- include/drm/ttm/ttm_bo_driver.h | 2 -- 2 files changed, 24 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers

[PATCH 35/45] drm/vram-helper: move to invalidate callback.

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_gem_vram_helper.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c index 5d4182f5c22f..9d4100071e1d 100644 ---

[PATCH 22/45] drm/ttm: don't call move notify around move

2020-09-23 Thread Dave Airlie
From: Dave Airlie Drivers should be handling this internally. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index c8dffc8b40fc..3b07db52541

[PATCH 18/45] drm/nouveau: handle move notify inside move callback.

2020-09-23 Thread Dave Airlie
From: Dave Airlie Don't use explicit move notify for moves just do it in the driver side. Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 62 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c

[PATCH 34/45] drm/qxl/ttm: move to invalidate notify callback

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/qxl/qxl_ttm.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 3bca5f8d8ac5..be012b2c8516 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c ++

[PATCH 14/45] drm/ttm: add move old to system to drivers.

2020-09-23 Thread Dave Airlie
From: Dave Airlie Uninline ttm_bo_move_ttm. Eventually want to unhook the unbind out. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 9 - drivers/gpu/drm/nouveau/nouveau_bo.c| 9 - drivers/gpu/drm/radeon/radeon_ttm.c | 10 +- drivers/

[PATCH 38/45] drm/nouveau/ttm: use helper to allocate tt temp

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 30 +++- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index a032fdacf5f8..93f24b828ede 1

[PATCH 17/45] drm/amdgpu/ttm: handle invalidation in move callback.

2020-09-23 Thread Dave Airlie
From: Dave Airlie Leave the delete path alone (new_mem == NULL), but otherwise do all the invalidate and accounting in the move callback. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 35 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 ++ d

[PATCH 21/45] drm/vram_helper: call move notify from the move callback.

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_gem_vram_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c index 9fd80a3643f6..5d4182f5c22f 100644 --- a/drivers/gpu/drm/drm_gem_vram_he

[PATCH 30/45] drm/ttm: add a new invalidate notify callback.

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c| 4 +++- include/drm/ttm/ttm_bo_driver.h | 7 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index a2a61a8d1394..ba69c682e53b 100

[PATCH 33/45] drm/nouveau/ttm: switch to invalidate notify callback

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 9e3fbe09a6d8..a032fdacf5f8 100644 --- a/drivers/g

[PATCH 15/45] drm/ttm: push copy unbind into drivers.

2020-09-23 Thread Dave Airlie
From: Dave Airlie This uninlines ttm_bo_move_old_to_system into 3 places Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++- drivers/gpu/drm/nouveau/nouveau_bo.c| 7 +-- drivers/gpu/drm/radeon/radeon_ttm.c | 7 ++- 3 files changed, 17 insertions(

[PATCH 08/45] drm/vram_helper: implement a ttm move callback.

2020-09-23 Thread Dave Airlie
From: Dave Airlie This will always do memcpy moves. Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_gem_vram_helper.c | 21 + 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c index 171ea57b0311.

[PATCH 20/45] drm/vmwgfx/ttm: handle move notify inside move.

2020-09-23 Thread Dave Airlie
From: Dave Airlie This means move notify isn't used for the cleanup path, since mem would be NULL, so the callback can be removed Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers

[PATCH 07/45] drm/vmwgfx: add a move callback.

2020-09-23 Thread Dave Airlie
From: Dave Airlie This just copies the fallback to vmwgfx, I'm going to iterate on this a bit until it's not the same as the fallback path. Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff

[PATCH 16/45] drm/radeon/ttm: do move notify actions inside move.

2020-09-23 Thread Dave Airlie
From: Dave Airlie move notify can be gotten done inside moves instead of a separate callback for radeon. move notify is now only called from one other place where new_mem == NULL, so handle that properly. Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_object.c | 28 ++

[PATCH 10/45] drm/ttm: refactor out common code to setup a new tt backed resource

2020-09-23 Thread Dave Airlie
From: Dave Airlie This factors out the code to set the new caching and for non-system tt populate and bind things. The same code was used twice in the move paths. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 12 +- drivers/gpu/drm/ttm/ttm_bo_util.c | 40 +

[PATCH 06/45] drm/vmwgfx: move null mem checks outside move notifies

2020-09-23 Thread Dave Airlie
From: Dave Airlie Both fns checked mem == NULL, just move the check outside. Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 3 --- drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 2 ++ 3 files changed, 3 insertions(+)

[PATCH 04/45] drm/radeon/ttm: handle ttm moves properly

2020-09-23 Thread Dave Airlie
From: Dave Airlie The core move code currently handles use_tt moves, for radeon this was being handled also in the driver, but not using the same paths. If moving between TT/SYSTEM (all the use_tt paths on radeon) use the core move function. Eventually the core will be flipped over to calling t

[PATCH 19/45] drm/qxl/ttm: handle move notify inside move callback

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/qxl/qxl_ttm.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 5738be300078..378b6827b7a3 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +

[PATCH 02/45] drm/ttm: handle the SYSTEM->TT path in same place as others.

2020-09-23 Thread Dave Airlie
From: Dave Airlie This just consolidates the code making the flow easier to understand and also helps when moving move to the driver side. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/

[PATCH 09/45] drm/ttm: make move callback compulstory

2020-09-23 Thread Dave Airlie
From: Dave Airlie All drivers should have a move callback now so make it compulsory. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 6

[PATCH 00/45] TTM move refactoring

2020-09-23 Thread Dave Airlie
This refactors how TTM moves get called between core and drivers. 1) puts the driver in charge of all moves, and enforces drivers have a move callback. 2) moves move_notify actions around moves to the driver side 3) moves binding/unbinding completely into move and driver side 4) add a new invalida

[PATCH 05/45] drm/nouveau/ttm: handle ttm moves properly.

2020-09-23 Thread Dave Airlie
From: Dave Airlie The idea is to flip the core over to calling the driver always, so add support for moves here. Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers

[PATCH 11/45] drm/ttm: split out the move to system from move ttm code

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo_util.c | 39 --- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index aecdb2d92a54..0ad02e27865d 100644

[PATCH 01/45] drm/qxl: drop unused code

2020-09-23 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/qxl/qxl_ttm.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 2c35ca4270c6..5738be300078 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/d

[PATCH 13/45] drm/ttm: use new move interface for known system->ttm moves

2020-09-23 Thread Dave Airlie
From: Dave Airlie In all 3 drivers there is a case where the driver knows the bo is in SYSTEM so don't call the api that checks that. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo.c| 3 ++- drivers/gpu/drm/radeon/radeon_

Re: [PATCH 07/10] drm/amdgpu/ttm: handle tt moves properly.

2020-09-23 Thread Dave Airlie
On Thu, 24 Sep 2020 at 10:46, Dave Airlie wrote: > > On Thu, 24 Sep 2020 at 00:46, Christian König > wrote: > > > > Am 23.09.20 um 05:04 schrieb Dave Airlie: > > > From: Dave Airlie > > > > > > The core move code currently handles use_tt moves, for amdgpu > > > this was being handled also in th

Re: [PATCH 0/3] drm: commit_work scheduling

2020-09-23 Thread Rob Clark
On Wed, Sep 23, 2020 at 8:25 AM Daniel Vetter wrote: > > On Tue, Sep 22, 2020 at 07:48:10AM -0700, Rob Clark wrote: > > On Mon, Sep 21, 2020 at 11:59 PM Daniel Vetter wrote: > > > > > > On Mon, Sep 21, 2020 at 5:16 PM Rob Clark wrote: > > > > > > > > On Mon, Sep 21, 2020 at 2:21 AM Daniel Vetter

Re: [PATCH v2 1/2] drm/msm: Fix premature purging of BO

2020-09-23 Thread Rob Clark
On Wed, Sep 23, 2020 at 11:28 AM Akhil P Oommen wrote: > > On 9/23/2020 8:20 PM, Jordan Crouse wrote: > > On Tue, Sep 22, 2020 at 08:25:26PM +0530, Akhil P Oommen wrote: > >> In the case where we have a back-to-back submission that shares the same > >> BO, this BO will be prematurely moved to inac

Re: [PATCH 07/10] drm/amdgpu/ttm: handle tt moves properly.

2020-09-23 Thread Dave Airlie
On Thu, 24 Sep 2020 at 00:46, Christian König wrote: > > Am 23.09.20 um 05:04 schrieb Dave Airlie: > > From: Dave Airlie > > > > The core move code currently handles use_tt moves, for amdgpu > > this was being handled also in the driver, but not using the same > > paths. > > > > If moving between

[PATCH v4 19/19] drm/virtio: advertise features to userspace

2020-09-23 Thread Gurchetan Singh
New api changes are now available to userspace. Also, the comparison to true is redundant, so remove it. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/d

[PATCH v4 17/19] drm/virtio: implement blob resources: report blob mem to userspace

2020-09-23 Thread Gurchetan Singh
The stride field has never been used, so repurpose it to be "blob_mem". This way, userspace can know the memory properties of the blob if it's passed between userspace processes and no suitable userspace API exists to transmit that knowledge. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso

[PATCH v4 15/19] drm/virtio: implement blob resources: refactor UUID code somewhat

2020-09-23 Thread Gurchetan Singh
For upcoming blob resources, userspace can specify that the resource will be used for cross-device sharing. This is mainly for exportable blobs that will only shared with the virtgpu display but not across devices. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio

[PATCH v4 14/19] drm/virtio: implement blob resources: blob display integration

2020-09-23 Thread Gurchetan Singh
SCANOUT_BLOB forwards the DRM framebuffer metadata to the host. The modifier is intentionally left out -- it may be possible to query the host for that. We also assume one blob resource per DRM framebuffer. That too is an intentional simplification. Signed-off-by: Gurchetan Singh Acked-by: Tome

[PATCH v4 03/19] virtio-gpu api: blob resources

2020-09-23 Thread Gurchetan Singh
From: Gerd Hoffmann A blob resource is a container for: - VIRTIO_GPU_BLOB_MEM_GUEST: a guest memory allocation (referred to as a "guest-only blob resource") - VIRTIO_GPU_BLOB_MEM_HOST3D: a host3d memory allocation (referred to as a "host-only blob resource") - VIRTIO_GPU_BLOB

[PATCH v4 18/19] drm/virtio: implement blob resources: resource create blob ioctl

2020-09-23 Thread Gurchetan Singh
From: Gerd Hoffmann Implement resource create blob as specified. Signed-off-by: Gerd Hoffmann Co-developed-by: Gurchetan Singh Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio/virtgpu_drv.h| 4 +- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 136 ++

[PATCH v4 12/19] drm/virtio: implement blob resources: implement vram object

2020-09-23 Thread Gurchetan Singh
From: Gerd Hoffmann A virtio-gpu vram object is based on range-based allocation. No guest shmemfs backing, so we call drm_gem_private_object_init. This is for host memory without any guest backing (atleast initially). Signed-off-by: Gerd Hoffmann Co-developed-by: Gurchetan Singh Signed-off-by

[PATCH v4 16/19] drm/virtio: implement blob resources: fix stride discrepancy

2020-09-23 Thread Gurchetan Singh
The old transfer ioctls may work on blob resources, and there is no TRANSFER_BLOB hypercall now for simplicity. The guest may have a image view on the blob resources such that the stride is not equal to width * bytes_per_pixel. For host-only blobs, we can repurpose the transfer ioctls to synchron

[PATCH v4 10/19] drm/virtio: implement blob resources: expose virtio_gpu_resource_id_get

2020-09-23 Thread Gurchetan Singh
VRAM object will need it. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio/virtgpu_drv.h| 2 ++ drivers/gpu/drm/virtio/virtgpu_object.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu

[PATCH v4 13/19] drm/virtio: implement blob resources: hypercall interface

2020-09-23 Thread Gurchetan Singh
This implements the blob hypercall interface. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio/virtgpu_drv.h | 15 +++ drivers/gpu/drm/virtio/virtgpu_vq.c | 65 2 files changed, 80 insertions(+) diff --git a/drivers/gpu/drm/virt

[PATCH v4 06/19] drm/virtgpu api: host visible feature

2020-09-23 Thread Gurchetan Singh
This exposes the host visible feature to userspace. Without it, it is an error to specify BLOB_MEM_HOST3D with BLOG_FLAG_USE_MAPPABLE. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso Acked-by: Lingfeng Yang --- include/uapi/drm/virtgpu_drm.h | 1 + 1 file changed, 1 insertion(+) diff -

[PATCH v4 04/19] virtio-gpu api: host visible feature

2020-09-23 Thread Gurchetan Singh
From: Gerd Hoffmann This patch adds a new virtgpu feature that allows directly mapping host allocated resources. This is based on virtio shared memory regions, which allows querying for memory regions using PCI transport. Each shared memory region has an associated "shmid", the meaning of which

[PATCH v4 05/19] drm/virtgpu api: blob resources

2020-09-23 Thread Gurchetan Singh
This makes blob resources available to guest userspace. They are needed for GL4.5, Vulkan and zero-copy virtio-gpu. For Mesa, blob resources have been tested with Piglit's ARB_buffer_storage tests and apitraces. Apitraces of GL4.5 games show we're between 70% to 80% of host performance on Iris, b

[PATCH v4 11/19] drm/virtio: implement blob resources: add new fields to internal structs

2020-09-23 Thread Gurchetan Singh
Useful for upcoming blob resources. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio/virtgpu_drv.h | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h

[PATCH v4 02/19] drm/virtio: blob prep: make CPU responses more generic

2020-09-23 Thread Gurchetan Singh
RESOURCE_MAP_BLOB / RESOURCE_UNMAP_BLOB can use this. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio/virtgpu_drv.h | 6 +++--- drivers/gpu/drm/virtio/virtgpu_prime.c | 6 +++--- drivers/gpu/drm/virtio/virtgpu_vq.c| 10 +- 3 files changed, 11 ins

[PATCH v4 09/19] drm/virtio: implement blob resources: probe for host visible region

2020-09-23 Thread Gurchetan Singh
From: Gerd Hoffmann The availability of the host visible region means host 3D allocations can be directly mapped in the guest. Signed-off-by: Gerd Hoffmann Co-developed-by: Gurchetan Singh Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio/virtgpu_debugfs.c |

[PATCH v4 07/19] drm/virtgpu api: cross-device feature

2020-09-23 Thread Gurchetan Singh
This feature was recently added to virtio-gpu, lets make it userspace queryable. It's an error to use BLOB_FLAG_USE_CROSS_DEVICE when this feature is not present. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- include/uapi/drm/virtgpu_drm.h | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v4 08/19] drm/virtio: implement blob resources: probe for the feature.

2020-09-23 Thread Gurchetan Singh
From: Gerd Hoffmann Let's proble for VIRTIO_GPU_F_RESOURCE_BLOB. Signed-off-by: Gerd Hoffmann Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio/virtgpu_debugfs.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h |

[PATCH v4 01/19] drm/virtio: blob prep: refactor getting pages and attaching backing

2020-09-23 Thread Gurchetan Singh
Useful for upcoming blob resources. Signed-off-by: Gurchetan Singh Acked-by: Tomeu Vizoso --- drivers/gpu/drm/virtio/virtgpu_object.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_ob

Re: [PATCH 1/2] drm/nouveau: stop using persistent_swap_storage

2020-09-23 Thread Dave Airlie
Reviewed-by: Dave Airlie For both patches. On Wed, 23 Sep 2020 at 23:03, Christian König wrote: > > Ping? Ben, Dave any comment on this? > > Am 17.09.20 um 16:29 schrieb Christian König: > > According to Ben this is most likely just a leftover. > > > > Signed-off-by: Christian König > > --- >

[PATCH] drm/msm/dp: fix incorrect function prototype of dp_debug_get()

2020-09-23 Thread Abhinav Kumar
Fix the incorrect function prototype for dp_debug_get() in the dp_debug module to address compilation warning. Fixes: f913454aae8e ("drm/msm/dp: move debugfs node to /sys/kernel/debug/dri/*/") Reported-by: kernel test robot Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/dp/dp_debug.h | 2

Re: [PATCH v2 0/3] drm: rockchip: hdmi: enable higher resolutions than FHD

2020-09-23 Thread Doug Anderson
Hi, On Tue, Sep 22, 2020 at 1:31 PM Vicente Bergas wrote: > > This patch series enable a QHD HDMI monitor to work at native resolution. > Tested on a Sapphire board with RK3399 connected to a Q27q-10 monitor at > 2560x1440@60 > > Changes since v1: > Use alternative clock rounding code proposed b

Re: [PATCH v2 1/3] drm: rockchip: hdmi: fix clock rounding code

2020-09-23 Thread Doug Anderson
Hi, On Tue, Sep 22, 2020 at 6:38 PM crj wrote: > > > 在 2020/9/23 4:31, Vicente Bergas 写道: > > Under certain conditions vop_crtc_mode_fixup rounds the clock > > 14850 to 148501000 which leads to the following error: > > dwhdmi-rockchip ff94.hdmi: PHY configuration failed (clock 148501000)

Re: [PATCH v2 1/3] drm: rockchip: hdmi: fix clock rounding code

2020-09-23 Thread Doug Anderson
Hi, On Tue, Sep 22, 2020 at 1:31 PM Vicente Bergas wrote: > > Under certain conditions vop_crtc_mode_fixup rounds the clock > 14850 to 148501000 which leads to the following error: > dwhdmi-rockchip ff94.hdmi: PHY configuration failed (clock 148501000) > > The issue was found on RK3399 bo

Re: [PATCH v2 0/3] drm: rockchip: hdmi: enable higher resolutions than FHD

2020-09-23 Thread Robin Murphy
On 2020-09-22 21:31, Vicente Bergas wrote: This patch series enable a QHD HDMI monitor to work at native resolution. Tested on a Sapphire board with RK3399 connected to a Q27q-10 monitor at 2560x1440@60 Indeed for RK3399 it also allows my 1920x1200 monitor (Dell U2415) to be driven at its nat

Re: [PATCH v4 11/23] device-dax: Kill dax_kmem_res

2020-09-23 Thread Dan Williams
On Wed, Sep 23, 2020 at 1:04 AM David Hildenbrand wrote: > > On 08.09.20 17:33, Joao Martins wrote: > > [Sorry for the late response] > > > > On 8/21/20 11:06 AM, David Hildenbrand wrote: > >> On 03.08.20 07:03, Dan Williams wrote: > >>> @@ -37,109 +45,94 @@ int dev_dax_kmem_probe(struct device *d

Re: [PATCHv2] dt-bindings: dp-connector: add binding for DisplayPort connector

2020-09-23 Thread Tomi Valkeinen
Hi Rob, On 23/09/2020 19:17, Rob Herring wrote: * No eDP. There's really no "eDP connector", as it's always a custom made connection between the DP and the DP panel. So possibly there is no need for edp-connector binding, but even if there is, I don't want to guess what it could look l

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-23 Thread Steven Rostedt
On Wed, 23 Sep 2020 22:55:54 +0200 Thomas Gleixner wrote: > > Perhaps make migrate_disable() an anonymous local_lock()? > > > > This should lower the SHC in theory, if you can't have stacked migrate > > disables on the same CPU. > > I'm pretty sure this ends up in locking hell pretty fast and

Re: [PATCH 10/10] drm/ttm: reverse move calling pattern.

2020-09-23 Thread Dave Airlie
On Thu, 24 Sep 2020 at 00:45, Christian König wrote: > > Am 23.09.20 um 05:04 schrieb Dave Airlie: > > From: Dave Airlie > > > > Call the driver move function if it exists, otherwise use the > > fallback ttm/memcpy paths. > > I would rather like to see the move callback made mandatory instead. I

Re: [v2 PATCH] dt-bindings: display: mediatek: convert the dpi bindings to yaml

2020-09-23 Thread Rob Herring
On Thu, 17 Sep 2020 15:33:05 +0800, Jitao Shi wrote: > Convert display/mediatek/mediatek,dpi.txt to > display/mediatek/mediatek,dpi.yaml > and remove the old text bindings. > > Signed-off-by: Jitao Shi > --- > .../bindings/display/mediatek/mediatek,dpi.txt | 42 -- > .../bindings/di

Re: [PATCH] drm/atomic: document and enforce rules around "spurious" EBUSY

2020-09-23 Thread Daniel Vetter
On Wed, Sep 23, 2020 at 9:17 PM Marius Vlad wrote: > > On Wed, Sep 23, 2020 at 05:18:52PM +0200, Daniel Vetter wrote: > > When doing an atomic modeset with ALLOW_MODESET drivers are allowed to > > pull in arbitrary other resources, including CRTCs (e.g. when > > reconfiguring global resources). >

Re: [PATCH v2] MAINTAINERS: add Dan Murphy as TP LP8xxx drivers maintainer

2020-09-23 Thread Jonathan Cameron
On Wed, 23 Sep 2020 11:53:33 -0500 Dan Murphy wrote: > Hello > > On 9/22/20 10:28 AM, Krzysztof Kozlowski wrote: > > Milo Kim's email in TI bounces with permanent error (550: Invalid > > recipient). Last email from him on LKML was in 2017. Move Milo Kim to > > credits and add Dan Murphy from T

Re: [PATCHv2] dt-bindings: dp-connector: add binding for DisplayPort connector

2020-09-23 Thread Rob Herring
On Wed, Sep 23, 2020 at 11:15 AM Tomi Valkeinen wrote: > > Hi Rob, > > On 23/09/2020 19:17, Rob Herring wrote: > > >> * No eDP. There's really no "eDP connector", as it's always a custom > >>made connection between the DP and the DP panel. So possibly there is > >>no need for edp-connector

Re: [PATCH] drm/atomic: document and enforce rules around "spurious" EBUSY

2020-09-23 Thread Marius Vlad
On Wed, Sep 23, 2020 at 05:18:52PM +0200, Daniel Vetter wrote: > When doing an atomic modeset with ALLOW_MODESET drivers are allowed to > pull in arbitrary other resources, including CRTCs (e.g. when > reconfiguring global resources). > > But in nonblocking mode userspace has then no idea this hap

Re: [PATCH v2 1/2] drm/msm: Fix premature purging of BO

2020-09-23 Thread Akhil P Oommen
On 9/23/2020 8:20 PM, Jordan Crouse wrote: On Tue, Sep 22, 2020 at 08:25:26PM +0530, Akhil P Oommen wrote: In the case where we have a back-to-back submission that shares the same BO, this BO will be prematurely moved to inactive_list while retiring the first submit. But it will be still part of

Re: [PATCH -next] drm/v3d: Remove set but not used variable

2020-09-23 Thread Eric Anholt
On Wed, Sep 23, 2020 at 6:13 AM Dave Stevenson wrote: > > Hi > > On Wed, 23 Sep 2020 at 08:53, Li Heng wrote: > > > > This addresses the following gcc warning with "make W=1": > > > > drivers/gpu/drm/v3d/v3d_drv.c:73:32: warning: > > ‘v3d_v3d_pm_ops’ defined but not used [-Wunused-const-variable=

Re: [PATCHv2] dt-bindings: dp-connector: add binding for DisplayPort connector

2020-09-23 Thread Rob Herring
On Thu, Sep 17, 2020 at 08:52:10AM +0300, Tomi Valkeinen wrote: > Add binding for DisplayPort connector. A few notes: > > * Similar to hdmi-connector, it has hpd-gpios as an optional property, > as the HPD could also be handled by, e.g., the DP bridge. > > * dp-pwr-supply, which provides 3.3V o

Re: Why can't ttm_tt_swapout() handle uncached or WC BOs?

2020-09-23 Thread Hellstrom, Thomas
On Wed, 2020-09-23 at 16:03 +0200, Christian König wrote: > Am 23.09.20 um 11:24 schrieb Hellstrom, Thomas: > > On Wed, 2020-09-23 at 13:17 +1000, Dave Airlie wrote: > > > On Fri, 18 Sep 2020 at 00:49, Christian König < > > > christian.koe...@amd.com> wrote: > > > > Am 17.09.20 um 16:44 schrieb Mic

[PATCH 1/5] drm: add legacy support for using degamma for gamma

2020-09-23 Thread Tomi Valkeinen
We currently have drm_atomic_helper_legacy_gamma_set() helper which can be used to handle legacy gamma-set ioctl. drm_atomic_helper_legacy_gamma_set() sets GAMMA_LUT, and clears CTM and DEGAMMA_LUT. This works fine on HW where we have either: degamma -> ctm -> gamma -> out or ctm -> gamma -> out

[PATCH 0/5] drm/omap: add color mgmt support

2020-09-23 Thread Tomi Valkeinen
Hi, This series is based on patches sent about a year ago: https://lists.freedesktop.org/archives/dri-devel/2019-September/233966.html https://lists.freedesktop.org/archives/dri-devel/2019-September/233967.html I've fixed the minor issues reported, and according to the recent discussions with Pe

[PATCH 2/5] drm/omap: use degamma property for gamma table

2020-09-23 Thread Tomi Valkeinen
omapdrm supports gamma via GAMMA_LUT property. However, the HW we have is: gamma -> ctm -> out instead of what the model DRM framework uses: ctm -> gamma -> out As the following patches add CTM support for omapdrm, lets first fix the gamma. This patch changes the property from GAMMA_LUT to DEG

[PATCH 4/5] drm/omap: rearrange includes in omapdss.h

2020-09-23 Thread Tomi Valkeinen
Drop "uapi/" and rearrange alphabetically. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/omapdss.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index ab19d4af8de7..8e9a20

[PATCH 3/5] drm/omap: Implement CTM property for CRTC using OVL managers CPR matrix

2020-09-23 Thread Tomi Valkeinen
From: Jyri Sarha Implement CTM color management property for OMAP CRTC using DSS overlay manager's Color Phase Rotation matrix. The CPR matrix does not exactly match the CTM property documentation. On DSS the CPR matrix is applied after gamma table look up. However, it seems stupid to add a custo

[PATCH 5/5] drm/omap: Enable COLOR_ENCODING and COLOR_RANGE properties for planes

2020-09-23 Thread Tomi Valkeinen
From: Jyri Sarha Adds support for COLOR_ENCODING and COLOR_RANGE properties to omap_plane.c and dispc.c. The supported encodings and ranges are presets are: For COLOR_ENCODING: - YCbCr BT.601 (default) - YCbCr BT.709 For COLOR_RANGE: - YCbCr limited range - YCbCr full range (default) Signed-of

Re: [PATCH] drm/doc: Document that modifiers are always required for fb

2020-09-23 Thread Daniel Vetter
On Thu, Sep 17, 2020 at 07:24:58PM +0200, Bas Nieuwenhuizen wrote: > Acked-by: Bas Nieuwenhuizen > > On Thu, Sep 17, 2020 at 6:48 PM Daniel Vetter wrote: > > > > Even for legacy userspace, since otherwise GETFB2 is broken and if you > > switch between modifier-less and modifier-aware compositors

Re: [patch RFC 00/15] mm/highmem: Provide a preemptible variant of kmap_atomic & friends

2020-09-23 Thread Steven Rostedt
On Wed, 23 Sep 2020 10:40:32 +0200 pet...@infradead.org wrote: > However, with migrate_disable() we can have each task preempted in a > migrate_disable() region, worse we can stack them all on the _same_ CPU > (super ridiculous odds, sure). And then we end up only able to run one > task, with the

Re: [PATCH 0/3] drm/vram-helper: Various improvements

2020-09-23 Thread Daniel Vetter
On Tue, Sep 22, 2020 at 04:56:57PM +0200, Thomas Zimmermann wrote: > This is a collection of improvements for GEM VRAM helpers. The patches > were part of other patchsets that didn't make it into upstream, but the > changes are nevertheless useful. On the series: Reviewed-by: Daniel Vetter > >

Re: [PATCH v2 1/2] drm/vc4: crtc: Rework a bit the CRTC state code

2020-09-23 Thread Daniel Vetter
On Wed, Sep 23, 2020 at 03:59:04PM +0100, Dave Stevenson wrote: > Hi Maxime > > On Wed, 23 Sep 2020 at 09:40, Maxime Ripard wrote: > > > > The current CRTC state reset hook in vc4 allocates a vc4_crtc_state > > structure as a drm_crtc_state, and relies on the fact that vc4_crtc_state > > embeds d

Re: [PATCH v2 3/3] dma-buf: Use struct dma_buf_map in dma_buf_vunmap() interfaces

2020-09-23 Thread Daniel Vetter
On Wed, Sep 23, 2020 at 02:32:05PM +0200, Thomas Zimmermann wrote: > This patch updates dma_buf_vunmap() and dma-buf's vunmap callback to > use struct dma_buf_map. The interfaces used to receive a buffer address. > This address is now given in an instance of the structure. > > Users of the functio

  1   2   3   >