dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the drm-misc tree with the amdgpu tree
@ 2020-11-03  3:21 Stephen Rothwell
  2020-11-09  2:16 ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2020-11-03  3:21 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Linux Next Mailing List, Rodrigo Siqueira,
	Linux Kernel Mailing List, Maxime Ripard


[-- Attachment #1.1: Type: text/plain, Size: 2017 bytes --]

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

between commit:

  e8a982355f96 ("drm/amd/display: Add tracepoint for amdgpu_dm")

from the amdgpu tree and commit:

  29b77ad7b9ca ("drm/atomic: Pass the full state to CRTC atomic_check")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 28dcaae06993,86fd4420f128..000000000000
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@@ -6003,19 -5514,19 +6003,21 @@@ static void dm_update_crtc_active_plane
  }
  
  static int dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
- 				       struct drm_crtc_state *state)
+ 				       struct drm_atomic_state *state)
  {
+ 	struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
+ 									  crtc);
  	struct amdgpu_device *adev = drm_to_adev(crtc->dev);
  	struct dc *dc = adev->dm.dc;
- 	struct dm_crtc_state *dm_crtc_state = to_dm_crtc_state(state);
+ 	struct dm_crtc_state *dm_crtc_state = to_dm_crtc_state(crtc_state);
  	int ret = -EINVAL;
  
- 	trace_amdgpu_dm_crtc_atomic_check(state);
++	trace_amdgpu_dm_crtc_atomic_check(crtc_state);
 +
- 	dm_update_crtc_active_planes(crtc, state);
+ 	dm_update_crtc_active_planes(crtc, crtc_state);
  
  	if (unlikely(!dm_crtc_state->stream &&
- 		     modeset_required(state, NULL, dm_crtc_state->stream))) {
+ 		     modeset_required(crtc_state, NULL, dm_crtc_state->stream))) {
  		WARN_ON(1);
  		return ret;
  	}

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the drm-misc tree with the amdgpu tree
  2020-11-03  3:21 linux-next: manual merge of the drm-misc tree with the amdgpu tree Stephen Rothwell
@ 2020-11-09  2:16 ` Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2020-11-09  2:16 UTC (permalink / raw)
  To: DRI, Alex Deucher, Dave Airlie
  Cc: Daniel Vetter, Intel Graphics, Rodrigo Siqueira,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Maxime Ripard


[-- Attachment #1.1: Type: text/plain, Size: 2275 bytes --]

Hi all,

On Tue, 3 Nov 2020 14:21:08 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the drm-misc tree got a conflict in:
> 
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> 
> between commit:
> 
>   e8a982355f96 ("drm/amd/display: Add tracepoint for amdgpu_dm")
> 
> from the amdgpu tree and commit:
> 
>   29b77ad7b9ca ("drm/atomic: Pass the full state to CRTC atomic_check")
> 
> from the drm-misc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>  
> diff --cc drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 28dcaae06993,86fd4420f128..000000000000
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@@ -6003,19 -5514,19 +6003,21 @@@ static void dm_update_crtc_active_plane
>   }
>   
>   static int dm_crtc_helper_atomic_check(struct drm_crtc *crtc,
> - 				       struct drm_crtc_state *state)
> + 				       struct drm_atomic_state *state)
>   {
> + 	struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
> + 									  crtc);
>   	struct amdgpu_device *adev = drm_to_adev(crtc->dev);
>   	struct dc *dc = adev->dm.dc;
> - 	struct dm_crtc_state *dm_crtc_state = to_dm_crtc_state(state);
> + 	struct dm_crtc_state *dm_crtc_state = to_dm_crtc_state(crtc_state);
>   	int ret = -EINVAL;
>   
> - 	trace_amdgpu_dm_crtc_atomic_check(state);
> ++	trace_amdgpu_dm_crtc_atomic_check(crtc_state);
>  +
> - 	dm_update_crtc_active_planes(crtc, state);
> + 	dm_update_crtc_active_planes(crtc, crtc_state);
>   
>   	if (unlikely(!dm_crtc_state->stream &&
> - 		     modeset_required(state, NULL, dm_crtc_state->stream))) {
> + 		     modeset_required(crtc_state, NULL, dm_crtc_state->stream))) {
>   		WARN_ON(1);
>   		return ret;
>   	}

This is now a conflict between the drm tree and the amdgpu tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the drm-misc tree with the amdgpu tree
  2020-10-28  1:06 Stephen Rothwell
@ 2020-11-05  0:39 ` Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2020-11-05  0:39 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Mihir Bhogilal Patel, Dave Airlie, Linux Next Mailing List,
	Christian König, Linux Kernel Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 1995 bytes --]

