Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] 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; 6+ 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 --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Intel-gfx] 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; 6+ 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 --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [Intel-gfx] 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; 6+ 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 --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-26  0:18 [Intel-gfx] linux-next: manual merge of the drm-misc tree with the amdgpu tree Stephen Rothwell
2020-09-03  7:06 ` 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-11-03  3:21 Stephen Rothwell
2020-11-09  2:16 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox