[PATCH 09/13] drm/gem_vram/ttm: move to driver backend destroy function.

2020-09-07 Thread Dave Airlie
From: Dave Airlie Acked-by: Thomas Zimmermann Acked-by: Christian König Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_gem_vram_helper.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm

[PATCH 11/13] drm/ttm: get rid of agp specific populate/unpopulate paths.

2020-09-07 Thread Dave Airlie
From: Dave Airlie Reviewed-by: Christian König Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++-- drivers/gpu/drm/ttm/ttm_agp_backend.c | 17 - include/drm/ttm/ttm_tt.h | 2 -- 4 files

[PATCH 01/13] drm/ttm: introduce ttm_bo_move_null

2020-09-07 Thread Dave Airlie
From: Dave Airlie This pattern is cut-n-pasted across 4 drivers, switch it to a WARN_ON instead, as BUG_ON is considered a bad idea usually. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 24 +++- drivers/gpu/drm/nouveau/nouveau_bo.c| 4

[PATCH 06/13] drm/nouveau/ttm: use driver bind/unbind/destroy functions.

2020-09-07 Thread Dave Airlie
From: Dave Airlie Acked-by: Christian König Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c| 44 drivers/gpu/drm/nouveau/nouveau_sgdma.c | 54 ++--- drivers/gpu/drm/nouveau/nouveau_ttm.h | 3 ++ 3

[PATCH 12/13] drm/ttm/agp: remove bdev from agp helpers

2020-09-07 Thread Dave Airlie
From: Dave Airlie Since the agp bind/unbind/destroy are now getting called from drivers rather than via the func table, drop the bdev parameter. Reviewed-by: Christian König Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 6 +++--- drivers/gpu/drm/radeon/radeon_ttm.c

[PATCH 03/13] drm/qxl: move bind/unbind/destroy to the driver function table.

2020-09-07 Thread Dave Airlie
From: Dave Airlie Acked-by: Christian König Signed-off-by: Dave Airlie --- drivers/gpu/drm/qxl/qxl_ttm.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index c3530c6e46bd..4970c3450e88 100644

[PATCH 05/13] drm/radeon/ttm: move to driver binding/destroy functions. (v2)

2020-09-07 Thread Dave Airlie
From: Dave Airlie Do agp decision in the driver, instead of special binding funcs v2: use container_of, drop some {}. Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon.h| 7 +- drivers/gpu/drm/radeon/radeon_cs.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c| 6

[PATCH 00/13] ttm tt refactor repost of part 1

2020-09-07 Thread Dave Airlie
Most of these have r-b or acks already, patch 1 I may have posted before but found in my tree, so reposting it, and patch 5 for radeon I think were what needed re-review. I'd like to land these, and I'll revisit the remainder of this series. Dave. ___

[PATCH 02/13] drm/ttm: add optional bind/unbind via driver.

2020-09-07 Thread Dave Airlie
From: Dave Airlie I want to remove the backend funcs Reviewed-by: Christian König Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_tt.c| 15 +++--- include/drm/ttm/ttm_bo_driver.h | 36 + 2 files changed, 48 insertions(+), 3 deletions

[PATCH 04/13] drm/ttm/agp: export bind/unbind/destroy for drivers to use.

2020-09-07 Thread Dave Airlie
From: Dave Airlie Reviewed-by: Christian König Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_agp_backend.c | 15 +-- include/drm/ttm/ttm_tt.h | 6 ++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b

Re: [PATCH 2/2] drm/ttm: merge offset and base in ttm_bus_placement

2020-09-07 Thread Dave Airlie
I'd written something similar but didn't finish it! For the series, Reviewed-by: Dave Airlie On Mon, 7 Sep 2020 at 23:29, Christian König wrote: > > This is used by TTM to communicate the physical address > which should be used with ioremap(), ioremap_wc(). We don't > need

Re: [git pull] drm fixes for 5.9-rc4

2020-09-06 Thread Dave Airlie
On Sat, 5 Sep 2020 at 05:02, Linus Torvalds wrote: > > On Thu, Sep 3, 2020 at 8:53 PM Dave Airlie wrote: > > > > Not much going on this week, nouveau has a display hw bug workaround, > > amdgpu has some PM fixes and CIK regression fixes, one single radeon > >

