Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Matthew Auld <matthew.auld@intel.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Make sure dsm_size has correct granularity
Date: Wed, 25 Jan 2023 08:47:03 +0100	[thread overview]
Message-ID: <88213ded-8835-1230-d2de-ecc89247e536@intel.com> (raw)
In-Reply-To: <20230124150047.9490-1-nirmoy.das@intel.com>

On 24.01.2023 16:00, Nirmoy Das wrote:
> DSM granularity is 1MB so make sure we stick to that.
> 
> Cc: Matthew Auld <matthew.auld@intel.com>
> Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
>   drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> index 90a967374b1a..0c027263f09e 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
> @@ -909,7 +909,7 @@ i915_gem_stolen_lmem_setup(struct drm_i915_private *i915, u16 type,
>   		dsm_base = intel_uncore_read64(uncore, GEN12_DSMBASE) & GEN12_BDSM_MASK;
>   		if (WARN_ON(lmem_size < dsm_base))
>   			return ERR_PTR(-ENODEV);
> -		dsm_size = lmem_size - dsm_base;
> +		dsm_size = ALIGN_DOWN(lmem_size - dsm_base, 1 * SZ_1M);

1st seen "1 * SZ_1M", usually it is just SZ_1M, up to you.

Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>

Regards
Andrzej

>   	}
>   
>   	io_size = dsm_size;


  parent reply	other threads:[~2023-01-25  7:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 15:00 [Intel-gfx] [PATCH] drm/i915: Make sure dsm_size has correct granularity Nirmoy Das
2023-01-24 23:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-01-25  3:33 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-01-25  7:47 ` Andrzej Hajda [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-02 18:02 [Intel-gfx] [PATCH] " Nirmoy Das
2023-02-03 18:56 ` Lucas De Marchi
2023-02-03 19:00   ` Das, Nirmoy

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=88213ded-8835-1230-d2de-ecc89247e536@intel.com \
    --to=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.auld@intel.com \
    --cc=nirmoy.das@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