All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Auld <matthew.auld@intel.com>
To: Arunpravin <Arunpravin.PaneerSelvam@amd.com>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org
Cc: alexander.deucher@amd.com, tzimmermann@suse.de, christian.koenig@amd.com
Subject: Re: [PATCH 8/8] drm/amdgpu: add drm buddy support to amdgpu
Date: Wed, 3 Nov 2021 19:25:19 +0000	[thread overview]
Message-ID: <55adb714-45f9-5af5-33df-ce4f4526a8c8@intel.com> (raw)
In-Reply-To: <20211025130033.1547667-6-Arunpravin.PaneerSelvam@amd.com>

On 25/10/2021 14:00, Arunpravin wrote:
> - Remove drm_mm references and replace with drm buddy functionalities
> - Add res cursor support for drm buddy
> 
> Signed-off-by: Arunpravin <Arunpravin.PaneerSelvam@amd.com>

<snip>

> +		spin_lock(&mgr->lock);
> +		r = drm_buddy_alloc(mm, (uint64_t)place->fpfn << PAGE_SHIFT,
> +					(uint64_t)lpfn << PAGE_SHIFT,
> +					(uint64_t)n_pages << PAGE_SHIFT,
> +					 min_page_size, &node->blocks,
> +					 node->flags);


Is spinlock + GFP_KERNEL allowed?