[git pull] drm fixes for 5.9-rc4

2020-09-03 Thread Dave Airlie
/nouveau/kms/nv50-: add some whitespace before debug message drm/nouveau/kms/nv50-gp1xx: disable notifies again after core update drm/nouveau/kms/nv50-gp1xx: add WAR for EVO push buffer HW bug Dave Airlie (3): Merge tag 'amd-drm-fixes-5.9-2020-09-03' of git://people.freedesktop.org

[PATCH] [RFC] drm/i915: make object creation avoid regions layering.

2020-08-31 Thread Dave Airlie
From: Dave Airlie This looked like indirect ptr for not much reason in the create object path, I just wonder why it couldn't be simpler like this, The tests aren't cleaned up but this was more of is this a good idea test patch. --- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 16

[git pull] drm fixes for 5.9-rc3

2020-08-27 Thread Dave Airlie
current gain when ABM disable immediately Christian Gmeiner (1): drm/etnaviv: fix external abort seen on GC600 rev 0x19 Daniel Vetter (1): drm/modeset-lock: Take the modeset BKL for legacy drivers Dave Airlie (6): Merge tag 'exynos-drm-fixes-v5.9-rc3' of git://git.kernel.org

[PATCH 23/23] drm/ttm: change ordering of args to map/unmap helpers.

2020-08-25 Thread Dave Airlie
From: Dave Airlie These tooks the same args in a different order to the dma ones, just make things look nicer. 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

[00/23] ttm tt refactoring.

2020-08-25 Thread Dave Airlie
This is based on top of misc-next with Christians io rework for nouveau. https://github.com/airlied/linux/tree/ttm-tt-cleanup (is a complete tree) The idea is to move towards ttm_tt being just a backing store for system allocated pages + dma info, and not be anything to do with a global TT.

[PATCH 05/23] drm/qxl: move bind/unbind/destroy to the driver function table.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/qxl/qxl_ttm.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index c3530c6e46bd..4970c3450e88 100644 --- a/drivers/gpu/drm/qxl

[PATCH 21/23] drm/ttm: store populated status in upper page flag bits.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- include/drm/ttm/ttm_tt.h | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h index 2aa4cd7d6451..3b87ce43864a 100644 --- a/include/drm/ttm/ttm_tt.h +++ b/include/drm

[PATCH 13/23] drm/ttm: get rid of agp specific populate/unpopulate paths.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++-- drivers/gpu/drm/ttm/ttm_agp_backend.c | 17 - include/drm/ttm/ttm_tt.h | 2 -- 4 files changed, 4 insertions(+), 23

[PATCH 17/23] drm/ttm: split populated/bound state flags.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Get bound out is the next step. 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_mn.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c| 4

[PATCH 20/23] drm/ttm: add populated accessors

2020-08-25 Thread Dave Airlie
From: Dave Airlie next step move populated into upper page flag bits 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

[PATCH 15/23] drm/ttm: drop the tt backend function paths.

2020-08-25 Thread Dave Airlie
From: Dave Airlie These are now driver side. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_tt.c | 15 +++--- include/drm/ttm/ttm_tt.h | 39 2 files changed, 3 insertions(+), 51 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b

[PATCH 02/23] drm/radeon/ttm: don't store driver copy of device pointer.

2020-08-25 Thread Dave Airlie
From: Dave Airlie This can be gotten back from bdev. Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_ttm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index f6311f404db8

[PATCH 18/23] drm/ttm: move bound flag and use a utility wrapper

2020-08-25 Thread Dave Airlie
From: Dave Airlie If we move the bound flag out then the tt destroy is much cleaner in a bo level wrapper, the code is in a few places, leave the ttm_tt_destroy just about destroying the backing store. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + drivers/gpu

[PATCH 19/23] drm/ttm: split bind and populate out.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Make populating the backing store an explicit separate step Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++- drivers/gpu/drm/nouveau/nouveau_bo.c| 6 +- drivers/gpu/drm/radeon/radeon_ttm.c | 7 ++- drivers/gpu/drm/ttm

