Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-22 Thread Iddamsetty, Aravind
On 22-09-2022 19:26, Lucas De Marchi wrote: > On Wed, Sep 21, 2022 at 12:00:38PM +0530, Iddamsetty, Aravind wrote: >> replying here for earlier comments too. >> >> On 21-09-2022 01:35, Lucas De Marchi wrote: >>> On Tue, Sep 20, 2022 at 01:31:49AM -0700, Lucas De Marchi wrote: On Tue, Sep 20

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-22 Thread Lucas De Marchi
On Wed, Sep 21, 2022 at 12:00:38PM +0530, Iddamsetty, Aravind wrote: replying here for earlier comments too. On 21-09-2022 01:35, Lucas De Marchi wrote: On Tue, Sep 20, 2022 at 01:31:49AM -0700, Lucas De Marchi wrote: On Tue, Sep 20, 2022 at 12:49:40PM +0530, Aravind Iddamsetty wrote: As an i

Re: [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Iddamsetty, Aravind
On 20-09-2022 13:05, Jani Nikula wrote: > On Tue, 20 Sep 2022, Aravind Iddamsetty wrote: >> As an integrated GPU, MTL does not have local memory and >> HAS_LMEM() returns false. However the platform's stolen memory >> is presented via BAR2 (i.e., the BAR we traditionally consider >> to be the

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Iddamsetty, Aravind
replying here for earlier comments too. On 21-09-2022 01:35, Lucas De Marchi wrote: > On Tue, Sep 20, 2022 at 01:31:49AM -0700, Lucas De Marchi wrote: >> On Tue, Sep 20, 2022 at 12:49:40PM +0530, Aravind Iddamsetty wrote: >>> As an integrated GPU, MTL does not have local memory and >>> HAS_LMEM()

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Andi Shyti
Hi Matt, Lucas, thanks for your feedback, > > > + switch (gms) { > > > + case 0x0 ... 0x10: > > > + return gms * 32; > > > + case 0x20: > > > + return 1024; > > > + case 0x30: > > > + return 1536; > > > + case 0x40: > > > + return 2048; > > > + case 0xf0 ... 0xfe:

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Matt Roper
On Tue, Sep 20, 2022 at 06:57:46PM +0200, Andi Shyti wrote: > 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) */ > > +

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Lucas De Marchi
On Tue, Sep 20, 2022 at 01:31:49AM -0700, Lucas De Marchi wrote: On Tue, Sep 20, 2022 at 12:49:40PM +0530, Aravind Iddamsetty wrote: As an integrated GPU, MTL does not have local memory and HAS_LMEM() returns false. However the platform's stolen memory is presented via BAR2 (i.e., the BAR we tr

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Lucas De Marchi
On Tue, Sep 20, 2022 at 06:57:46PM +0200, Andi Shyti wrote: 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)

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Andi Shyti
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; > + > + /* r

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Lucas De Marchi
On Tue, Sep 20, 2022 at 12:49:40PM +0530, Aravind Iddamsetty wrote: As an integrated GPU, MTL does not have local memory and HAS_LMEM() returns false. However the platform's stolen memory is presented via BAR2 (i.e., the BAR we traditionally consider to be the LMEM BAR) and should be managed by

Re: [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Jani Nikula
On Tue, 20 Sep 2022, Aravind Iddamsetty wrote: > As an integrated GPU, MTL does not have local memory and > HAS_LMEM() returns false. However the platform's stolen memory > is presented via BAR2 (i.e., the BAR we traditionally consider > to be the LMEM BAR) and should be managed by the driver the

[PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Aravind Iddamsetty
As an integrated GPU, MTL does not have local memory and HAS_LMEM() returns false. However the platform's stolen memory is presented via BAR2 (i.e., the BAR we traditionally consider to be the LMEM BAR) and should be managed by the driver the same way that local memory is on dgpu platforms (which