* [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory
[not found] <20180503002352.11951-1-paulo.r.zanoni@intel.com>
@ 2018-05-04 20:32 ` Paulo Zanoni
2018-05-07 8:46 ` Joonas Lahtinen
0 siblings, 1 reply; 8+ messages in thread
From: Paulo Zanoni @ 2018-05-04 20:32 UTC (permalink / raw)
To: intel-gfx
Cc: Paulo Zanoni, stable, Ingo Molnar, H . Peter Anvin, x86,
Daniele Ceraolo Spurio, Joonas Lahtinen
ICL changes the registers and addresses to 64 bits.
I also briefly looked at implementing an u64 version of the PCI config
read functions, but I concluded this wouldn't be trivial, so it's not
worth doing it for a single user that can't have any racing problems
while reading the register in two separate operations.
v2:
- Scrub the development (non-public) changelog (Joonas).
- Remove the i915.ko bits so this can be easily backported in order
to properly avoid stolen memory even on machines without i915.ko
(Joonas).
- CC stable for the reasons above.
Issue: VIZ-9250
CC: stable@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
arch/x86/kernel/early-quirks.c | 18 ++++++++++++++++++
include/drm/i915_drm.h | 4 +++-
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index bae0d32e327b..72c2cf961d44 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -340,6 +340,18 @@ static resource_size_t __init gen3_stolen_base(int num, int slot, int func,
return bsm & INTEL_BSM_MASK;
}
+static resource_size_t __init gen11_stolen_base(int num, int slot, int func,
+ resource_size_t stolen_size)
+{
+ u64 bsm;
+
+ bsm = read_pci_config(num, slot, func, INTEL_GEN11_BSM_DW0);
+ bsm &= INTEL_BSM_MASK;
+ bsm |= (u64)read_pci_config(num, slot, func, INTEL_GEN11_BSM_DW1) << 32;
+
+ return bsm;
+}
+
static resource_size_t __init i830_stolen_size(int num, int slot, int func)
{
u16 gmch_ctrl;
@@ -500,6 +512,11 @@ static const struct intel_early_ops chv_early_ops __initconst = {
.stolen_size = chv_stolen_size,
};
+static const struct intel_early_ops gen11_early_ops __initconst = {
+ .stolen_base = gen11_stolen_base,
+ .stolen_size = gen9_stolen_size,
+};
+
static const struct pci_device_id intel_early_ids[] __initconst = {
INTEL_I830_IDS(&i830_early_ops),
INTEL_I845G_IDS(&i845_early_ops),
@@ -531,6 +548,7 @@ static const struct pci_device_id intel_early_ids[] __initconst = {
INTEL_CFL_IDS(&gen9_early_ops),
INTEL_GLK_IDS(&gen9_early_ops),
INTEL_CNL_IDS(&gen9_early_ops),
+ INTEL_ICL_11_IDS(&gen11_early_ops),
};
struct resource intel_graphics_stolen_res __ro_after_init = DEFINE_RES_MEM(0, 0);
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index c9e5a6621b95..c44703f471b3 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -95,7 +95,9 @@ extern struct resource intel_graphics_stolen_res;
#define I845_TSEG_SIZE_512K (2 << 1)
#define I845_TSEG_SIZE_1M (3 << 1)
-#define INTEL_BSM 0x5c
+#define INTEL_BSM 0x5c
+#define INTEL_GEN11_BSM_DW0 0xc0
+#define INTEL_GEN11_BSM_DW1 0xc4
#define INTEL_BSM_MASK (-(1u << 20))
#endif /* _I915_DRM_H_ */
--
2.14.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory
2018-05-04 20:32 ` [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory Paulo Zanoni
@ 2018-05-07 8:46 ` Joonas Lahtinen
2018-06-01 21:44 ` Paulo Zanoni
0 siblings, 1 reply; 8+ messages in thread
From: Joonas Lahtinen @ 2018-05-07 8:46 UTC (permalink / raw)
To: Paulo Zanoni, intel-gfx
Cc: Paulo Zanoni, stable, Ingo Molnar, H . Peter Anvin, x86,
Daniele Ceraolo Spurio
Ingo, do you prefer to merge through our tree with your ack?
Quoting Paulo Zanoni (2018-05-04 23:32:51)
> ICL changes the registers and addresses to 64 bits.
>
> I also briefly looked at implementing an u64 version of the PCI config
> read functions, but I concluded this wouldn't be trivial, so it's not
> worth doing it for a single user that can't have any racing problems
> while reading the register in two separate operations.
>
> v2:
> - Scrub the development (non-public) changelog (Joonas).
> - Remove the i915.ko bits so this can be easily backported in order
> to properly avoid stolen memory even on machines without i915.ko
> (Joonas).
> - CC stable for the reasons above.
>
> Issue: VIZ-9250
Fixes: 412310019a20 ("drm/i915/icl: Add initial Icelake definitions.")
> CC: stable@vger.kernel.org
This should not be needed, it was introduced in v4.17-rc1 only.
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: x86@kernel.org
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> ---
> arch/x86/kernel/early-quirks.c | 18 ++++++++++++++++++
> include/drm/i915_drm.h | 4 +++-
> 2 files changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index bae0d32e327b..72c2cf961d44 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -340,6 +340,18 @@ static resource_size_t __init gen3_stolen_base(int num, int slot, int func,
> return bsm & INTEL_BSM_MASK;
> }
>
> +static resource_size_t __init gen11_stolen_base(int num, int slot, int func,
> + resource_size_t stolen_size)
> +{
> + u64 bsm;
> +
> + bsm = read_pci_config(num, slot, func, INTEL_GEN11_BSM_DW0);
> + bsm &= INTEL_BSM_MASK;
> + bsm |= (u64)read_pci_config(num, slot, func, INTEL_GEN11_BSM_DW1) << 32;
> +
> + return bsm;
> +}
> +
> static resource_size_t __init i830_stolen_size(int num, int slot, int func)
> {
> u16 gmch_ctrl;
> @@ -500,6 +512,11 @@ static const struct intel_early_ops chv_early_ops __initconst = {
> .stolen_size = chv_stolen_size,
> };
>
> +static const struct intel_early_ops gen11_early_ops __initconst = {
> + .stolen_base = gen11_stolen_base,
> + .stolen_size = gen9_stolen_size,
> +};
> +
> static const struct pci_device_id intel_early_ids[] __initconst = {
> INTEL_I830_IDS(&i830_early_ops),
> INTEL_I845G_IDS(&i845_early_ops),
> @@ -531,6 +548,7 @@ static const struct pci_device_id intel_early_ids[] __initconst = {
> INTEL_CFL_IDS(&gen9_early_ops),
> INTEL_GLK_IDS(&gen9_early_ops),
> INTEL_CNL_IDS(&gen9_early_ops),
> + INTEL_ICL_11_IDS(&gen11_early_ops),
> };
>
> struct resource intel_graphics_stolen_res __ro_after_init = DEFINE_RES_MEM(0, 0);
> diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> index c9e5a6621b95..c44703f471b3 100644
> --- a/include/drm/i915_drm.h
> +++ b/include/drm/i915_drm.h
> @@ -95,7 +95,9 @@ extern struct resource intel_graphics_stolen_res;
> #define I845_TSEG_SIZE_512K (2 << 1)
> #define I845_TSEG_SIZE_1M (3 << 1)
>
> -#define INTEL_BSM 0x5c
> +#define INTEL_BSM 0x5c
> +#define INTEL_GEN11_BSM_DW0 0xc0
> +#define INTEL_GEN11_BSM_DW1 0xc4
> #define INTEL_BSM_MASK (-(1u << 20))
>
> #endif /* _I915_DRM_H_ */
> --
> 2.14.3
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory
2018-05-07 8:46 ` Joonas Lahtinen
@ 2018-06-01 21:44 ` Paulo Zanoni
2018-06-18 17:47 ` [Intel-gfx] " Rodrigo Vivi
0 siblings, 1 reply; 8+ messages in thread
From: Paulo Zanoni @ 2018-06-01 21:44 UTC (permalink / raw)
To: Joonas Lahtinen, intel-gfx
Cc: stable, Ingo Molnar, H . Peter Anvin, x86, Daniele Ceraolo Spurio
Em Seg, 2018-05-07 às 11:46 +0300, Joonas Lahtinen escreveu:
> Ingo, do you prefer to merge through our tree with your ack?
Ping?
>
> Quoting Paulo Zanoni (2018-05-04 23:32:51)
> > ICL changes the registers and addresses to 64 bits.
> >
> > I also briefly looked at implementing an u64 version of the PCI
> > config
> > read functions, but I concluded this wouldn't be trivial, so it's
> > not
> > worth doing it for a single user that can't have any racing
> > problems
> > while reading the register in two separate operations.
> >
> > v2:
> > - Scrub the development (non-public) changelog (Joonas).
> > - Remove the i915.ko bits so this can be easily backported in
> > order
> > to properly avoid stolen memory even on machines without i915.ko
> > (Joonas).
> > - CC stable for the reasons above.
> >
> > Issue: VIZ-9250
>
> Fixes: 412310019a20 ("drm/i915/icl: Add initial Icelake
> definitions.")
>
> > CC: stable@vger.kernel.org
>
> This should not be needed, it was introduced in v4.17-rc1 only.
>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>
> Regards, Joonas
>
> > Cc: Ingo Molnar <mingo@kernel.org>
> > Cc: H. Peter Anvin <hpa@zytor.com>
> > Cc: x86@kernel.org
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > ---
> > arch/x86/kernel/early-quirks.c | 18 ++++++++++++++++++
> > include/drm/i915_drm.h | 4 +++-
> > 2 files changed, 21 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/kernel/early-quirks.c
> > b/arch/x86/kernel/early-quirks.c
> > index bae0d32e327b..72c2cf961d44 100644
> > --- a/arch/x86/kernel/early-quirks.c
> > +++ b/arch/x86/kernel/early-quirks.c
> > @@ -340,6 +340,18 @@ static resource_size_t __init
> > gen3_stolen_base(int num, int slot, int func,
> > return bsm & INTEL_BSM_MASK;
> > }
> >
> > +static resource_size_t __init gen11_stolen_base(int num, int slot,
> > int func,
> > + resource_size_t
> > stolen_size)
> > +{
> > + u64 bsm;
> > +
> > + bsm = read_pci_config(num, slot, func,
> > INTEL_GEN11_BSM_DW0);
> > + bsm &= INTEL_BSM_MASK;
> > + bsm |= (u64)read_pci_config(num, slot, func,
> > INTEL_GEN11_BSM_DW1) << 32;
> > +
> > + return bsm;
> > +}
> > +
> > static resource_size_t __init i830_stolen_size(int num, int slot,
> > int func)
> > {
> > u16 gmch_ctrl;
> > @@ -500,6 +512,11 @@ static const struct intel_early_ops
> > chv_early_ops __initconst = {
> > .stolen_size = chv_stolen_size,
> > };
> >
> > +static const struct intel_early_ops gen11_early_ops __initconst =
> > {
> > + .stolen_base = gen11_stolen_base,
> > + .stolen_size = gen9_stolen_size,
> > +};
> > +
> > static const struct pci_device_id intel_early_ids[] __initconst =
> > {
> > INTEL_I830_IDS(&i830_early_ops),
> > INTEL_I845G_IDS(&i845_early_ops),
> > @@ -531,6 +548,7 @@ static const struct pci_device_id
> > intel_early_ids[] __initconst = {
> > INTEL_CFL_IDS(&gen9_early_ops),
> > INTEL_GLK_IDS(&gen9_early_ops),
> > INTEL_CNL_IDS(&gen9_early_ops),
> > + INTEL_ICL_11_IDS(&gen11_early_ops),
> > };
> >
> > struct resource intel_graphics_stolen_res __ro_after_init =
> > DEFINE_RES_MEM(0, 0);
> > diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> > index c9e5a6621b95..c44703f471b3 100644
> > --- a/include/drm/i915_drm.h
> > +++ b/include/drm/i915_drm.h
> > @@ -95,7 +95,9 @@ extern struct resource intel_graphics_stolen_res;
> > #define I845_TSEG_SIZE_512K (2 << 1)
> > #define I845_TSEG_SIZE_1M (3 << 1)
> >
> > -#define INTEL_BSM 0x5c
> > +#define INTEL_BSM 0x5c
> > +#define INTEL_GEN11_BSM_DW0 0xc0
> > +#define INTEL_GEN11_BSM_DW1 0xc4
> > #define INTEL_BSM_MASK (-(1u << 20))
> >
> > #endif /* _I915_DRM_H_ */
> > --
> > 2.14.3
> >
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory
2018-06-01 21:44 ` Paulo Zanoni
@ 2018-06-18 17:47 ` Rodrigo Vivi
2018-07-03 19:11 ` Rodrigo Vivi
0 siblings, 1 reply; 8+ messages in thread
From: Rodrigo Vivi @ 2018-06-18 17:47 UTC (permalink / raw)
To: Paulo Zanoni, Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: Joonas Lahtinen, intel-gfx, x86, Ingo Molnar, stable,
H . Peter Anvin
On Fri, Jun 01, 2018 at 02:44:51PM -0700, Paulo Zanoni wrote:
> Em Seg, 2018-05-07 �s 11:46 +0300, Joonas Lahtinen escreveu:
> > Ingo, do you prefer to merge through our tree with your ack?
>
> Ping?
>
> >
> > Quoting Paulo Zanoni (2018-05-04 23:32:51)
> > > ICL changes the registers and addresses to 64 bits.
> > >
> > > I also briefly looked at implementing an u64 version of the PCI
> > > config
> > > read functions, but I concluded this wouldn't be trivial, so it's
> > > not
> > > worth doing it for a single user that can't have any racing
> > > problems
> > > while reading the register in two separate operations.
> > >
> > > v2:
> > > - Scrub the development (non-public) changelog (Joonas).
> > > - Remove the i915.ko bits so this can be easily backported in
> > > order
> > > to properly avoid stolen memory even on machines without i915.ko
> > > (Joonas).
> > > - CC stable for the reasons above.
> > >
> > > Issue: VIZ-9250
> >
> > Fixes: 412310019a20 ("drm/i915/icl: Add initial Icelake
> > definitions.")
> >
> > > CC: stable@vger.kernel.org
> >
> > This should not be needed, it was introduced in v4.17-rc1 only.
> >
> > Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> >
> > Regards, Joonas
> >
Cc: Thomas Gleixner <tglx@linutronix.de>
> > > Cc: Ingo Molnar <mingo@kernel.org>
> > > Cc: H. Peter Anvin <hpa@zytor.com>
> > > Cc: x86@kernel.org
guys, could we push this through drm-intel? ack?
nack? comments?
> > > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > ---
> > > arch/x86/kernel/early-quirks.c | 18 ++++++++++++++++++
> > > include/drm/i915_drm.h | 4 +++-
> > > 2 files changed, 21 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/arch/x86/kernel/early-quirks.c
> > > b/arch/x86/kernel/early-quirks.c
> > > index bae0d32e327b..72c2cf961d44 100644
> > > --- a/arch/x86/kernel/early-quirks.c
> > > +++ b/arch/x86/kernel/early-quirks.c
> > > @@ -340,6 +340,18 @@ static resource_size_t __init
> > > gen3_stolen_base(int num, int slot, int func,
> > > return bsm & INTEL_BSM_MASK;
> > > }
> > >
> > > +static resource_size_t __init gen11_stolen_base(int num, int slot,
> > > int func,
> > > + resource_size_t
> > > stolen_size)
> > > +{
> > > + u64 bsm;
> > > +
> > > + bsm = read_pci_config(num, slot, func,
> > > INTEL_GEN11_BSM_DW0);
> > > + bsm &= INTEL_BSM_MASK;
> > > + bsm |= (u64)read_pci_config(num, slot, func,
> > > INTEL_GEN11_BSM_DW1) << 32;
> > > +
> > > + return bsm;
> > > +}
> > > +
> > > static resource_size_t __init i830_stolen_size(int num, int slot,
> > > int func)
> > > {
> > > u16 gmch_ctrl;
> > > @@ -500,6 +512,11 @@ static const struct intel_early_ops
> > > chv_early_ops __initconst = {
> > > .stolen_size = chv_stolen_size,
> > > };
> > >
> > > +static const struct intel_early_ops gen11_early_ops __initconst =
> > > {
> > > + .stolen_base = gen11_stolen_base,
> > > + .stolen_size = gen9_stolen_size,
> > > +};
> > > +
> > > static const struct pci_device_id intel_early_ids[] __initconst =
> > > {
> > > INTEL_I830_IDS(&i830_early_ops),
> > > INTEL_I845G_IDS(&i845_early_ops),
> > > @@ -531,6 +548,7 @@ static const struct pci_device_id
> > > intel_early_ids[] __initconst = {
> > > INTEL_CFL_IDS(&gen9_early_ops),
> > > INTEL_GLK_IDS(&gen9_early_ops),
> > > INTEL_CNL_IDS(&gen9_early_ops),
> > > + INTEL_ICL_11_IDS(&gen11_early_ops),
> > > };
> > >
> > > struct resource intel_graphics_stolen_res __ro_after_init =
> > > DEFINE_RES_MEM(0, 0);
> > > diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> > > index c9e5a6621b95..c44703f471b3 100644
> > > --- a/include/drm/i915_drm.h
> > > +++ b/include/drm/i915_drm.h
> > > @@ -95,7 +95,9 @@ extern struct resource intel_graphics_stolen_res;
> > > #define I845_TSEG_SIZE_512K (2 << 1)
> > > #define I845_TSEG_SIZE_1M (3 << 1)
> > >
> > > -#define INTEL_BSM 0x5c
> > > +#define INTEL_BSM 0x5c
> > > +#define INTEL_GEN11_BSM_DW0 0xc0
> > > +#define INTEL_GEN11_BSM_DW1 0xc4
> > > #define INTEL_BSM_MASK (-(1u << 20))
> > >
> > > #endif /* _I915_DRM_H_ */
> > > --
> > > 2.14.3
> > >
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory
2018-06-18 17:47 ` [Intel-gfx] " Rodrigo Vivi
@ 2018-07-03 19:11 ` Rodrigo Vivi
2018-07-04 5:50 ` Ingo Molnar
0 siblings, 1 reply; 8+ messages in thread
From: Rodrigo Vivi @ 2018-07-03 19:11 UTC (permalink / raw)
To: Paulo Zanoni, Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: Joonas Lahtinen, intel-gfx, x86, Ingo Molnar, stable
On Mon, Jun 18, 2018 at 10:47:21AM -0700, Rodrigo Vivi wrote:
> On Fri, Jun 01, 2018 at 02:44:51PM -0700, Paulo Zanoni wrote:
> > Em Seg, 2018-05-07 �s 11:46 +0300, Joonas Lahtinen escreveu:
> > > Ingo, do you prefer to merge through our tree with your ack?
> >
> > Ping?
> >
> > >
> > > Quoting Paulo Zanoni (2018-05-04 23:32:51)
> > > > ICL changes the registers and addresses to 64 bits.
> > > >
> > > > I also briefly looked at implementing an u64 version of the PCI
> > > > config
> > > > read functions, but I concluded this wouldn't be trivial, so it's
> > > > not
> > > > worth doing it for a single user that can't have any racing
> > > > problems
> > > > while reading the register in two separate operations.
> > > >
> > > > v2:
> > > > - Scrub the development (non-public) changelog (Joonas).
> > > > - Remove the i915.ko bits so this can be easily backported in
> > > > order
> > > > to properly avoid stolen memory even on machines without i915.ko
> > > > (Joonas).
> > > > - CC stable for the reasons above.
> > > >
> > > > Issue: VIZ-9250
> > >
> > > Fixes: 412310019a20 ("drm/i915/icl: Add initial Icelake
> > > definitions.")
> > >
> > > > CC: stable@vger.kernel.org
> > >
> > > This should not be needed, it was introduced in v4.17-rc1 only.
> > >
> > > Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > >
> > > Regards, Joonas
> > >
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> > > > Cc: Ingo Molnar <mingo@kernel.org>
> > > > Cc: H. Peter Anvin <hpa@zytor.com>
> > > > Cc: x86@kernel.org
>
> guys, could we push this through drm-intel? ack?
> nack? comments?
Is there any concern with this patch?
any ack for push this through drm-intel?
or any nack with explanations please?
I'd like to push this for 4.19 because this is
one of the patches that blocks us on using drm-tip
on ICL.
Thanks in advance,
Rodrigo.
>
> > > > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > > > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > > ---
> > > > arch/x86/kernel/early-quirks.c | 18 ++++++++++++++++++
> > > > include/drm/i915_drm.h | 4 +++-
> > > > 2 files changed, 21 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/x86/kernel/early-quirks.c
> > > > b/arch/x86/kernel/early-quirks.c
> > > > index bae0d32e327b..72c2cf961d44 100644
> > > > --- a/arch/x86/kernel/early-quirks.c
> > > > +++ b/arch/x86/kernel/early-quirks.c
> > > > @@ -340,6 +340,18 @@ static resource_size_t __init
> > > > gen3_stolen_base(int num, int slot, int func,
> > > > return bsm & INTEL_BSM_MASK;
> > > > }
> > > >
> > > > +static resource_size_t __init gen11_stolen_base(int num, int slot,
> > > > int func,
> > > > + resource_size_t
> > > > stolen_size)
> > > > +{
> > > > + u64 bsm;
> > > > +
> > > > + bsm = read_pci_config(num, slot, func,
> > > > INTEL_GEN11_BSM_DW0);
> > > > + bsm &= INTEL_BSM_MASK;
> > > > + bsm |= (u64)read_pci_config(num, slot, func,
> > > > INTEL_GEN11_BSM_DW1) << 32;
> > > > +
> > > > + return bsm;
> > > > +}
> > > > +
> > > > static resource_size_t __init i830_stolen_size(int num, int slot,
> > > > int func)
> > > > {
> > > > u16 gmch_ctrl;
> > > > @@ -500,6 +512,11 @@ static const struct intel_early_ops
> > > > chv_early_ops __initconst = {
> > > > .stolen_size = chv_stolen_size,
> > > > };
> > > >
> > > > +static const struct intel_early_ops gen11_early_ops __initconst =
> > > > {
> > > > + .stolen_base = gen11_stolen_base,
> > > > + .stolen_size = gen9_stolen_size,
> > > > +};
> > > > +
> > > > static const struct pci_device_id intel_early_ids[] __initconst =
> > > > {
> > > > INTEL_I830_IDS(&i830_early_ops),
> > > > INTEL_I845G_IDS(&i845_early_ops),
> > > > @@ -531,6 +548,7 @@ static const struct pci_device_id
> > > > intel_early_ids[] __initconst = {
> > > > INTEL_CFL_IDS(&gen9_early_ops),
> > > > INTEL_GLK_IDS(&gen9_early_ops),
> > > > INTEL_CNL_IDS(&gen9_early_ops),
> > > > + INTEL_ICL_11_IDS(&gen11_early_ops),
> > > > };
> > > >
> > > > struct resource intel_graphics_stolen_res __ro_after_init =
> > > > DEFINE_RES_MEM(0, 0);
> > > > diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> > > > index c9e5a6621b95..c44703f471b3 100644
> > > > --- a/include/drm/i915_drm.h
> > > > +++ b/include/drm/i915_drm.h
> > > > @@ -95,7 +95,9 @@ extern struct resource intel_graphics_stolen_res;
> > > > #define I845_TSEG_SIZE_512K (2 << 1)
> > > > #define I845_TSEG_SIZE_1M (3 << 1)
> > > >
> > > > -#define INTEL_BSM 0x5c
> > > > +#define INTEL_BSM 0x5c
> > > > +#define INTEL_GEN11_BSM_DW0 0xc0
> > > > +#define INTEL_GEN11_BSM_DW1 0xc4
> > > > #define INTEL_BSM_MASK (-(1u << 20))
> > > >
> > > > #endif /* _I915_DRM_H_ */
> > > > --
> > > > 2.14.3
> > > >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory
2018-07-03 19:11 ` Rodrigo Vivi
@ 2018-07-04 5:50 ` Ingo Molnar
2018-07-05 14:52 ` Rodrigo Vivi
2018-07-10 23:40 ` Rodrigo Vivi
0 siblings, 2 replies; 8+ messages in thread
From: Ingo Molnar @ 2018-07-04 5:50 UTC (permalink / raw)
To: Rodrigo Vivi
Cc: Paulo Zanoni, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
Joonas Lahtinen, intel-gfx, x86, stable
* Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > > > > Cc: Ingo Molnar <mingo@kernel.org>
> > > > > Cc: H. Peter Anvin <hpa@zytor.com>
> > > > > Cc: x86@kernel.org
> >
> > guys, could we push this through drm-intel? ack?
> > nack? comments?
>
> Is there any concern with this patch?
> any ack for push this through drm-intel?
> or any nack with explanations please?
>
> I'd like to push this for 4.19 because this is
> one of the patches that blocks us on using drm-tip
> on ICL.
Sorry - no objections, and I suppose it will be all tested properly before going
upstream:
Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory
2018-07-04 5:50 ` Ingo Molnar
@ 2018-07-05 14:52 ` Rodrigo Vivi
2018-07-10 23:40 ` Rodrigo Vivi
1 sibling, 0 replies; 8+ messages in thread
From: Rodrigo Vivi @ 2018-07-05 14:52 UTC (permalink / raw)
To: Ingo Molnar
Cc: Paulo Zanoni, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
Joonas Lahtinen, intel-gfx, x86, stable
On Wed, Jul 04, 2018 at 07:50:42AM +0200, Ingo Molnar wrote:
>
> * Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
>
> > > Cc: Thomas Gleixner <tglx@linutronix.de>
> > > > > > Cc: Ingo Molnar <mingo@kernel.org>
> > > > > > Cc: H. Peter Anvin <hpa@zytor.com>
> > > > > > Cc: x86@kernel.org
> > >
> > > guys, could we push this through drm-intel? ack?
> > > nack? comments?
> >
> > Is there any concern with this patch?
> > any ack for push this through drm-intel?
> > or any nack with explanations please?
> >
> > I'd like to push this for 4.19 because this is
> > one of the patches that blocks us on using drm-tip
> > on ICL.
>
> Sorry - no objections, and I suppose it will be all tested properly before going
> upstream:
np. yeap, we have that running on ICLs here with internal branch for a while already.
>
> Acked-by: Ingo Molnar <mingo@kernel.org>
Thanks,
Rodrigo.
>
> Thanks,
>
> Ingo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Intel-gfx] [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory
2018-07-04 5:50 ` Ingo Molnar
2018-07-05 14:52 ` Rodrigo Vivi
@ 2018-07-10 23:40 ` Rodrigo Vivi
1 sibling, 0 replies; 8+ messages in thread
From: Rodrigo Vivi @ 2018-07-10 23:40 UTC (permalink / raw)
To: Ingo Molnar
Cc: x86, Paulo Zanoni, intel-gfx, stable, Ingo Molnar, H. Peter Anvin,
Thomas Gleixner
On Wed, Jul 04, 2018 at 07:50:42AM +0200, Ingo Molnar wrote:
>
> * Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
>
> > > Cc: Thomas Gleixner <tglx@linutronix.de>
> > > > > > Cc: Ingo Molnar <mingo@kernel.org>
> > > > > > Cc: H. Peter Anvin <hpa@zytor.com>
> > > > > > Cc: x86@kernel.org
> > >
> > > guys, could we push this through drm-intel? ack?
> > > nack? comments?
> >
> > Is there any concern with this patch?
> > any ack for push this through drm-intel?
> > or any nack with explanations please?
> >
> > I'd like to push this for 4.19 because this is
> > one of the patches that blocks us on using drm-tip
> > on ICL.
>
> Sorry - no objections, and I suppose it will be all tested properly before going
> upstream:
>
> Acked-by: Ingo Molnar <mingo@kernel.org>
series pushed to drm-intel-next-queued...
Probably landing on 4.19 still
Thanks for patches, reviews and acks, specially x86 one.
>
> Thanks,
>
> Ingo
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-07-10 23:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180503002352.11951-1-paulo.r.zanoni@intel.com>
2018-05-04 20:32 ` [PATCH 1/2] x86/gpu: reserve ICL's graphics stolen memory Paulo Zanoni
2018-05-07 8:46 ` Joonas Lahtinen
2018-06-01 21:44 ` Paulo Zanoni
2018-06-18 17:47 ` [Intel-gfx] " Rodrigo Vivi
2018-07-03 19:11 ` Rodrigo Vivi
2018-07-04 5:50 ` Ingo Molnar
2018-07-05 14:52 ` Rodrigo Vivi
2018-07-10 23:40 ` Rodrigo Vivi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).