> +		spin_unlock(&mgr->lock);
> +
> +		if (unlikely(r))
> +			goto error_free_blocks;
> +
>   		pages_left -= pages;
>   		++i;
>   
>   		if (pages > pages_left)
>   			pages = pages_left;
>   	}
> -	spin_unlock(&mgr->lock);
> +
> +	/* Free unused pages for contiguous allocation */
> +	if (place->flags & TTM_PL_FLAG_CONTIGUOUS) {
> +		uint64_t actual_size = (uint64_t)node->base.num_pages << PAGE_SHIFT;
> +
> +		r = drm_buddy_free_unused_pages(mm,
> +						actual_size,
> +						&node->blocks);

Needs some locking.

WARNING: multiple messages have this Message-ID (diff)
From: Matthew Auld <matthew.auld@intel.com>
To: Arunpravin <Arunpravin.PaneerSelvam@amd.com>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org
Cc: alexander.deucher@amd.com, tzimmermann@suse.de, christian.koenig@amd.com
Subject: Re: [Intel-gfx] [PATCH 8/8] drm/amdgpu: add drm buddy support to amdgpu
Date: Wed, 3 Nov 2021 19:25:19 +0000	[thread overview]
Message-ID: <55adb714-45f9-5af5-33df-ce4f4526a8c8@intel.com> (raw)
In-Reply-To: <20211025130033.1547667-6-Arunpravin.PaneerSelvam@amd.com>

On 25/10/2021 14:00, Arunpravin wrote:
> - Remove drm_mm references and replace with drm buddy functionalities
> - Add res cursor support for drm buddy
> 
> Signed-off-by: Arunpravin <Arunpravin.PaneerSelvam@amd.com>

<snip>

> +		spin_lock(&mgr->lock);
> +		r = drm_buddy_alloc(mm, (uint64_t)place->fpfn << PAGE_SHIFT,
> +					(uint64_t)lpfn << PAGE_SHIFT,
> +					(uint64_t)n_pages << PAGE_SHIFT,
> +					 min_page_size, &node->blocks,
> +					 node->flags);


Is spinlock + GFP_KERNEL allowed?

> +		spin_unlock(&mgr->lock);
> +
> +		if (unlikely(r))
> +			goto error_free_blocks;
> +
>   		pages_left -= pages;
>   		++i;
>   
>   		if (pages > pages_left)
>   			pages = pages_left;
>   	}
> -	spin_unlock(&mgr->lock);
> +
> +	/* Free unused pages for contiguous allocation */
> +	if (place->flags & TTM_PL_FLAG_CONTIGUOUS) {
> +		uint64_t actual_size = (uint64_t)node->base.num_pages << PAGE_SHIFT;
> +
> +		r = drm_buddy_free_unused_pages(mm,
> +						actual_size,
> +						&node->blocks);

Needs some locking.

WARNING: multiple messages have this Message-ID (diff)
From: Matthew Auld <matthew.auld@intel.com>
To: Arunpravin <Arunpravin.PaneerSelvam@amd.com>,
	dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org
Cc: alexander.deucher@amd.com, tzimmermann@suse.de,
	jani.nikula@linux.intel.com, christian.koenig@amd.com,
	daniel@ffwll.ch
Subject: Re: [PATCH 8/8] drm/amdgpu: add drm buddy support to amdgpu
Date: Wed, 3 Nov 2021 19:25:19 +0000	[thread overview]
Message-ID: <55adb714-45f9-5af5-33df-ce4f4526a8c8@intel.com> (raw)
In-Reply-To: <20211025130033.1547667-6-Arunpravin.PaneerSelvam@amd.com>

On 25/10/2021 14:00, Arunpravin wrote:
> - Remove drm_mm references and replace with drm buddy functionalities
> - Add res cursor support for drm buddy
> 
> Signed-off-by: Arunpravin <Arunpravin.PaneerSelvam@amd.com>

<snip>

> +		spin_lock(&mgr->lock);
> +		r = drm_buddy_alloc(mm, (uint64_t)place->fpfn << PAGE_SHIFT,
> +					(uint64_t)lpfn << PAGE_SHIFT,
> +					(uint64_t)n_pages << PAGE_SHIFT,
> +					 min_page_size, &node->blocks,
> +					 node->flags);


Is spinlock + GFP_KERNEL allowed?

> +		spin_unlock(&mgr->lock);
> +
> +		if (unlikely(r))
> +			goto error_free_blocks;
> +
>   		pages_left -= pages;
>   		++i;
>   
>   		if (pages > pages_left)
>   			pages = pages_left;
>   	}
> -	spin_unlock(&mgr->lock);
> +
> +	/* Free unused pages for contiguous allocation */
> +	if (place->flags & TTM_PL_FLAG_CONTIGUOUS) {
> +		uint64_t actual_size = (uint64_t)node->base.num_pages << PAGE_SHIFT;
> +
> +		r = drm_buddy_free_unused_pages(mm,
> +						actual_size,
> +						&node->blocks);

Needs some locking.

  reply	other threads:[~2021-11-03 19:25 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 13:00 [PATCH 3/8] drm: implement top-down allocation method Arunpravin
2021-10-25 13:00 ` [Intel-gfx] " Arunpravin
2021-10-25 13:00 ` [PATCH 4/8] drm/i915: add top-down alloc support to i915 Arunpravin
2021-10-25 13:00   ` [Intel-gfx] " Arunpravin
2021-10-25 13:00 ` [PATCH 5/8] drm: Implement method to free unused pages Arunpravin
2021-10-25 13:00   ` [Intel-gfx] " Arunpravin
2021-11-03 19:16   ` Matthew Auld
2021-11-03 19:16     ` Matthew Auld
2021-11-03 19:16     ` [Intel-gfx] " Matthew Auld
2021-11-09 14:06     ` Arunpravin
2021-11-09 14:06       ` [Intel-gfx] " Arunpravin
2021-11-09 14:06       ` Arunpravin
2021-10-25 13:00 ` [PATCH 6/8] drm/i915: add free_unused_pages support to i915 Arunpravin
2021-10-25 13:00   ` [Intel-gfx] " Arunpravin
2021-11-03 19:18   ` Matthew Auld
2021-11-03 19:18     ` Matthew Auld
2021-11-03 19:18     ` [Intel-gfx] " Matthew Auld
2021-11-08 22:04     ` Arunpravin
2021-11-08 22:04       ` [Intel-gfx] " Arunpravin
2021-11-08 22:04       ` Arunpravin
2021-10-25 13:00 ` [PATCH 7/8] drm/amdgpu: move vram inline functions into a header Arunpravin
2021-10-25 13:00   ` [Intel-gfx] " Arunpravin
2021-10-25 13:00 ` [PATCH 8/8] drm/amdgpu: add drm buddy support to amdgpu Arunpravin
2021-10-25 13:00   ` [Intel-gfx] " Arunpravin
2021-11-03 19:25   ` Matthew Auld [this message]
2021-11-03 19:25     ` Matthew Auld
2021-11-03 19:25     ` [Intel-gfx] " Matthew Auld
2021-11-04  7:34     ` Christian König
2021-11-04  7:34       ` Christian König
2021-11-04  7:34       ` [Intel-gfx] " Christian König
2021-11-04  8:49       ` Matthew Auld
2021-11-04  8:49         ` Matthew Auld
2021-11-04  8:49         ` [Intel-gfx] " Matthew Auld
2021-11-04  8:54         ` Christian König
2021-11-04  8:54           ` Christian König
2021-11-04  8:54           ` [Intel-gfx] " Christian König
2021-11-08 22:08           ` Arunpravin
2021-11-08 22:08             ` [Intel-gfx] " Arunpravin
2021-11-08 22:08             ` Arunpravin
2021-10-25 13:00 ` [PATCH v2 1/8] drm: move the buddy allocator from i915 into common drm Arunpravin
2021-10-25 13:00   ` [Intel-gfx] " Arunpravin
2021-10-25 13:00 ` [PATCH v2 2/8] drm: improve drm_buddy_alloc function Arunpravin
2021-10-25 13:00   ` [Intel-gfx] " Arunpravin
2021-11-03 18:41   ` Matthew Auld
2021-11-03 18:41     ` Matthew Auld
2021-11-03 18:41     ` [Intel-gfx] " Matthew Auld
2021-11-08 19:50     ` Arunpravin
2021-11-08 19:50       ` [Intel-gfx] " Arunpravin
2021-11-08 19:50       ` Arunpravin
2021-11-15 21:52       ` Arunpravin
2021-11-15 21:52         ` [Intel-gfx] " Arunpravin
2021-10-25 13:56 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [v2,1/8] drm: move the buddy allocator from i915 into common drm Patchwork
2021-11-03 18:44 ` [PATCH 3/8] drm: implement top-down allocation method Matthew Auld
2021-11-03 18:44   ` Matthew Auld
2021-11-03 18:44   ` [Intel-gfx] " Matthew Auld
2021-11-08 21:45   ` Arunpravin
2021-11-08 21:45     ` [Intel-gfx] " Arunpravin
2021-11-08 21:45     ` Arunpravin

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=55adb714-45f9-5af5-33df-ce4f4526a8c8@intel.com \
    --to=matthew.auld@intel.com \
    --cc=Arunpravin.PaneerSelvam@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tzimmermann@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.