Hi all,

On Wed, 28 Oct 2020 12:06:31 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the drm-misc tree got a conflict in:
> 
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> 
> between commit:
> 
>   ff72bc403170 ("drm/amdgpu: Add debugfs entry for printing VM info")
> 
> from the amdgpu tree and commit:
> 
>   4671078eb8e3 ("drm/amdgpu: switch over to the new pin interface")
> 
> from the drm-misc tree.
> 
> I fixed it up (I used the former version of this file and added the
> following patch) and can carry the fix as necessary. This is now fixed
> as far as linux-next is concerned, but any non trivial conflicts should
> be mentioned to your upstream maintainer when your tree is submitted
> for merging.  You may also want to consider cooperating with the
> maintainer of the conflicting tree to minimise any particularly complex
> conflicts.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 28 Oct 2020 11:52:31 +1100
> Subject: [PATCH] merge fix up for "drm/amdgpu: Add debugfs entry for printing
>  VM info"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> index baca32263ec4..06dfe9b1c7e6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
> @@ -1555,7 +1555,7 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m)
>  	seq_printf(m, "\t\t0x%08x: %12lld byte %s",
>  			id, size, placement);
>  
> -	pin_count = READ_ONCE(bo->pin_count);
> +	pin_count = READ_ONCE(bo->tbo.pin_count);
>  	if (pin_count)
>  		seq_printf(m, " pin count %d", pin_count);
>  

This fix up is now needed in the merge between the drm tree and the
amdgpu tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the drm-misc tree with the amdgpu tree
@ 2020-10-28  1:06 Stephen Rothwell
  2020-11-05  0:39 ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2020-10-28  1:06 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Mihir Bhogilal Patel, Dave Airlie, Linux Next Mailing List,
	Christian König, Linux Kernel Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 1747 bytes --]

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c

between commit:

  ff72bc403170 ("drm/amdgpu: Add debugfs entry for printing VM info")

from the amdgpu tree and commit:

  4671078eb8e3 ("drm/amdgpu: switch over to the new pin interface")

from the drm-misc tree.

I fixed it up (I used the former version of this file and added the
following patch) and can carry the fix as necessary. This is now fixed
as far as linux-next is concerned, but any non trivial conflicts should
be mentioned to your upstream maintainer when your tree is submitted
for merging.  You may also want to consider cooperating with the
maintainer of the conflicting tree to minimise any particularly complex
conflicts.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 28 Oct 2020 11:52:31 +1100
Subject: [PATCH] merge fix up for "drm/amdgpu: Add debugfs entry for printing
 VM info"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index baca32263ec4..06dfe9b1c7e6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -1555,7 +1555,7 @@ u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m)
 	seq_printf(m, "\t\t0x%08x: %12lld byte %s",
 			id, size, placement);
 
-	pin_count = READ_ONCE(bo->pin_count);
+	pin_count = READ_ONCE(bo->tbo.pin_count);
 	if (pin_count)
 		seq_printf(m, " pin count %d", pin_count);
 
-- 
2.28.0

-- 
Cheers,
Stephen Rothwell

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the drm-misc tree with the amdgpu tree
  2020-08-26  0:18 Stephen Rothwell
