From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 8/9] drm/vram-helper: stop implementing init_mem_type
Date: Fri, 24 Jul 2020 08:51:21 +0200 [thread overview]
Message-ID: <a9d4e73b-d4bd-1bbe-0538-1ac21cfac1a5@suse.de> (raw)
In-Reply-To: <20200723151710.3591-9-christian.koenig@amd.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 2114 bytes --]
Am 23.07.20 um 17:17 schrieb Christian König:
> Instead just initialize the memory type parameters
> before calling ttm_bo_init_mm.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> drivers/gpu/drm/drm_gem_vram_helper.c | 16 ++++------------
> 1 file changed, 4 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
> index 801a14c6e9e0..f7f93a49cd7f 100644
> --- a/drivers/gpu/drm/drm_gem_vram_helper.c
> +++ b/drivers/gpu/drm/drm_gem_vram_helper.c
> @@ -1007,18 +1007,6 @@ static struct ttm_tt *bo_driver_ttm_tt_create(struct ttm_buffer_object *bo,
> static int bo_driver_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
> struct ttm_mem_type_manager *man)
> {
> - switch (type) {
> - case TTM_PL_SYSTEM:
> - break;
> - case TTM_PL_VRAM:
> - man->func = &ttm_bo_manager_func;
> - man->available_caching = TTM_PL_FLAG_UNCACHED |
> - TTM_PL_FLAG_WC;
> - man->default_caching = TTM_PL_FLAG_WC;
> - break;
> - default:
> - return -EINVAL;
> - }
> return 0;
> }
>
> @@ -1126,6 +1114,7 @@ EXPORT_SYMBOL(drm_vram_mm_debugfs_init);
> static int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev,
> uint64_t vram_base, size_t vram_size)
> {
> + struct ttm_mem_type_manager *man = &vmm->bdev.man[TTM_PL_VRAM];
> int ret;
>
> vmm->vram_base = vram_base;
> @@ -1138,6 +1127,9 @@ static int drm_vram_mm_init(struct drm_vram_mm *vmm, struct drm_device *dev,
> if (ret)
> return ret;
>
> + man->func = &ttm_bo_manager_func;
> + man->available_caching = TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC;
> + man->default_caching = TTM_PL_FLAG_WC;
> ret = ttm_bo_init_mm(&vmm->bdev, TTM_PL_VRAM, vram_size >> PAGE_SHIFT);
> if (ret)
> return ret;
>
--
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
next prev parent reply other threads:[~2020-07-24 6:51 UTC|newest]
Thread overview: 20+ 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
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 [this message]
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
2020-07-30 9:00 [PATCH 1/9] drm/ttm: initialize the system domain with defaults v2 Christian König
2020-07-30 9:00 ` [PATCH 8/9] drm/vram-helper: stop implementing init_mem_type Christian König
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=a9d4e73b-d4bd-1bbe-0538-1ac21cfac1a5@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).