dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/9] drm/ttm: initialize the system domain with defaults
Date: Fri, 24 Jul 2020 08:43:29 +0200	[thread overview]
Message-ID: <0f69b57b-407a-8c23-04e2-280436e6c368@suse.de> (raw)
In-Reply-To: <20200723151710.3591-2-christian.koenig@amd.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 4968 bytes --]



Am 23.07.20 um 17:17 schrieb Christian König:
> Instead of repeating that in each driver.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c    | 3 ---
>  drivers/gpu/drm/drm_gem_vram_helper.c      | 3 ---
>  drivers/gpu/drm/nouveau/nouveau_bo.c       | 3 ---
>  drivers/gpu/drm/qxl/qxl_ttm.c              | 3 ---
>  drivers/gpu/drm/radeon/radeon_ttm.c        | 3 ---
>  drivers/gpu/drm/ttm/ttm_bo.c               | 2 ++
>  drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 2 --
>  7 files changed, 2 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index 0dd5e802091d..e57c49a91b73 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -84,9 +84,6 @@ static int amdgpu_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
>  	switch (type) {
>  	case TTM_PL_SYSTEM:
>  		/* System memory */
> -		man->flags = 0;
> -		man->available_caching = TTM_PL_MASK_CACHING;
> -		man->default_caching = TTM_PL_FLAG_CACHED;
>  		break;
>  	case TTM_PL_TT:
>  		/* GTT memory  */
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index 3296ed3df358..be177afdeb9a 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -1009,9 +1009,6 @@ static int bo_driver_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
>  {
>  	switch (type) {
>  	case TTM_PL_SYSTEM:
> -		man->flags = 0;
> -		man->available_caching = TTM_PL_MASK_CACHING;
> -		man->default_caching = TTM_PL_FLAG_CACHED;
>  		break;
>  	case TTM_PL_VRAM:
>  		man->func = &ttm_bo_manager_func;
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> index 4ccf937df0d0..53af25020bb2 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> @@ -655,9 +655,6 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
>  
>  	switch (type) {
>  	case TTM_PL_SYSTEM:
> -		man->flags = 0;
> -		man->available_caching = TTM_PL_MASK_CACHING;
> -		man->default_caching = TTM_PL_FLAG_CACHED;
>  		break;
>  	case TTM_PL_VRAM:
>  		man->flags = TTM_MEMTYPE_FLAG_FIXED;
> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> index 1d8e07b8b19e..e9b8c921c1f0 100644
> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> @@ -54,9 +54,6 @@ static int qxl_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
>  	switch (type) {
>  	case TTM_PL_SYSTEM:
>  		/* System memory */
> -		man->flags = 0;
> -		man->available_caching = TTM_PL_MASK_CACHING;
> -		man->default_caching = TTM_PL_FLAG_CACHED;
>  		break;
>  	case TTM_PL_VRAM:
>  	case TTM_PL_PRIV:
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index b474781a0920..b4cb75361577 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -76,9 +76,6 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
>  	switch (type) {
>  	case TTM_PL_SYSTEM:
>  		/* System memory */
> -		man->flags = 0;
> -		man->available_caching = TTM_PL_MASK_CACHING;
> -		man->default_caching = TTM_PL_FLAG_CACHED;
>  		break;
>  	case TTM_PL_TT:
>  		man->func = &ttm_bo_manager_func;
> diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
> index 7c02ce784805..1f1f9e463265 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo.c
> @@ -1677,6 +1677,8 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev,
>  	 * Initialize the system memory buffer type.
>  	 * Other types need to be driver / IOCTL initialized.
>  	 */
> +	bdev->man[TTM_PL_SYSTEM].available_caching = TTM_PL_MASK_CACHING;
> +	bdev->man[TTM_PL_SYSTEM].default_caching = TTM_PL_FLAG_CACHED;
>  	ret = ttm_bo_init_mm(bdev, TTM_PL_SYSTEM, 0);
>  	if (unlikely(ret != 0))
>  		goto out_no_sys;
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> index 1d78187eaba6..00cef1a3a178 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
> @@ -742,8 +742,6 @@ static int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
>  	switch (type) {
>  	case TTM_PL_SYSTEM:
>  		/* System memory */
> -		man->available_caching = TTM_PL_FLAG_CACHED;
> -		man->default_caching = TTM_PL_FLAG_CACHED;
>  		break;
>  	case TTM_PL_VRAM:
>  		/* "On-card" video ram */
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


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

  reply	other threads:[~2020-07-24  6:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 15:17 More TTM cleanups Christian König
2020-07-23 15:17 ` [PATCH 1/9] drm/ttm: initialize the system domain with defaults Christian König
2020-07-24  6:43   ` Thomas Zimmermann [this message]
2020-07-29  6:21     ` Dave Airlie
2020-07-29  6:23       ` Dave Airlie
2020-07-29  9:47         ` Christian König
2020-07-23 15:17 ` [PATCH 2/9] drm/ttm: remove TTM_MEMTYPE_FLAG_FIXED Christian König
2020-07-24  6:50   ` Thomas Zimmermann
2020-07-24  7:27     ` Christian König
2020-07-23 15:17 ` [PATCH 3/9] drm/radeon: stop implementing init_mem_type Christian König
2020-07-23 15:17 ` [PATCH 4/9] drm/amdgpu: " Christian König
2020-07-23 15:17 ` [PATCH 5/9] drm/vmwgfx: " Christian König
2020-07-23 15:17 ` [PATCH 6/9] drm/nouveau: " Christian König
2020-07-23 15:17 ` [PATCH 7/9] drm/qxl: " Christian König
2020-07-23 15:17 ` [PATCH 8/9] drm/vram-helper: " Christian König
2020-07-24  6:51   ` Thomas Zimmermann
2020-07-23 15:17 ` [PATCH 9/9] drm/ttm: remove the init_mem_type callback Christian König
2020-07-23 20:31   ` Alex Deucher
2020-07-24  6:51   ` Thomas Zimmermann
  -- strict thread matches above, loose matches on Subject: below --
2020-07-23 15:16 [PATCH 1/9] drm/ttm: initialize the system domain with defaults Christian König
2020-07-27  9:42 ` daniel
2020-07-27 10:39   ` Christian König
2020-07-27 10:50     ` Hellstrom, Thomas
2020-07-27 12:23       ` Christian König
2020-07-27 13:01         ` Hellstrom, Thomas

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=0f69b57b-407a-8c23-04e2-280436e6c368@suse.de \
    --to=tzimmermann@suse.de \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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).