@ 2020-09-03  7:06 ` Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2020-09-03  7:06 UTC (permalink / raw)
  To: DRI, Alex Deucher, Dave Airlie
  Cc: Daniel Vetter, Intel Graphics, Linux Next Mailing List,
	Linux Kernel Mailing List, Luben Tuikov


[-- Attachment #1.1: Type: text/plain, Size: 6103 bytes --]

Hi all,

On Wed, 26 Aug 2020 10:18:53 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
> 
> Today's linux-next merge of the drm-misc tree got conflicts in:
> 
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> 
> between commits:
> 
>   cacbbe7c0065 ("drm/amdgpu: move stolen memory from gmc to mman")
>   72de33f8f7ba ("drm/amdgpu: move IP discovery data to mman")
>   87ded5caeec3 ("drm/amdgpu: move vram usage by vbios to mman (v2)")
>   1348969ab68c ("drm/amdgpu: drm_device to amdgpu_device by inline-f (v2)")
> 
> from the amdgpu tree and commits:
> 
>   6c28aed6e5b7 ("drm/amdgfx/ttm: use wrapper to get ttm memory managers")
>   9de59bc20149 ("drm/ttm: rename ttm_mem_type_manager -> ttm_resource_manager.")
>   4f297b9c82e1 ("drm/amdgpu/ttm: move vram/gtt mgr allocations to mman.")
> 
> from the drm-misc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
> index e1b66898cb76,697bc2c6fdb2..000000000000
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
> @@@ -47,10 -46,10 +46,10 @@@ static ssize_t amdgpu_mem_info_gtt_tota
>   		struct device_attribute *attr, char *buf)
>   {
>   	struct drm_device *ddev = dev_get_drvdata(dev);
>  -	struct amdgpu_device *adev = ddev->dev_private;
>  +	struct amdgpu_device *adev = drm_to_adev(ddev);
> - 
> + 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, TTM_PL_TT);
>   	return snprintf(buf, PAGE_SIZE, "%llu\n",
> - 			(adev->mman.bdev.man[TTM_PL_TT].size) * PAGE_SIZE);
> + 			man->size * PAGE_SIZE);
>   }
>   
>   /**
> @@@ -65,10 -64,10 +64,10 @@@ static ssize_t amdgpu_mem_info_gtt_used
>   		struct device_attribute *attr, char *buf)
>   {
>   	struct drm_device *ddev = dev_get_drvdata(dev);
>  -	struct amdgpu_device *adev = ddev->dev_private;
>  +	struct amdgpu_device *adev = drm_to_adev(ddev);
> - 
> + 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, TTM_PL_TT);
>   	return snprintf(buf, PAGE_SIZE, "%llu\n",
> - 			amdgpu_gtt_mgr_usage(&adev->mman.bdev.man[TTM_PL_TT]));
> + 			amdgpu_gtt_mgr_usage(man));
>   }
>   
>   static DEVICE_ATTR(mem_info_gtt_total, S_IRUGO,
> diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 63e541409549,fc5f7ac53d0a..000000000000
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@@ -2316,8 -2251,8 +2261,8 @@@ static int amdgpu_mm_dump_table(struct 
>   	struct drm_info_node *node = (struct drm_info_node *)m->private;
>   	unsigned ttm_pl = (uintptr_t)node->info_ent->data;
>   	struct drm_device *dev = node->minor->dev;
>  -	struct amdgpu_device *adev = dev->dev_private;
>  +	struct amdgpu_device *adev = drm_to_adev(dev);
> - 	struct ttm_mem_type_manager *man = &adev->mman.bdev.man[ttm_pl];
> + 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, ttm_pl);
>   	struct drm_printer p = drm_seq_file_printer(m);
>   
>   	man->func->debug(man, &p);
> diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> index de37ceff0e56,7ba2be37e6ba..000000000000
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> @@@ -60,22 -75,8 +75,24 @@@ struct amdgpu_mman 
>   	/* Scheduler entity for buffer moves */
>   	struct drm_sched_entity			entity;
>   
>  +	uint64_t		stolen_vga_size;
>  +	struct amdgpu_bo	*stolen_vga_memory;
>  +	uint64_t		stolen_extended_size;
>  +	struct amdgpu_bo	*stolen_extended_memory;
>  +	bool			keep_stolen_vga_memory;
>  +
>  +	/* discovery */
>  +	uint8_t				*discovery_bin;
>  +	uint32_t			discovery_tmr_size;
>  +	struct amdgpu_bo		*discovery_memory;
>  +
>  +	/* firmware VRAM reservation */
>  +	u64		fw_vram_usage_start_offset;
>  +	u64		fw_vram_usage_size;
>  +	struct amdgpu_bo	*fw_vram_usage_reserved_bo;
>  +	void		*fw_vram_usage_va;
> + 	struct amdgpu_vram_mgr vram_mgr;
> + 	struct amdgpu_gtt_mgr gtt_mgr;
>   };
>   
>   struct amdgpu_copy_mem {
> diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> index 91098a385ed6,7574be6cd7a0..000000000000
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
> @@@ -81,10 -84,10 +84,10 @@@ static ssize_t amdgpu_mem_info_vram_use
>   		struct device_attribute *attr, char *buf)
>   {
>   	struct drm_device *ddev = dev_get_drvdata(dev);
>  -	struct amdgpu_device *adev = ddev->dev_private;
>  +	struct amdgpu_device *adev = drm_to_adev(ddev);
> - 
> + 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM);
>   	return snprintf(buf, PAGE_SIZE, "%llu\n",
> - 		amdgpu_vram_mgr_usage(&adev->mman.bdev.man[TTM_PL_VRAM]));
> + 			amdgpu_vram_mgr_usage(man));
>   }
>   
>   /**
> @@@ -99,10 -102,10 +102,10 @@@ static ssize_t amdgpu_mem_info_vis_vram
>   		struct device_attribute *attr, char *buf)
>   {
>   	struct drm_device *ddev = dev_get_drvdata(dev);
>  -	struct amdgpu_device *adev = ddev->dev_private;
>  +	struct amdgpu_device *adev = drm_to_adev(ddev);
> - 
> + 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM);
>   	return snprintf(buf, PAGE_SIZE, "%llu\n",
> - 		amdgpu_vram_mgr_vis_usage(&adev->mman.bdev.man[TTM_PL_VRAM]));
> + 			amdgpu_vram_mgr_vis_usage(man));
>   }
>   
>   static ssize_t amdgpu_mem_info_vram_vendor(struct device *dev,

These are now conflict between the amdgpu tree and the drm tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the drm-misc tree with the amdgpu tree
@ 2020-08-26  0:18 Stephen Rothwell
  2020-09-03  7:06 ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2020-08-26  0:18 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Luben Tuikov, Linux Next Mailing List, Linux Kernel Mailing List,
	Dave Airlie


[-- Attachment #1.1: Type: text/plain, Size: 5618 bytes --]

Hi all,

Today's linux-next merge of the drm-misc tree got conflicts in:

  drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
  drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c

between commits:

  cacbbe7c0065 ("drm/amdgpu: move stolen memory from gmc to mman")
  72de33f8f7ba ("drm/amdgpu: move IP discovery data to mman")
  87ded5caeec3 ("drm/amdgpu: move vram usage by vbios to mman (v2)")
  1348969ab68c ("drm/amdgpu: drm_device to amdgpu_device by inline-f (v2)")

from the amdgpu tree and commits:

  6c28aed6e5b7 ("drm/amdgfx/ttm: use wrapper to get ttm memory managers")
  9de59bc20149 ("drm/ttm: rename ttm_mem_type_manager -> ttm_resource_manager.")
  4f297b9c82e1 ("drm/amdgpu/ttm: move vram/gtt mgr allocations to mman.")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
index e1b66898cb76,697bc2c6fdb2..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
@@@ -47,10 -46,10 +46,10 @@@ static ssize_t amdgpu_mem_info_gtt_tota
  		struct device_attribute *attr, char *buf)
  {
  	struct drm_device *ddev = dev_get_drvdata(dev);
 -	struct amdgpu_device *adev = ddev->dev_private;
 +	struct amdgpu_device *adev = drm_to_adev(ddev);
- 
+ 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, TTM_PL_TT);
  	return snprintf(buf, PAGE_SIZE, "%llu\n",
- 			(adev->mman.bdev.man[TTM_PL_TT].size) * PAGE_SIZE);
+ 			man->size * PAGE_SIZE);
  }
  
  /**
@@@ -65,10 -64,10 +64,10 @@@ static ssize_t amdgpu_mem_info_gtt_used
  		struct device_attribute *attr, char *buf)
  {
  	struct drm_device *ddev = dev_get_drvdata(dev);
 -	struct amdgpu_device *adev = ddev->dev_private;
 +	struct amdgpu_device *adev = drm_to_adev(ddev);
- 
+ 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, TTM_PL_TT);
  	return snprintf(buf, PAGE_SIZE, "%llu\n",
- 			amdgpu_gtt_mgr_usage(&adev->mman.bdev.man[TTM_PL_TT]));
+ 			amdgpu_gtt_mgr_usage(man));
  }
  
  static DEVICE_ATTR(mem_info_gtt_total, S_IRUGO,
diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index 63e541409549,fc5f7ac53d0a..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@@ -2316,8 -2251,8 +2261,8 @@@ static int amdgpu_mm_dump_table(struct 
  	struct drm_info_node *node = (struct drm_info_node *)m->private;
  	unsigned ttm_pl = (uintptr_t)node->info_ent->data;
  	struct drm_device *dev = node->minor->dev;
 -	struct amdgpu_device *adev = dev->dev_private;
 +	struct amdgpu_device *adev = drm_to_adev(dev);
- 	struct ttm_mem_type_manager *man = &adev->mman.bdev.man[ttm_pl];
+ 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, ttm_pl);
  	struct drm_printer p = drm_seq_file_printer(m);
  
  	man->func->debug(man, &p);
diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
index de37ceff0e56,7ba2be37e6ba..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
@@@ -60,22 -75,8 +75,24 @@@ struct amdgpu_mman 
  	/* Scheduler entity for buffer moves */
  	struct drm_sched_entity			entity;
  
 +	uint64_t		stolen_vga_size;
 +	struct amdgpu_bo	*stolen_vga_memory;
 +	uint64_t		stolen_extended_size;
 +	struct amdgpu_bo	*stolen_extended_memory;
 +	bool			keep_stolen_vga_memory;
 +
 +	/* discovery */
 +	uint8_t				*discovery_bin;
 +	uint32_t			discovery_tmr_size;
 +	struct amdgpu_bo		*discovery_memory;
 +
 +	/* firmware VRAM reservation */
 +	u64		fw_vram_usage_start_offset;
 +	u64		fw_vram_usage_size;
 +	struct amdgpu_bo	*fw_vram_usage_reserved_bo;
 +	void		*fw_vram_usage_va;
+ 	struct amdgpu_vram_mgr vram_mgr;
+ 	struct amdgpu_gtt_mgr gtt_mgr;
  };
  
  struct amdgpu_copy_mem {
diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
index 91098a385ed6,7574be6cd7a0..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
@@@ -81,10 -84,10 +84,10 @@@ static ssize_t amdgpu_mem_info_vram_use
  		struct device_attribute *attr, char *buf)
  {
  	struct drm_device *ddev = dev_get_drvdata(dev);
 -	struct amdgpu_device *adev = ddev->dev_private;
 +	struct amdgpu_device *adev = drm_to_adev(ddev);
- 
+ 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM);
  	return snprintf(buf, PAGE_SIZE, "%llu\n",
- 		amdgpu_vram_mgr_usage(&adev->mman.bdev.man[TTM_PL_VRAM]));
+ 			amdgpu_vram_mgr_usage(man));
  }
  
  /**
@@@ -99,10 -102,10 +102,10 @@@ static ssize_t amdgpu_mem_info_vis_vram
  		struct device_attribute *attr, char *buf)
  {
  	struct drm_device *ddev = dev_get_drvdata(dev);
 -	struct amdgpu_device *adev = ddev->dev_private;
 +	struct amdgpu_device *adev = drm_to_adev(ddev);
- 
+ 	struct ttm_resource_manager *man = ttm_manager_type(&adev->mman.bdev, TTM_PL_VRAM);
  	return snprintf(buf, PAGE_SIZE, "%llu\n",
- 		amdgpu_vram_mgr_vis_usage(&adev->mman.bdev.man[TTM_PL_VRAM]));
+ 			amdgpu_vram_mgr_vis_usage(man));
  }
  
  static ssize_t amdgpu_mem_info_vram_vendor(struct device *dev,

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the drm-misc tree with the amdgpu tree
@ 2019-10-28  2:24 Stephen Rothwell
  2019-10-28  2:24 ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2019-10-28  2:24 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Brian Welty,
	Christian König

[-- Attachment #1: Type: text/plain, Size: 789 bytes --]

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/ttm/ttm_bo_util.c

between commit:

  6d9d5ba31dd1 ("drm/ttm: Refactor ttm_bo_pipeline_move")

from the amdgpu tree and commit:

  ef38321897cf ("drm/ttm: use the parent resv for ghost objects v3")

from the drm-misc tree.

I fixed it up (the code changed by the latter was removed by the former)
and can carry the fix as necessary. This is now fixed as far as linux-next
is concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the drm-misc tree with the amdgpu tree
  2019-10-28  2:24 Stephen Rothwell
@ 2019-10-28  2:24 ` Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2019-10-28  2:24 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Brian Welty, Linux Next Mailing List, Linux Kernel Mailing List,
	Christian König


