linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: DRI <dri-devel@lists.freedesktop.org>,
	Alex Deucher <alexander.deucher@amd.com>,
	Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics <intel-gfx@lists.freedesktop.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Luben Tuikov <luben.tuikov@amd.com>
Subject: Re: linux-next: manual merge of the drm-misc tree with the amdgpu tree
Date: Thu, 3 Sep 2020 17:06:12 +1000	[thread overview]
Message-ID: <20200903170612.18cebfad@canb.auug.org.au> (raw)
In-Reply-To: <20200826101853.59136e16@canb.auug.org.au>

[-- Attachment #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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-09-03  7:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  0:18 linux-next: manual merge of the drm-misc tree with the amdgpu tree Stephen Rothwell
2020-09-03  7:06 ` Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-11-03  3:21 Stephen Rothwell
2020-11-09  2:16 ` Stephen Rothwell
2020-10-28  1:06 Stephen Rothwell
2020-11-05  0:39 ` 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200903170612.18cebfad@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=airlied@redhat.com \
    --cc=alexander.deucher@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=luben.tuikov@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).