[PATCH 22/23] drm/ttm: two minor struct reorgs to fill holes.

2020-08-25 Thread Dave Airlie
From: Dave Airlie These are just minor changes that fill some obvious holes. Signed-off-by: Dave Airlie --- include/drm/ttm/ttm_placement.h | 2 +- include/drm/ttm/ttm_tt.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/drm/ttm/ttm_placement.h b/include

[PATCH 14/23] drm/ttm/agp: remove bdev from agp helpers

2020-08-25 Thread Dave Airlie
From: Dave Airlie Since the agp bind/unbind/destroy are now getting called from drivers rather than via the func table, drop the bdev parameter. Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 6 +++--- drivers/gpu/drm/radeon/radeon_ttm.c | 6 +++--- drivers/gpu/drm

[PATCH 16/23] drm/ttm: move sg pointer into ttm_dma_tt

2020-08-25 Thread Dave Airlie
From: Dave Airlie This is only used by drivers that have a dma tt backing store. Signed-off-by: Dave Airlie --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 32 +-- drivers/gpu/drm/nouveau/nouveau_bo.c | 4

[PATCH 10/23] drm/amdgpu/ttm: move to driver backend binding funcs

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 9592505563bf..f07e7121bcc5 100644

[PATCH 12/23] drm/ttm/agp: drop back end bindings from agp

2020-08-25 Thread Dave Airlie
From: Dave Airlie These aren't used anymore. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_agp_backend.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c index fbf98cd1a3e5..8072fb7c5bc8 100644

[PATCH 09/23] drm/vmwgfx: move to driver binding functions

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c index a76a7f542dd8..6757be98be14

[PATCH 11/23] drm/gem_vram/ttm: move to driver backend destroy function.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_gem_vram_helper.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c index 788557bc5c01..93586a310971 100644 --- a/drivers

[PATCH 01/23] drm/amdgpu/ttm: remove unused parameter to move blit

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index d7f668dbc9e0..00b2c0359735 100644

[PATCH 08/23] drm/nouveau/ttm: use driver bind/unbind/destroy functions.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c| 45 + drivers/gpu/drm/nouveau/nouveau_sgdma.c | 54 ++--- drivers/gpu/drm/nouveau/nouveau_ttm.h | 3 ++ 3 files changed, 60 insertions(+), 42 deletions(-) diff

[PATCH 07/23] drm/radeon/ttm: move to driver binding/destroy functions.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Do agp decision in the driver, instead of special binding funcs Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon.h| 7 +- drivers/gpu/drm/radeon/radeon_cs.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c| 6 +- drivers/gpu/drm/radeon

[PATCH 06/23] drm/ttm/agp: export bind/unbind/destroy for drivers to use.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_agp_backend.c | 15 +-- include/drm/ttm/ttm_tt.h | 6 ++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm

[PATCH 04/23] drm/ttm: add optional bind/unbind via driver.

2020-08-25 Thread Dave Airlie
From: Dave Airlie I want to remove the backend funcs Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_tt.c| 15 +++--- include/drm/ttm/ttm_bo_driver.h | 36 + 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm

[PATCH 03/23] drm/ttm: remove bdev from ttm_tt

2020-08-25 Thread Dave Airlie
From: Dave Airlie I want to split this structure up and use it differently, step one remove bdev pointer from it and pass it explicitly. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 40 +++ drivers/gpu/drm/drm_gem_vram_helper.c | 2

Re: [PATCH 2/3] drm/nouveau: move io_reserve_lru handling into the driver v4

2020-08-25 Thread Dave Airlie
On Sat, 22 Aug 2020 at 02:01, Christian König wrote: > > While working on TTM cleanups I've found that the io_reserve_lru used by > Nouveau is actually not working at all. > > In general we should remove driver specific handling from the memory > management, so this patch moves the io_reserve_lru

Re: [PATCH 00/49] DRM driver for Hikey 970

