[PATCH 2/5] drm/ttm: fix memcpy move bo size comparison

2020-10-19 Thread Dave Airlie
From: Dave Airlie start is in page units, so compare with pages. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index 558e78ad82aa..b31be

[PATCH 5/5] drm/ttm: get rid of storing size in ttm_resource

2020-10-19 Thread Dave Airlie
From: Dave Airlie Just use num_pages and a shift directly. Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- drivers/gpu/drm/nouveau/nv17_fence.c | 2 +- drivers/gpu/drm/nouveau/nv50_fence.c | 2 +- drivers/gpu/drm/ttm/ttm_bo.c | 2 -- include/drm/ttm/ttm_bo_a

[PATCH 4/5] drm/ttm: add bo size in bytes wrapper.

2020-10-19 Thread Dave Airlie
From: Dave Airlie We store size and num pages, wrap size so it can be removed. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8 drivers/gpu/drm/amd/amdgpu/mes_v10_1.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 8 d

[PATCH 0/5] ttm fix range checks + drop some fields

2020-10-19 Thread Dave Airlie
This fixes some range checks first. Then drops bo->num_pages in favour of bo->mem.num_pages, and drops bo->mem.size in favour of bo->mem.num_pages. Dave. ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/l

[PATCH 1/5] drm/ttm: fix eviction valuable range check.

2020-10-19 Thread Dave Airlie
From: Dave Airlie This was adding size to start, but pfn and start are in pages, so it should be using num_pages. Not sure this fixes anything in the real world, just noticed it during refactoring. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 2 +- 1 file changed, 1 insertion

[PATCH 0/7] drm/ttm: get rid of bind/unbind

2020-10-19 Thread Dave Airlie
This series is a rebase/cleanup of previous patches. The goal is to drop the bind/unbind callbacks from the ttm and have the driver handle it all in it's move function. This also has the driver do it's own move notifys from within move as well (move notify is still used for cleanup_memtype_use0.

[PATCH 2/7] drm/ttm: minor cleanup to move to system

2020-10-19 Thread Dave Airlie
From: Dave Airlie resource free already sets the domain to system, and old_mem isn't really needed. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo_util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/t

[PATCH 4/7] drm/ttm: drop unbind callback.

2020-10-19 Thread Dave Airlie
From: Dave Airlie The drivers now control this, so drop unbinding. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 1 - drivers/gpu/drm/nouveau/nouveau_bo.c | 1 - drivers/gpu/drm/qxl/qxl_ttm.c | 7 --- drivers/gpu/drm/radeon/radeon_ttm.c

[PATCH 5/7] drm/ttm: remove move to new and inline into remainging place.

2020-10-19 Thread Dave Airlie
From: Dave Airlie This show the remaining bind callback, which my next series of patches will aim to remove. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 16 +--- drivers/gpu/drm/ttm/ttm_bo_util.c | 20 include/drm/ttm/ttm_bo_driver.h |

[PATCH 6/7] drm/ttm: drop move notify around move.

2020-10-19 Thread Dave Airlie
From: Dave Airlie The drivers now do this in the move callback. move_notify is still needed in the destroy path. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 13 +-- drivers/gpu/drm/drm_gem_vram_helper.c | 11 +- drivers/gpu/drm/nouveau/nouveau_bo.c

[PATCH 7/7] drm/ttm: move last binding into the drivers.

2020-10-19 Thread Dave Airlie
From: Dave Airlie This moves the call to tt binding into the driver move, and drops the driver callback. 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/qxl/qxl_ttm.c |

[PATCH 1/7] drm/ttm: move some move binds into the drivers

2020-10-19 Thread Dave Airlie
From: Dave Airlie This just gives the driver control over some of the bind paths. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++- drivers/gpu/drm/nouveau/nouveau_bo.c| 10 +++--- drivers/gpu/drm/radeon/radeon_ttm.c | 11 --- drivers/gpu/

[PATCH 3/7] drm/ttm: add move to system into drivers

2020-10-19 Thread Dave Airlie
From: Dave Airlie This moves the to system move into the drivers, and moves all the unbinds in the move path under driver control Note: radeon/nouveau already wait so don't duplicate it. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 12 +--- drivers/gpu/d

Re: [PATCH] drm: document that user-space should avoid parsing EDIDs

2020-10-19 Thread Vitaly Prosyak
On 2020-10-19 3:49 a.m., Pekka Paalanen wrote: On Fri, 16 Oct 2020 16:50:16 +0300 Ville Syrjälä wrote: On Mon, Oct 12, 2020 at 10:11:01AM +0300, Pekka Paalanen wrote: On Fri, 9 Oct 2020 17:20:18 +0300 Ville Syrjälä wrote: On Fri, Oct 09, 2020 at 04:56:51PM +0300, Pekka Paalanen wrote:

Re: [PATCH 3/5] drm/ttm: drop bo->num_pages.

2020-10-19 Thread Dave Airlie
On Tue, 20 Oct 2020 at 08:23, Dave Airlie wrote: > > From: Dave Airlie > > This is stored in the mem field, everywhere that a new mem is > created, the bo->mem is either copied or this field is copied > explicitly. This has a problem with the pipeline gutting path, since it memset (bo->mem to 0)

[PATCH] [RFC/HACK] drm/ttm: avoid multihop moves in drivers.

2020-10-19 Thread Dave Airlie
From: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 128 +++- drivers/gpu/drm/nouveau/nouveau_bo.c| 106 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 110 ++-- drivers/gpu/drm/ttm/ttm_bo.c| 44 +++- 4 files ch

[RFC HACKY] ttm don't allow multihop moves

2020-10-19 Thread Dave Airlie
This is an RFC for a hacky idea I had to at least move the converation forward. The branch with this in it is: https://github.com/airlied/linux/tree/ttm-bounce it won't apply to any other tree as it's based on all those patches I posted and some other refactorings. The basic idea is if the driv

Re: amdgpu: Manual Card Configuration Change

2020-10-19 Thread Josh Fuhs
Thanks. I tried 5.9.1 and I think there's still a problem, or at least something different. Using the same configuration script, I noticed that my cards are running a lot hotter. For example, here's total power consumption of a two-card system with two different kernels: 5.8.14: 460W 5

Re: It appears drm-next TTM cleanup broke something . . .

2020-10-19 Thread Thomas Zimmermann
Hi On 19.10.20 22:28, Sam Ravnborg wrote: > Hi Kevin. > > On Mon, Oct 19, 2020 at 09:43:08PM +0200, Kevin Brace wrote: >> Hi Sam, >> >> Thanks for asking the question. >> The current OpenChrome DRM code has these two major issues. >> >> 1) It does not support atomic modesetting >> >> I do interna

<    1   2