[-- Attachment #1.1: Type: text/plain, Size: 789 bytes --]

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/ttm/ttm_bo_util.c

between commit:

  6d9d5ba31dd1 ("drm/ttm: Refactor ttm_bo_pipeline_move")

from the amdgpu tree and commit:

  ef38321897cf ("drm/ttm: use the parent resv for ghost objects v3")

from the drm-misc tree.

I fixed it up (the code changed by the latter was removed by the former)
and can carry the fix as necessary. This is now fixed as far as linux-next
is concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the drm-misc tree with the amdgpu tree
@ 2019-08-07  3:09 Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2019-08-07  3:09 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Linux Next Mailing List, Linux Kernel Mailing List,
	Felix Kuehling, Gerd Hoffmann

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/ttm/ttm_bo.c

between commit:

  274840e54422 ("drm/ttm: Add release_notify callback to ttm_bo_driver")

from the amdgpu tree and commit:

  b96f3e7c8069 ("drm/ttm: use gem vma_node")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/ttm/ttm_bo.c
index 2070e8a57ed8,10a861a1690c..000000000000
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@@ -671,10 -672,7 +672,10 @@@ static void ttm_bo_release(struct kref 
  	struct ttm_bo_device *bdev = bo->bdev;
  	struct ttm_mem_type_manager *man = &bdev->man[bo->mem.mem_type];
  
 +	if (bo->bdev->driver->release_notify)
 +		bo->bdev->driver->release_notify(bo);
 +
- 	drm_vma_offset_remove(&bdev->vma_manager, &bo->vma_node);
+ 	drm_vma_offset_remove(&bdev->vma_manager, &bo->base.vma_node);
  	ttm_mem_io_lock(man, false);
  	ttm_mem_io_free_vm(bo);
  	ttm_mem_io_unlock(man);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: linux-next: manual merge of the drm-misc tree with the amdgpu tree
  2019-06-12  1:46 Stephen Rothwell
@ 2019-06-17  3:25 ` Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2019-06-17  3:25 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, Charlene Liu,
	Sam Ravnborg, Dave Airlie

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

Hi all,

On Wed, 12 Jun 2019 11:46:15 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
> 
> Today's linux-next merge of the drm-misc tree got a conflict in:
> 
>   drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
> 
> between commit:
> 
>   c7c7192c56d2 ("drm/amd/display: add audio related regs")
> 
> from the amdgpu tree and commit:
> 
>   4fc4dca8320e ("drm/amd: drop use of drmp.h in os_types.h")
> 
> from the drm-misc tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
> index d43d5d924c19,9b078a71de2e..000000000000
> --- a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
> +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
> @@@ -22,7 -22,9 +22,10 @@@
>    * Authors: AMD
>    *
>    */
> + 
> + #include <linux/slab.h>
> + 
>  +#include "../dc.h"
>   #include "reg_helper.h"
>   #include "dce_audio.h"
>   #include "dce/dce_11_0_d.h"

This is now a conflict between the drm tree and the amdgpu tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the drm-misc tree with the amdgpu tree
@ 2019-06-12  1:46 Stephen Rothwell
  2019-06-17  3:25 ` Stephen Rothwell
  0 siblings, 1 reply; 12+ messages in thread
From: Stephen Rothwell @ 2019-06-12  1:46 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Dave Airlie, Charlene Liu, Linux Next Mailing List, Sam Ravnborg,
	Linux Kernel Mailing List


[-- Attachment #1.1: Type: text/plain, Size: 1164 bytes --]

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/amd/display/dc/dce/dce_audio.c

between commit:

  c7c7192c56d2 ("drm/amd/display: add audio related regs")

from the amdgpu tree and commit:

  4fc4dca8320e ("drm/amd: drop use of drmp.h in os_types.h")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
index d43d5d924c19,9b078a71de2e..000000000000
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
@@@ -22,7 -22,9 +22,10 @@@
   * Authors: AMD
   *
   */
+ 
+ #include <linux/slab.h>
+ 
 +#include "../dc.h"
  #include "reg_helper.h"
  #include "dce_audio.h"
  #include "dce/dce_11_0_d.h"

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* linux-next: manual merge of the drm-misc tree with the amdgpu tree
@ 2019-05-21  0:38 Stephen Rothwell
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Rothwell @ 2019-05-21  0:38 UTC (permalink / raw)
  To: Daniel Vetter, Intel Graphics, DRI, Alex Deucher
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, xinhui pan,
	Andrey Grodzovsky

[-- Attachment #1: Type: text/plain, Size: 2721 bytes --]

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

between commit:

  56965ce261af ("drm/amdgpu: cancel late_init_work before gpu reset")

from the amdgpu tree and commit:

  1d721ed679db ("drm/amdgpu: Avoid HW reset if guilty job already signaled.")

from the drm-misc tree.

I fixed it up (I think - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c9024f92e203,b9371ec5e04f..000000000000
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@@ -3614,28 -3538,27 +3595,28 @@@ int amdgpu_device_gpu_recover(struct am
  
  	dev_info(adev->dev, "GPU reset begin!\n");
  
 +	cancel_delayed_work_sync(&adev->late_init_work);
+ 	hive = amdgpu_get_xgmi_hive(adev, false);
  
  	/*
- 	 * In case of XGMI hive disallow concurrent resets to be triggered
- 	 * by different nodes. No point also since the one node already executing
- 	 * reset will also reset all the other nodes in the hive.
+ 	 * Here we trylock to avoid chain of resets executing from
+ 	 * either trigger by jobs on different adevs in XGMI hive or jobs on
+ 	 * different schedulers for same device while this TO handler is running.
+ 	 * We always reset all schedulers for device and all devices for XGMI
+ 	 * hive so that should take care of them too.
  	 */
- 	hive = amdgpu_get_xgmi_hive(adev, 0);
- 	if (hive && adev->gmc.xgmi.num_physical_nodes > 1 &&
- 	    !mutex_trylock(&hive->reset_lock))
+ 
+ 	if (hive && !mutex_trylock(&hive->reset_lock)) {
+ 		DRM_INFO("Bailing on TDR for s_job:%llx, hive: %llx as another already in progress",
+ 			 job->base.id, hive->hive_id);
  		return 0;
+ 	}
  
  	/* Start with adev pre asic reset first for soft reset check.*/
- 	amdgpu_device_lock_adev(adev);
- 	r = amdgpu_device_pre_asic_reset(adev,
- 					 job,
- 					 &need_full_reset);
- 	if (r) {
- 		/*TODO Should we stop ?*/
- 		DRM_ERROR("GPU pre asic reset failed with err, %d for drm dev, %s ",
- 			  r, adev->ddev->unique);
- 		adev->asic_reset_res = r;
+ 	if (!amdgpu_device_lock_adev(adev, !hive)) {
+ 		DRM_INFO("Bailing on TDR for s_job:%llx, as another already in progress",
+ 					 job->base.id);
+ 		return 0;
  	}
  
  	/* Build list of devices to reset */

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-11-09  2:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03  3:21 linux-next: manual merge of the drm-misc tree with the amdgpu tree Stephen Rothwell
2020-11-09  2:16 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2020-10-28  1:06 Stephen Rothwell
2020-11-05  0:39 ` Stephen Rothwell
2020-08-26  0:18 Stephen Rothwell
2020-09-03  7:06 ` Stephen Rothwell
2019-10-28  2:24 Stephen Rothwell
2019-10-28  2:24 ` Stephen Rothwell
2019-08-07  3:09 Stephen Rothwell
2019-06-12  1:46 Stephen Rothwell
2019-06-17  3:25 ` Stephen Rothwell
2019-05-21  0:38 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).