From: "Winkler, Tomas" <tomas.winkler@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
"Vignesh Raghavendra" <vigneshr@ti.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Cc: "De Marchi, Lucas" <lucas.demarchi@intel.com>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Usyskin, Alexander" <alexander.usyskin@intel.com>,
"Lubart, Vitaly" <vitaly.lubart@intel.com>
Subject: Re: [Intel-gfx] [RFC PATCH 2/9] drm/i915/spi: intel_spi_region map
Date: Mon, 22 Feb 2021 11:30:56 +0000 [thread overview]
Message-ID: <ef89f4dc32d843df84719b8fcf11d385@intel.com> (raw)
In-Reply-To: <87v9akfltn.fsf@intel.com>
> On Wed, 17 Feb 2021, "Winkler, Tomas" <tomas.winkler@intel.com> wrote:
> >> On Tue, 16 Feb 2021, Tomas Winkler <tomas.winkler@intel.com> wrote:
> >> > Add the dGFX spi region map and convey it via mfd cell platform
> >> > data to the spi child device.
> >> >
> >> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >> > Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> >> > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> >> > ---
> >> > drivers/gpu/drm/i915/spi/intel_spi.c | 9 +++++++++
> >> > drivers/gpu/drm/i915/spi/intel_spi.h | 5 +++++
> >> > 2 files changed, 14 insertions(+)
> >> >
> >> > diff --git a/drivers/gpu/drm/i915/spi/intel_spi.c
> >> > b/drivers/gpu/drm/i915/spi/intel_spi.c
> >> > index 07da7197bd5d..6f83f24f7208 100644
> >> > --- a/drivers/gpu/drm/i915/spi/intel_spi.c
> >> > +++ b/drivers/gpu/drm/i915/spi/intel_spi.c
> >> > @@ -14,11 +14,20 @@ static const struct resource spi_resources[] = {
> >> > DEFINE_RES_MEM_NAMED(GEN12_GUNIT_SPI_BASE, 0x80, "i915-
> >> spi-mmio"),
> >> > };
> >> >
> >> > +static const struct i915_spi_region regions[I915_SPI_REGIONS] = {
> >> > + [0] = { .name = "DESCRIPTOR", },
> >> > + [2] = { .name = "GSC", },
> >> > + [11] = { .name = "OptionROM", },
> >> > + [12] = { .name = "DAM", },
> >> > +};
> >> > +
> >> > static const struct mfd_cell intel_spi_cell = {
> >> > .id = 2,
> >> > .name = "i915-spi",
> >> > .num_resources = ARRAY_SIZE(spi_resources),
> >> > .resources = spi_resources,
> >> > + .platform_data = (void *)regions,
> >> > + .pdata_size = sizeof(regions),
> >> > };
> >> >
> >> > void intel_spi_init(struct intel_spi *spi, struct drm_i915_private
> >> > *dev_priv) diff --git a/drivers/gpu/drm/i915/spi/intel_spi.h
> >> > b/drivers/gpu/drm/i915/spi/intel_spi.h
> >> > index 276551fed993..6b5bf053f7d3 100644
> >> > --- a/drivers/gpu/drm/i915/spi/intel_spi.h
> >> > +++ b/drivers/gpu/drm/i915/spi/intel_spi.h
> >> > @@ -8,6 +8,11 @@
> >> >
> >> > struct drm_i915_private;
> >> >
> >> > +#define I915_SPI_REGIONS 13
> >> > +struct i915_spi_region {
> >> > + const char *name;
> >> > +};
> >>
> >> Does this need to be exposed to the rest of i915?
> > This part is between the device which is part of i915 and the driver.
> >>If we're trying to isolate
> >> spi/, I'd prefer it if this header was the only header included from
> >>the rest of i915, and contained the minimum required information.
> >
> >> As the driver has grown bigger, we've tried to minimize the
> >> interconnections between the modules, and it's slow going. Let's try
> >> to keep the new parts isolated.
> >>
> > So do you prefer we create another header or duplicate the structure
> definition?
>
> I didn't see the struct being used in i915, or am I missing something?
This file is part of i915
> Have a header that contains the interface exposed to the rest of i915, and
> another header with stuff internal to spi/?
The spi `device` is part of i915 (as a mfd cell) and struct i915_spi_region is passed to the spi `driver` as platform_data of the device.
In order for driver to be able to understand it needs to know ' struct i915_spi_region'
Thanks
Tomas
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2021-02-22 11:31 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-16 18:19 [Intel-gfx] [RFC PATCH 0/9] drm/i915/spi: discrete graphics internal spi Tomas Winkler
2021-02-16 18:19 ` [Intel-gfx] [RFC PATCH 1/9] drm/i915/spi: add spi device for discrete graphics Tomas Winkler
2021-02-17 10:42 ` Jani Nikula
2021-02-17 17:14 ` Lucas De Marchi
2021-02-17 19:02 ` Winkler, Tomas
2021-02-16 18:19 ` [Intel-gfx] [RFC PATCH 2/9] drm/i915/spi: intel_spi_region map Tomas Winkler
2021-02-17 10:46 ` Jani Nikula
2021-02-17 20:45 ` Winkler, Tomas
2021-02-22 10:17 ` Jani Nikula
2021-02-22 11:30 ` Winkler, Tomas [this message]
2021-02-16 18:19 ` [Intel-gfx] [RFC PATCH 3/9] drm/i915/spi: add driver for on-die spi device Tomas Winkler
2021-02-17 10:56 ` Jani Nikula
2021-02-17 20:58 ` Winkler, Tomas
2021-02-18 9:49 ` Lucas De Marchi
2021-02-18 10:50 ` Winkler, Tomas
2021-02-19 6:06 ` Winkler, Tomas
2021-02-19 22:59 ` Lucas De Marchi
2021-02-20 17:56 ` Winkler, Tomas
2021-02-16 18:19 ` [Intel-gfx] [RFC PATCH 4/9] drm/i915/spi: implement region enumeration Tomas Winkler
2021-02-16 18:19 ` [Intel-gfx] [RFC PATCH 5/9] drm/i915/spi: implement spi access functions Tomas Winkler
2021-02-16 18:19 ` [Intel-gfx] [RFC PATCH 6/9] drm/i915/spi: spi register with mtd Tomas Winkler
2021-02-16 18:19 ` [Intel-gfx] [RFC PATCH 7/9] drm/i915/spi: mtd: implement access handlers Tomas Winkler
2021-02-16 18:19 ` [Intel-gfx] [RFC PATCH 8/9] drm/i915/spi: serialize spi access Tomas Winkler
2021-02-16 18:19 ` [Intel-gfx] [RFC PATCH 9/9] mtd: use refcount to prevent corruption Tomas Winkler
2021-02-16 18:45 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/spi: discrete graphics internal spi Patchwork
2021-02-16 18:47 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-02-16 19:14 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-02-16 20:35 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-02-16 23:01 ` [Intel-gfx] [RFC PATCH 0/9] " Richard Weinberger
2021-02-17 8:34 ` Winkler, Tomas
2021-02-21 7:10 ` Winkler, Tomas
2021-02-22 22:38 ` Richard Weinberger
2021-02-23 6:31 ` Winkler, Tomas
2021-02-28 6:52 ` Winkler, Tomas
2021-02-17 10:36 ` Jani Nikula
2021-02-17 12:50 ` Winkler, Tomas
2021-02-17 13:35 ` Jani Nikula
2021-02-17 18:33 ` Rodrigo Vivi
2021-02-17 11:02 ` Jani Nikula
2021-02-17 13:56 ` Winkler, Tomas
2021-03-01 12:33 ` Jani Nikula
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=ef89f4dc32d843df84719b8fcf11d385@intel.com \
--to=tomas.winkler@intel.com \
--cc=alexander.usyskin@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-mtd@lists.infradead.org \
--cc=lucas.demarchi@intel.com \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=rodrigo.vivi@intel.com \
--cc=vigneshr@ti.com \
--cc=vitaly.lubart@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