2020-08-24 Thread Dave Airlie
On Thu, 20 Aug 2020 at 20:02, Laurent Pinchart wrote: > > Hi Mauro, > > On Thu, Aug 20, 2020 at 09:03:26AM +0200, Mauro Carvalho Chehab wrote: > > Em Wed, 19 Aug 2020 12:52:06 -0700 John Stultz escreveu: > > > On Wed, Aug 19, 2020 at 8:31 AM Laurent Pinchart wrote: > > > > On Wed, Aug 19, 2020 at

Re: Moving LRU handling into Nouveau v3

2020-08-24 Thread Dave Airlie
I've also given this a spin here, seems to be okay. I've read the patches and they all seem fine. Reviewed-by: Dave Airlie for all 3 patches. Dave. On Sat, 22 Aug 2020 at 02:00, Christian König wrote: > > Hi guys, > > so I got some hardware and tested this and after hammer

[git pull] drm fixes for 5.9-rc2

2020-08-20 Thread Dave Airlie
memory Colin Xu (2): drm/i915/gvt: Do not destroy ppgtt_mm during vGPU D3->D0. drm/i915/gvt: Do not reset pv_notified when vGPU transit from D3->D0 Daniel Kolesa (1): drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal Dave Airlie (4): Merge tag 'dr

Re: [PATCH] drm/ttm: fix broken merge between drm-next and drm-misc-next

