From: Andi Shyti <andi.shyti@linux.intel.com>
To: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Cc: intel-gfx@lists.freedesktop.org, lucas.demarchi@intel.com,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory
Date: Tue, 20 Sep 2022 18:57:46 +0200 [thread overview]
Message-ID: <YynxCp0OGTJ/hu3J@ashyti-mobl2.lan> (raw)
In-Reply-To: <20220920071940.3775059-1-aravind.iddamsetty@intel.com>
Hi Aravind,
> +static int get_mtl_gms_size(struct intel_uncore *uncore)
> +{
> + u16 ggc, gms;
> +
> + ggc = intel_uncore_read16(uncore, _MMIO(0x108040));
> +
> + /* check GGMS, should be fixed 0x3 (8MB) */
> + if ((ggc & 0xc0) != 0xc0)
> + return -EIO;
> +
> + /* return valid GMS value, -EIO if invalid */
> + gms = ggc >> 8;
> + switch (gms) {
> + case 0x0 ... 0x10:
> + return gms * 32;
> + case 0x20:
> + return 1024;
> + case 0x30:
> + return 1536;
> + case 0x40:
> + return 2048;
> + case 0xf0 ... 0xfe:
just a bit puzzled by the fact that case ranges are not standard
and are supported only by GCC, unless, of course, I miss
something. Do we still want to use them as they are widely used
around the kernel?
Andi
> + return (gms - 0xf0 + 1) * 4;
> + default:
> + return -EIO;
> + }
> +}
next prev parent reply other threads:[~2022-09-20 16:57 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-20 7:19 [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory Aravind Iddamsetty
2022-09-20 7:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/1] " Patchwork
2022-09-20 7:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-09-20 7:35 ` [Intel-gfx] [PATCH 1/1] " Jani Nikula
2022-09-21 6:32 ` Iddamsetty, Aravind
2022-09-20 7:56 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/1] " Patchwork
2022-09-20 8:31 ` [Intel-gfx] [PATCH 1/1] " Lucas De Marchi
2022-09-20 20:05 ` Lucas De Marchi
2022-09-21 6:30 ` Iddamsetty, Aravind
2022-09-22 13:56 ` Lucas De Marchi
2022-09-22 15:56 ` Iddamsetty, Aravind
2022-09-20 11:52 ` [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/1] " Patchwork
2022-09-20 16:57 ` Andi Shyti [this message]
2022-09-20 20:01 ` [Intel-gfx] [PATCH 1/1] " Lucas De Marchi
2022-09-20 20:40 ` Matt Roper
2022-09-20 22:33 ` Andi Shyti
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=YynxCp0OGTJ/hu3J@ashyti-mobl2.lan \
--to=andi.shyti@linux.intel.com \
--cc=aravind.iddamsetty@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@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