Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Adrian Larumbe <adrian.larumbe@collabora.com>,
	daniel@ffwll.ch, thomas.hellstrom@linux.intel.com,
	intel-gfx@lists.freedesktop.org
Cc: adrian.larumbe@collabora.com
Subject: Re: [Intel-gfx] [PATCH 6/7] drm/i915: Add module param for enabling TTM in sysmem region
Date: Wed, 03 Aug 2022 17:22:48 +0300	[thread overview]
Message-ID: <87wnbppft3.fsf@intel.com> (raw)
In-Reply-To: <20220802165155.165576-7-adrian.larumbe@collabora.com>

On Tue, 02 Aug 2022, Adrian Larumbe <adrian.larumbe@collabora.com> wrote:
> Introduces a new module parameter, 'use_pool_alloc', which defaults to
> 'false'. Its goal is to make the driver fall back on TTM for setting up
> the system memory region, so that object allocation will be done through
> the TTM subsystem rather than shmem objects.
>
> This commit only brings in the new kernel module param, which will be
> used by successive commits.
>
> Signed-off-by: Adrian Larumbe <adrian.larumbe@collabora.com>
> ---
>  drivers/gpu/drm/i915/i915_params.c | 6 ++++++
>  drivers/gpu/drm/i915/i915_params.h | 3 ++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index 6fc475a5db61..1af11f030ab1 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -207,6 +207,12 @@ i915_param_named_unsafe(lmem_size, uint, 0400,
>  i915_param_named_unsafe(lmem_bar_size, uint, 0400,
>  			"Set the lmem bar size(in MiB).");
>  
> +i915_param_named_unsafe(use_pool_alloc, bool, 0600,

Do you expect to be able to change this runtime? Or the device specific
debugfs parameter knob?

> +	"Force the driver to use TTM's pool allocator API for smem objects. "
> +	"This will cause TTM to take over BO allocation even in integrated platforms. "
> +	"(default: false)");
> +
> +

Superfluous newline.

>  static __always_inline void _print_param(struct drm_printer *p,
>  					 const char *name,
>  					 const char *type,
> diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> index 2733cb6cfe09..992ee2a4947d 100644
> --- a/drivers/gpu/drm/i915/i915_params.h
> +++ b/drivers/gpu/drm/i915/i915_params.h
> @@ -84,7 +84,8 @@ struct drm_printer;
>  	param(bool, verbose_state_checks, true, 0) \
>  	param(bool, nuclear_pageflip, false, 0400) \
>  	param(bool, enable_dp_mst, true, 0600) \
> -	param(bool, enable_gvt, false, IS_ENABLED(CONFIG_DRM_I915_GVT) ? 0400 : 0)
> +	param(bool, enable_gvt, false, IS_ENABLED(CONFIG_DRM_I915_GVT) ? 0400 : 0) \
> +	param(bool, use_pool_alloc, false, 0600)
>  
>  #define MEMBER(T, member, ...) T member;
>  struct i915_params {

-- 
Jani Nikula, Intel Open Source Graphics Center

  reply	other threads:[~2022-08-03 14:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 16:51 [Intel-gfx] [PATCH 0/6] Enable TTM for integrated GFX objects in sysmem Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 1/7] drm/i915/ttm: dont trample cache_level overrides during ttm move Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 2/7] drm/i915: limit ttm to dma32 for i965G[M] Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 3/7] drm/i915/ttm: only trust snooping for dgfx when deciding default cache_level Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 4/7] drm/i915/ttm: don't overwrite cache_dirty after setting coherency Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 5/7] drm/i915: Pick the right memory allocation flags for older devices Adrian Larumbe
2022-08-02 16:51 ` [Intel-gfx] [PATCH 6/7] drm/i915: Add module param for enabling TTM in sysmem region Adrian Larumbe
2022-08-03 14:22   ` Jani Nikula [this message]
2022-08-09 15:50     ` Adrian Larumbe
2022-08-09 16:50       ` Jani Nikula
2022-08-02 16:51 ` [Intel-gfx] [PATCH 7/7] drm/i915: Optionally manage system memory with TTM and poolalloc Adrian Larumbe
2022-08-02 17:27 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enable TTM for integrated GFX objects in sysmem Patchwork
2022-08-02 17:27 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-08-02 17:49 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

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=87wnbppft3.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=adrian.larumbe@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.hellstrom@linux.intel.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