2020-08-19 Thread Dave Airlie
s this problem now? only in drm-tip or have we baked the broken mere already? If it's baked then 'Reviewed-by: Dave Airlie ` If it's not baked, then please use the dim howto to put a fixup in the right place. Dave. ___ dri-devel mail

Re: [PATCH] drm/qxl: Fix build errors

2020-08-18 Thread Dave Airlie
On Tue, 18 Aug 2020 at 15:32, Gerd Hoffmann wrote: > > Hi, > > > I guess things are never quite so easy :-). It looks like Daniel's > > patch is in drm-misc-fixes and Sidong's patch is in drm-misc-next. On > > their own they're fine, but once they are merged in drm-tip the build > > error shows

[git pull] drm fixes for 5.9-rc1

2020-08-11 Thread Dave Airlie
ot; Dan Carpenter (3): drm/amd/powerplay: off by one bugs in smu_cmn_to_asic_specific_index() drm/vmwgfx: Use correct vmw_legacy_display_unit pointer drm/vmwgfx: Fix two list_for_each loop exit tests Daniel Vetter (1): drm/vmwgfx/stdu: Use drm_mode_config_reset Dav

Re: [PATCH] drm/ttm: revert "make TT creation purely optional v3"

2020-08-11 Thread Dave Airlie
On Wed, 12 Aug 2020 at 05:34, Dave Airlie wrote: > > On Wed, 12 Aug 2020 at 03:11, Christian König > wrote: > > > > Am 11.08.20 um 18:42 schrieb Michel Dänzer: > > > On 2020-08-11 2:53 p.m., Christian König wrote: > > >> Am 11.08.20 um 14:52 schrieb Chr

Re: [PATCH] drm/ttm: revert "make TT creation purely optional v3"

2020-08-11 Thread Dave Airlie
into TTM code anymore to give > > you an R-b, given it's not a straight revert (presumably due to other > > changes in the meantime). > > Yeah, indeed had to keep Daves changes intact. > > Dave can you take a look then? Yup just came in after my "stop working Dave"

Re: [PATCH 1/2] drm/ttm: init mem->bus in common code.

2020-08-11 Thread Dave Airlie
On Tue, 11 Aug 2020 at 18:42, Christian König wrote: > > I've totally missed those and still don't see any reference in any inbox > to the original mail or patch #2 in this series. I forgot to cc you on the original posting, but they should be on dri-devel

Re: [PATCH 1/2] drm/ttm: init mem->bus in common code.

2020-08-11 Thread Dave Airlie
(cc'ing Christian, just in case he misses them). 2 small cleanups. On Tue, 11 Aug 2020 at 17:47, Dave Airlie wrote: > > From: Dave Airlie > > The drivers all do the same thing here. > > Signed-off-by: Dave Airlie > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 6 -

[PATCH 2/2] drm/ttm: drop bus.size from bus placement.

2020-08-11 Thread Dave Airlie
From: Dave Airlie This is always calculated the same, and only used in a couple of places. --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++- drivers/gpu/drm/radeon/radeon_ttm.c | 7 --- drivers/gpu/drm/ttm/ttm_bo_util.c | 7 --- include/drm/ttm/ttm_bo_api.h| 2

[PATCH 1/2] drm/ttm: init mem->bus in common code.

2020-08-11 Thread Dave Airlie
From: Dave Airlie The drivers all do the same thing here. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 6 -- drivers/gpu/drm/drm_gem_vram_helper.c | 6 -- drivers/gpu/drm/nouveau/nouveau_bo.c | 6 -- drivers/gpu/drm/qxl/qxl_ttm.c

Re: [linux.git drm/ttm]: NULL pointer dereference upon driver probe

2020-08-11 Thread Dave Airlie
> Well how about completely removing the concept of a global TT from TTM? Yes makes sense to me to try and rip out the global TT from the core and turn it into a driver optional feature is possible. Dave. > > What TTM should do is managing domains and help with the transitions > between those

Re: [linux.git drm/ttm]: NULL pointer dereference upon driver probe

2020-08-10 Thread Dave Airlie
On Tue, 11 Aug 2020 at 05:24, Christian König wrote: > > Am 10.08.20 um 20:51 schrieb Dave Airlie: > > On Mon, 10 Aug 2020 at 22:20, Christian König > > wrote: > >> Am 07.08.20 um 09:02 schrieb Christian König: > >>> Am 06.08.20 um 20:50 schrieb Roland S

Re: [linux.git drm/ttm]: NULL pointer dereference upon driver probe

2020-08-10 Thread Dave Airlie
On Mon, 10 Aug 2020 at 22:20, Christian König wrote: > > Am 07.08.20 um 09:02 schrieb Christian König: > > Am 06.08.20 um 20:50 schrieb Roland Scheidegger: > >> Am 06.08.20 um 17:28 schrieb Christian König: > >>> My best guess is that you are facing two separate bugs here. > >>> > >>> Crash #1 is

Re: [git pull] drm next for 5.9-rc1

2020-08-10 Thread Dave Airlie
On Mon, 10 Aug 2020 at 22:23, Christoph Hellwig wrote: > > On Thu, Aug 06, 2020 at 11:07:02AM +1000, Dave Airlie wrote: > > nouveau: > > - add CRC support > > - start using NVIDIA published class header files > > Where does Nvdia provide them? I looked into the com

Re: [PULL] drm-intel-next-fixes

2020-08-10 Thread Dave Airlie
On Fri, 31 Jul 2020 at 02:26, Joonas Lahtinen wrote: > > Hi Dave & Daniel, > > (Covering for Jani here for drm-intel-next-fixes) > > 5 new commits over drm-intel-next here. > > Fix for KASAN detected race condition and linux-next scheduler > WARNs. Patch to avoid IRQ spinlock and Cc: stable PMU

[PATCH] drm/vmwgfx/ttm: fix the non-THP cleanup path.

2020-08-09 Thread Dave Airlie
From: Dave Airlie I fixed the init path, but missed the cleanup path. Fixes: e0830704de7c ("drm/vmwgfx: takedown vram manager") Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/

Re: [Nouveau] [PATCH] drm/nouveau: missing cases of rename ttm_mem_reg to ttm_resource.

2020-08-06 Thread Dave Airlie
On Fri, 7 Aug 2020 at 14:03, Dave Airlie wrote: > > On Fri, 7 Aug 2020 at 11:13, Rodrigo Vivi wrote: > > > > From: Rodrigo Vivi > > > > These are missed cases that I just identified with allyesconfig build. > > > > Is this against drm-tip? it's a m

Re: [Nouveau] [PATCH] drm/nouveau: missing cases of rename ttm_mem_reg to ttm_resource.

2020-08-06 Thread Dave Airlie
ixes: 2966141ad2dd ("drm/ttm: rename ttm_mem_reg to ttm_resource.") > Cc: Dave Airlie > Cc: Ben Skeggs > Signed-off-by: Rodrigo Vivi > --- > drivers/gpu/drm/nouveau/nouveau_bo.h | 14 +++--- > drivers/gpu/drm/nouveau/nouveau_bo0039.c | 4 ++-- &g

Re: [PATCH 3/3] drm/radeon: drop superflous AGP handling

2020-08-06 Thread Dave Airlie
On Thu, 6 Aug 2020 at 23:51, Christian König wrote: > > The object flags created in radeon_ttm_placement_from_domain take care that > we use the correct caching for AGP, this is just superflous. > > Signed-off-by: Christian König Reviewed-by: Dave Airlie > --- > d

Re: [PATCH 2/3] drm/ttm: give resource functions their own [ch] files

2020-08-06 Thread Dave Airlie
On Thu, 6 Aug 2020 at 23:51, Christian König wrote: > > This is a separate object we work within TTM. Reviewed-by: Dave Airlie > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c|

Re: [PATCH 1/3] drm/ttm: rename ttm_resource_manager_func callbacks

2020-08-06 Thread Dave Airlie
On Thu, 6 Aug 2020 at 23:51, Christian König wrote: > > The names get/put are associated with reference counting > in the Linux kernel, use alloc/free instead. > Sounds good, Reviewed-by: Dave Airlie > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/am

[PATCH 1/4] drm/amdgpu/ttm: move vram/gtt mgr allocations to mman.

2020-08-06 Thread Dave Airlie
From: Dave Airlie Christian suggested this and it makes sense. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 21 - drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 19 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 24

further small ttm cleanups

2020-08-06 Thread Dave Airlie
These are a bit misc/bit rfc, Christian you suggested the first, the second follows on from that and are both amdgpu specifc. These are more RFC or may ignite some better ideas, I'm not hard sold on either. Dave. ___ dri-devel mailing list

[PATCH 3/4] drm/ttm: drop size from resource manager base class.

2020-08-06 Thread Dave Airlie
From: Dave Airlie This is a bit more involved that it looked, the range manager needs accessors adding and amdgpu needs a bit of a refactor. --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 21 --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 +++-- drivers/gpu/drm/amd

[PATCH 2/4] drm/amdgpu/ttm: drop the adev link from vram mgr

2020-08-06 Thread Dave Airlie
From: Dave Airlie There is no need for that now since it's embedded. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 11 +++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu

[PATCH 4/4] drm/ttm/nouveau: move io_lru storage into driver.

2020-08-06 Thread Dave Airlie
From: Dave Airlie This moves the io lru tracking into the driver allocated structure. Probably need to consider if we can move more stuff in there around the nouveau only io_lru functionality. --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 24 +--- drivers/gpu/drm/ttm/ttm_bo.c

Re: [PATCH 1/2] drm/ttm: drop size from resource manager base class.

2020-08-05 Thread Dave Airlie
On Thu, 6 Aug 2020 at 14:39, Dave Airlie wrote: > > From: Dave Airlie Just realised this is on an unpublished base, I'd had amended one amdgpu ttm patch to avoid kzalloc, but not sent it out, but hadn't rebased it either. Dave. ___ dri-devel m

[PATCH 2/2] drm/ttm/nouveau: move io_lru storage into driver.

2020-08-05 Thread Dave Airlie
From: Dave Airlie This moves the io lru tracking into the driver allocated structure. Probably need to consider if we can move more stuff in there around the nouveau only io_lru functionality. --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 24 +--- drivers/gpu/drm/ttm/ttm_bo.c

[rfc] further ttm cleanups

2020-08-05 Thread Dave Airlie
these are just for discussion mostly, one drop size from the resource manager the other moves the storage for the io_lru into nouveau. Dave. ___ dri-devel mailing list dri-devel@lists.freedesktop.org

[PATCH 1/2] drm/ttm: drop size from resource manager base class.

2020-08-05 Thread Dave Airlie
From: Dave Airlie This is a bit more involved that it looked, the range manager needs accessors adding and amdgpu needs a bit of a refactor. --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 17 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 +++-- drivers/gpu/drm/amd

Re: [PATCH 39/49] drm/ttm: make ttm_bo_man_init/takedown take type + args

2020-08-05 Thread Dave Airlie
> That was not what I was talking about. Take a look at what those fields > are used for :) > > > As far as I see the only usage of the size is in > ttm_resource_manager_debug(). But this size is actually totally opaque > to TTM, it could be pages, bytes, fried chicken wings or whatever. In >

Re: [git pull] drm next for 5.9-rc1

2020-08-05 Thread Dave Airlie
On Thu, 6 Aug 2020 at 11:07, Dave Airlie wrote: > > Hi Linus, > > This the main drm pull request for 5.9-rc1. > > New xilinx displayport driver, AMD support for two new GPUs (more > header files), i915 initial support for RocketLake and some work on > their DG1 (discrete

Re: [PATCH] drm/mgag200: Set PCI option register in G200SE models

2020-08-04 Thread Dave Airlie
On Tue, 4 Aug 2020 at 16:52, Thomas Zimmermann wrote: > > The initial value of the PCI option register got lost while refactoring > the driver init code. Restore the setting. > Ooops, Reviewed-by: Dave Airlie > Signed-off-by: Thomas Zimmermann > Reported-by: kernel t

Re: [00/59] ttm misc cleanups, mem refactoring, rename objects. (v2)

2020-08-03 Thread Dave Airlie
On Tue, 4 Aug 2020 at 12:56, Dave Airlie wrote: > > I've decided to repost the whole queue this time, it has a few driver > patches up front that are just cleanups. Sample branch is https://cgit.freedesktop.org/~airlied/linux/log/?h=ttm-refactor-mem-manager-ren

[PATCH 59/59] drm/ttm: rename ttm_mem_reg to ttm_resource.

2020-08-03 Thread Dave Airlie
From: Dave Airlie This name better reflects what the object does. I didn't rename all the pointers it seemed too messy. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 6 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c| 4 +- drivers/gpu/drm/amd/amdgpu

[PATCH 41/59] drm/radeon/ttm: use wrapper to access memory manager

2020-08-03 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_gem.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 12 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c index

[PATCH 57/59] drm/ttm: rename bo manager to range manager.

2020-08-03 Thread Dave Airlie
From: Dave Airlie The generic manager is called the range manager now, rename the file and some internals. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/Makefile | 2 +- .../{ttm_bo_manager.c => ttm_range_manager.c} | 26 +-- 2 files changed,

[PATCH 55/59] drm/ttm: drop type manager has_type

2020-08-03 Thread Dave Airlie
From: Dave Airlie under driver control, this flag isn't needed anymore, remove the API that used to access it, and consoldiate with the used api. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2

[PATCH 58/59] drm/ttm: rename ttm_mem_type_manager -> ttm_resource_manager.

2020-08-03 Thread Dave Airlie
From: Dave Airlie This name makes a lot more sense, since these are about managing driver resources rather than just memory ranges. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 2 +- drivers/gpu/drm/amd

[PATCH 56/59] drm/ttm: add a wrapper for checking if manager is in use

2020-08-03 Thread Dave Airlie
From: Dave Airlie This converts vmwgfx over to using an interface to set the in use and check the in use flag. Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 1 - drivers/gpu/drm/ttm/ttm_bo.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 14

[PATCH 50/59] drm/nouveau/ttm: move to driver allocated manager

2020-08-03 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_ttm.c | 45 +++ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index 1c636723823c

[PATCH 53/59] drm/ttm: drop man->bdev link.

2020-08-03 Thread Dave Airlie
From: Dave Airlie This link isn't needed anymore, drop it from the init interface. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 6 ++ drivers/gpu

[PATCH 48/59] drm/vmwgfx/ttm: move thp to driver managed

2020-08-03 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 32 +++-- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c index 720a24214c74..1cefd9c1e8ea

[PATCH 44/59] drm/ttm: allow drivers to provide their own manager subclasses

2020-08-03 Thread Dave Airlie
From: Dave Airlie This will get removed eventually and all drivers will use this. Signed-off-by: Dave Airlie --- include/drm/ttm/ttm_bo_driver.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h

[PATCH 54/59] drm/ttm: drop list of memory managers from device. (v2)

2020-08-03 Thread Dave Airlie
From: Dave Airlie The driver now controls these, the core just controls the system memory one. v2: init sysman explicitly and assign it as a driver manager to simplify the lookup sequence. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c| 6 +++--- include/drm/ttm

[PATCH 52/59] drm/amdgpu/ttm: remove man->bdev references.

2020-08-03 Thread Dave Airlie
From: Dave Airlie Just store the device in the private so the link can be removed from the manager Reviewed-by: Christian König Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH 46/59] drm/ttm: make ttm_range_man_init/takedown take type + args

2020-08-03 Thread Dave Airlie
From: Dave Airlie This makes it easier to move these to a driver allocated system Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 15 +--- drivers/gpu/drm/drm_gem_vram_helper.c | 10 drivers/gpu/drm/nouveau/nouveau_ttm.c | 22

[PATCH 49/59] drm/vmwgfx/gmrid: convert to driver controlled allocation.

2020-08-03 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 32 +++ 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c index

[PATCH 45/59] drm/amdgpu/ttm: use bo manager subclassing for vram/gtt mgrs

2020-08-03 Thread Dave Airlie
From: Dave Airlie Reviewed-by: Christian König Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 35 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 36 +--- 2 files changed, 44 insertions(+), 27 deletions(-) diff --git a/drivers

[PATCH 51/59] drm/ttm: drop priv pointer in memory manager

2020-08-03 Thread Dave Airlie
From: Dave Airlie This isn't needed anymore by any drivers. Reviewed-by: Christian König Signed-off-by: Dave Airlie --- include/drm/ttm/ttm_bo_driver.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index 789c1eb26859

[PATCH 47/59] drm/ttm: move range manager to subclassed driver allocation

2020-08-03 Thread Dave Airlie
From: Dave Airlie Reviewed-by: Christian König Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo_manager.c | 31 +--- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_manager.c b/drivers/gpu/drm/ttm/ttm_bo_manager.c

[PATCH 29/59] drm/vram_helper: call explicit mm takedown

2020-08-03 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 d7c0fdf82eb6..2099851c017e 100644 --- a/drivers/gpu/drm

[PATCH 28/59] drm/vmwgfx: takedown vram manager

2020-08-03 Thread Dave Airlie
From: Dave Airlie Don't bother returning EBUSY, nobody cares enough, if the driver has a problem, it should deal with it. Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 14 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_thp.c

[PATCH 26/59] drm/ttm: start allowing drivers to use new takedown path (v2)

2020-08-03 Thread Dave Airlie
From: Dave Airlie Allow the takedown path callback to be optional as well. v2: use fini for range manager Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c | 12 +++- drivers/gpu/drm/ttm/ttm_bo_manager.c | 21 +++-- include/drm/ttm/ttm_bo_driver.h

[PATCH 25/59] drm/ttm: make some inline helper functions for cleanup paths. (v2)

2020-08-03 Thread Dave Airlie
From: Dave Airlie The disable path is just temporary for now, it will be dropped once has_type is gone in a later patch. v2: add docs. rename to ttm_mem_type_manager namespace Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_bo.c| 6 ++ include/drm/ttm/ttm_bo_driver.h | 26

[PATCH 33/59] drm/vmwgfx: fix gmrid takedown paths to new interface

2020-08-03 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 9 - drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 11 --- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git

[PATCH 32/59] drm/qxl/ttm: use new takedown path

2020-08-03 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/qxl/qxl_ttm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index bfbd2c5c38a2..0f7071829056 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b

[PATCH 42/59] drm/vmwgfx/ttm: use wrapper to access memory manager

2020-08-03 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 23 +++ drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_thp.c | 4 ++-- 3 files changed, 18 insertions(+), 13 deletions(-) diff

<    3   4   5   6   7   8   9   10   11   12   >