* [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
@ 2019-07-16 22:03 Dhinakaran Pandiyan
2019-07-16 22:10 ` Pandiyan, Dhinakaran
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Dhinakaran Pandiyan @ 2019-07-16 22:03 UTC (permalink / raw)
To: intel-gfx; +Cc: Dhinakaran Pandiyan
A single 32-bit PSR2 training pattern field follows the sixteen element
array of PSR table entries in the VBT spec. But, we incorrectly define
this PSR2 field for each of the PSR table entries. As a result, the PSR1
training pattern duration for any panel_type != 0 will be parsed
incorrectly. Secondly, PSR2 training pattern durations for VBTs with bdb
version >= 226 will also be wrong.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Fixes: 88a0d9606aff ("drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time")
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
drivers/gpu/drm/i915/display/intel_vbt_defs.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 21501d565327..b416b394b641 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -766,7 +766,7 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
}
if (bdb->version >= 226) {
- u32 wakeup_time = psr_table->psr2_tp2_tp3_wakeup_time;
+ u32 wakeup_time = psr->psr2_tp2_tp3_wakeup_time;
wakeup_time = (wakeup_time >> (2 * panel_type)) & 0x3;
switch (wakeup_time) {
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 93f5c9d204d6..09cd37fb0b1c 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -481,13 +481,13 @@ struct psr_table {
/* TP wake up time in multiple of 100 */
u16 tp1_wakeup_time;
u16 tp2_tp3_wakeup_time;
-
- /* PSR2 TP2/TP3 wakeup time for 16 panels */
- u32 psr2_tp2_tp3_wakeup_time;
} __packed;
struct bdb_psr {
struct psr_table psr_table[16];
+
+ /* PSR2 TP2/TP3 wakeup time for 16 panels */
+ u32 psr2_tp2_tp3_wakeup_time;
} __packed;
/*
--
2.17.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-16 22:03 [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section Dhinakaran Pandiyan
@ 2019-07-16 22:10 ` Pandiyan, Dhinakaran
2019-07-17 16:41 ` Souza, Jose
2019-07-17 19:49 ` François Guerraz
2019-07-17 11:35 ` [PATCH] " Ville Syrjälä
` (2 subsequent siblings)
3 siblings, 2 replies; 13+ messages in thread
From: Pandiyan, Dhinakaran @ 2019-07-16 22:10 UTC (permalink / raw)
To: intel-gfx@lists.freedesktop.org
On Tue, 2019-07-16 at 15:03 -0700, Dhinakaran Pandiyan wrote:
> A single 32-bit PSR2 training pattern field follows the sixteen element
> array of PSR table entries in the VBT spec. But, we incorrectly define
> this PSR2 field for each of the PSR table entries. As a result, the PSR1
> training pattern duration for any panel_type != 0 will be parsed
> incorrectly. Secondly, PSR2 training pattern durations for VBTs with bdb
> version >= 226 will also be wrong.
This was reported and bisected by
Aliaksei Urbanski here - https://bugzilla.kernel.org/show_bug.cgi?id=204183
I'll add Bugzilla after the fix is confirmed.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Fixes: 88a0d9606aff ("drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time")z
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
---
drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
drivers/gpu/drm/i915/display/intel_vbt_defs.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 21501d565327..b416b394b641 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -766,7 +766,7 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
}
if (bdb->version >= 226) {
- u32 wakeup_time = psr_table->psr2_tp2_tp3_wakeup_time;
+ u32 wakeup_time = psr->psr2_tp2_tp3_wakeup_time;
wakeup_time = (wakeup_time >> (2 * panel_type)) & 0x3;
switch (wakeup_time) {
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 93f5c9d204d6..09cd37fb0b1c 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -481,13 +481,13 @@ struct psr_table {
/* TP wake up time in multiple of 100 */
u16 tp1_wakeup_time;
u16 tp2_tp3_wakeup_time;
-
- /* PSR2 TP2/TP3 wakeup time for 16 panels */
- u32 psr2_tp2_tp3_wakeup_time;
} __packed;
struct bdb_psr {
struct psr_table psr_table[16];
+
+ /* PSR2 TP2/TP3 wakeup time for 16 panels */
+ u32 psr2_tp2_tp3_wakeup_time;
} __packed;
/*
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-16 22:10 ` Pandiyan, Dhinakaran
@ 2019-07-17 16:41 ` Souza, Jose
2019-07-17 16:56 ` Rodrigo Vivi
2019-07-17 19:49 ` François Guerraz
1 sibling, 1 reply; 13+ messages in thread
From: Souza, Jose @ 2019-07-17 16:41 UTC (permalink / raw)
To: intel-gfx@lists.freedesktop.org, Pandiyan, Dhinakaran
On Tue, 2019-07-16 at 15:10 -0700, Pandiyan, Dhinakaran wrote:
> On Tue, 2019-07-16 at 15:03 -0700, Dhinakaran Pandiyan wrote:
> > A single 32-bit PSR2 training pattern field follows the sixteen
> > element
> > array of PSR table entries in the VBT spec. But, we incorrectly
> > define
> > this PSR2 field for each of the PSR table entries. As a result, the
> > PSR1
> > training pattern duration for any panel_type != 0 will be parsed
> > incorrectly. Secondly, PSR2 training pattern durations for VBTs
> > with bdb
> > version >= 226 will also be wrong.
>
> This was reported and bisected by
> Aliaksei Urbanski here -
> https://bugzilla.kernel.org/show_bug.cgi?id=204183
>
> I'll add Bugzilla after the fix is confirmed.
>
Oohh it makes sense, thanks for spotting it.
And 2 users reported that it works:
https://bugzilla.kernel.org/show_bug.cgi?id=204183
https://bugs.freedesktop.org/show_bug.cgi?id=111088
Can you also CC kernel stable so the fix is cherry-picked?
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Fixes: 88a0d9606aff ("drm/i915/vbt: Parse and use the new field with
> PSR2 TP2/3 wakeup time")z
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
> drivers/gpu/drm/i915/display/intel_vbt_defs.h | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c
> b/drivers/gpu/drm/i915/display/intel_bios.c
> index 21501d565327..b416b394b641 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -766,7 +766,7 @@ parse_psr(struct drm_i915_private *dev_priv,
> const struct bdb_header *bdb)
> }
>
> if (bdb->version >= 226) {
> - u32 wakeup_time = psr_table->psr2_tp2_tp3_wakeup_time;
> + u32 wakeup_time = psr->psr2_tp2_tp3_wakeup_time;
>
> wakeup_time = (wakeup_time >> (2 * panel_type)) & 0x3;
> switch (wakeup_time) {
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index 93f5c9d204d6..09cd37fb0b1c 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -481,13 +481,13 @@ struct psr_table {
> /* TP wake up time in multiple of 100 */
> u16 tp1_wakeup_time;
> u16 tp2_tp3_wakeup_time;
> -
> - /* PSR2 TP2/TP3 wakeup time for 16 panels */
> - u32 psr2_tp2_tp3_wakeup_time;
> } __packed;
>
> struct bdb_psr {
> struct psr_table psr_table[16];
> +
> + /* PSR2 TP2/TP3 wakeup time for 16 panels */
> + u32 psr2_tp2_tp3_wakeup_time;
> } __packed;
>
> /*
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-17 16:41 ` Souza, Jose
@ 2019-07-17 16:56 ` Rodrigo Vivi
0 siblings, 0 replies; 13+ messages in thread
From: Rodrigo Vivi @ 2019-07-17 16:56 UTC (permalink / raw)
To: Souza, Jose; +Cc: intel-gfx@lists.freedesktop.org, Pandiyan, Dhinakaran
On Wed, Jul 17, 2019 at 09:41:13AM -0700, Souza, Jose wrote:
> On Tue, 2019-07-16 at 15:10 -0700, Pandiyan, Dhinakaran wrote:
> > On Tue, 2019-07-16 at 15:03 -0700, Dhinakaran Pandiyan wrote:
> > > A single 32-bit PSR2 training pattern field follows the sixteen
> > > element
> > > array of PSR table entries in the VBT spec. But, we incorrectly
> > > define
> > > this PSR2 field for each of the PSR table entries. As a result, the
> > > PSR1
> > > training pattern duration for any panel_type != 0 will be parsed
> > > incorrectly. Secondly, PSR2 training pattern durations for VBTs
> > > with bdb
> > > version >= 226 will also be wrong.
> >
> > This was reported and bisected by
> > Aliaksei Urbanski here -
> > https://bugzilla.kernel.org/show_bug.cgi?id=204183
> >
> > I'll add Bugzilla after the fix is confirmed.
> >
>
> Oohh it makes sense, thanks for spotting it.
>
> And 2 users reported that it works:
> https://bugzilla.kernel.org/show_bug.cgi?id=204183
> https://bugs.freedesktop.org/show_bug.cgi?id=111088
Please add this before merging:
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=204183
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=111088
>
> Can you also CC kernel stable so the fix is cherry-picked?
and this:
Cc: stable@vger.kernel.org #v5.2
>
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: José Roberto de Souza <jose.souza@intel.com>
> > Fixes: 88a0d9606aff ("drm/i915/vbt: Parse and use the new field with
> > PSR2 TP2/3 wakeup time")z
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
> > drivers/gpu/drm/i915/display/intel_vbt_defs.h | 6 +++---
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c
> > b/drivers/gpu/drm/i915/display/intel_bios.c
> > index 21501d565327..b416b394b641 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> > @@ -766,7 +766,7 @@ parse_psr(struct drm_i915_private *dev_priv,
> > const struct bdb_header *bdb)
> > }
> >
> > if (bdb->version >= 226) {
> > - u32 wakeup_time = psr_table->psr2_tp2_tp3_wakeup_time;
> > + u32 wakeup_time = psr->psr2_tp2_tp3_wakeup_time;
> >
> > wakeup_time = (wakeup_time >> (2 * panel_type)) & 0x3;
> > switch (wakeup_time) {
> > diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > index 93f5c9d204d6..09cd37fb0b1c 100644
> > --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > @@ -481,13 +481,13 @@ struct psr_table {
> > /* TP wake up time in multiple of 100 */
> > u16 tp1_wakeup_time;
> > u16 tp2_tp3_wakeup_time;
> > -
> > - /* PSR2 TP2/TP3 wakeup time for 16 panels */
> > - u32 psr2_tp2_tp3_wakeup_time;
> > } __packed;
> >
> > struct bdb_psr {
> > struct psr_table psr_table[16];
> > +
> > + /* PSR2 TP2/TP3 wakeup time for 16 panels */
> > + u32 psr2_tp2_tp3_wakeup_time;
> > } __packed;
> >
> > /*
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-16 22:10 ` Pandiyan, Dhinakaran
2019-07-17 16:41 ` Souza, Jose
@ 2019-07-17 19:49 ` François Guerraz
1 sibling, 0 replies; 13+ messages in thread
From: François Guerraz @ 2019-07-17 19:49 UTC (permalink / raw)
To: Pandiyan, Dhinakaran, intel-gfx@lists.freedesktop.org
Tested-by: François Guerraz <kubrick@fgv6.net>
On Dell XPS 9350
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-16 22:03 [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section Dhinakaran Pandiyan
2019-07-16 22:10 ` Pandiyan, Dhinakaran
@ 2019-07-17 11:35 ` Ville Syrjälä
2019-07-17 23:45 ` Pandiyan, Dhinakaran
2019-07-17 19:34 ` François Guerraz
2019-07-17 19:36 ` François Guerraz
3 siblings, 1 reply; 13+ messages in thread
From: Ville Syrjälä @ 2019-07-17 11:35 UTC (permalink / raw)
To: Dhinakaran Pandiyan; +Cc: intel-gfx
On Tue, Jul 16, 2019 at 03:03:21PM -0700, Dhinakaran Pandiyan wrote:
> A single 32-bit PSR2 training pattern field follows the sixteen element
> array of PSR table entries in the VBT spec. But, we incorrectly define
> this PSR2 field for each of the PSR table entries. As a result, the PSR1
> training pattern duration for any panel_type != 0 will be parsed
> incorrectly. Secondly, PSR2 training pattern durations for VBTs with bdb
> version >= 226 will also be wrong.
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Fixes: 88a0d9606aff ("drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time")
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Please sync the igt copy after landing this.
> ---
> drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
> drivers/gpu/drm/i915/display/intel_vbt_defs.h | 6 +++---
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
> index 21501d565327..b416b394b641 100644
> --- a/drivers/gpu/drm/i915/display/intel_bios.c
> +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> @@ -766,7 +766,7 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
> }
>
> if (bdb->version >= 226) {
> - u32 wakeup_time = psr_table->psr2_tp2_tp3_wakeup_time;
> + u32 wakeup_time = psr->psr2_tp2_tp3_wakeup_time;
>
> wakeup_time = (wakeup_time >> (2 * panel_type)) & 0x3;
> switch (wakeup_time) {
> diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> index 93f5c9d204d6..09cd37fb0b1c 100644
> --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> @@ -481,13 +481,13 @@ struct psr_table {
> /* TP wake up time in multiple of 100 */
> u16 tp1_wakeup_time;
> u16 tp2_tp3_wakeup_time;
> -
> - /* PSR2 TP2/TP3 wakeup time for 16 panels */
> - u32 psr2_tp2_tp3_wakeup_time;
> } __packed;
>
> struct bdb_psr {
> struct psr_table psr_table[16];
> +
> + /* PSR2 TP2/TP3 wakeup time for 16 panels */
> + u32 psr2_tp2_tp3_wakeup_time;
> } __packed;
>
> /*
> --
> 2.17.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-17 11:35 ` [PATCH] " Ville Syrjälä
@ 2019-07-17 23:45 ` Pandiyan, Dhinakaran
0 siblings, 0 replies; 13+ messages in thread
From: Pandiyan, Dhinakaran @ 2019-07-17 23:45 UTC (permalink / raw)
To: ville.syrjala@linux.intel.com; +Cc: intel-gfx@lists.freedesktop.org
On Wed, 2019-07-17 at 14:35 +0300, Ville Syrjälä wrote:
> On Tue, Jul 16, 2019 at 03:03:21PM -0700, Dhinakaran Pandiyan wrote:
> > A single 32-bit PSR2 training pattern field follows the sixteen element
> > array of PSR table entries in the VBT spec. But, we incorrectly define
> > this PSR2 field for each of the PSR table entries. As a result, the PSR1
> > training pattern duration for any panel_type != 0 will be parsed
> > incorrectly. Secondly, PSR2 training pattern durations for VBTs with bdb
> > version >= 226 will also be wrong.
> >
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Cc: José Roberto de Souza <jose.souza@intel.com>
> > Fixes: 88a0d9606aff ("drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time")
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Please sync the igt copy after landing this.
Will do, thanks!
-DK
>
> > ---
> > drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
> > drivers/gpu/drm/i915/display/intel_vbt_defs.h | 6 +++---
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c
> > b/drivers/gpu/drm/i915/display/intel_bios.c
> > index 21501d565327..b416b394b641 100644
> > --- a/drivers/gpu/drm/i915/display/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/display/intel_bios.c
> > @@ -766,7 +766,7 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
> > }
> >
> > if (bdb->version >= 226) {
> > - u32 wakeup_time = psr_table->psr2_tp2_tp3_wakeup_time;
> > + u32 wakeup_time = psr->psr2_tp2_tp3_wakeup_time;
> >
> > wakeup_time = (wakeup_time >> (2 * panel_type)) & 0x3;
> > switch (wakeup_time) {
> > diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > index 93f5c9d204d6..09cd37fb0b1c 100644
> > --- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > +++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
> > @@ -481,13 +481,13 @@ struct psr_table {
> > /* TP wake up time in multiple of 100 */
> > u16 tp1_wakeup_time;
> > u16 tp2_tp3_wakeup_time;
> > -
> > - /* PSR2 TP2/TP3 wakeup time for 16 panels */
> > - u32 psr2_tp2_tp3_wakeup_time;
> > } __packed;
> >
> > struct bdb_psr {
> > struct psr_table psr_table[16];
> > +
> > + /* PSR2 TP2/TP3 wakeup time for 16 panels */
> > + u32 psr2_tp2_tp3_wakeup_time;
> > } __packed;
> >
> > /*
> > --
> > 2.17.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-16 22:03 [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section Dhinakaran Pandiyan
2019-07-16 22:10 ` Pandiyan, Dhinakaran
2019-07-17 11:35 ` [PATCH] " Ville Syrjälä
@ 2019-07-17 19:34 ` François Guerraz
2019-07-17 19:36 ` François Guerraz
3 siblings, 0 replies; 13+ messages in thread
From: François Guerraz @ 2019-07-17 19:34 UTC (permalink / raw)
To: intel-gfx
Tested-by: François Guerraz <kubrick@fgv6.net>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-16 22:03 [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section Dhinakaran Pandiyan
` (2 preceding siblings ...)
2019-07-17 19:34 ` François Guerraz
@ 2019-07-17 19:36 ` François Guerraz
3 siblings, 0 replies; 13+ messages in thread
From: François Guerraz @ 2019-07-17 19:36 UTC (permalink / raw)
To: intel-gfx
Tested-by: François Guerraz <kubrick@fgv6.net>
On Dell XPS 9350
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
@ 2019-07-17 22:34 Dhinakaran Pandiyan
2019-07-19 0:45 ` Sasha Levin
0 siblings, 1 reply; 13+ messages in thread
From: Dhinakaran Pandiyan @ 2019-07-17 22:34 UTC (permalink / raw)
To: intel-gfx; +Cc: stable, Dhinakaran Pandiyan
A single 32-bit PSR2 training pattern field follows the sixteen element
array of PSR table entries in the VBT spec. But, we incorrectly define
this PSR2 field for each of the PSR table entries. As a result, the PSR1
training pattern duration for any panel_type != 0 will be parsed
incorrectly. Secondly, PSR2 training pattern durations for VBTs with bdb
version >= 226 will also be wrong.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: stable@vger.kernel.org
Cc: stable@vger.kernel.org #v5.2
Fixes: 88a0d9606aff ("drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111088
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204183
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: François Guerraz <kubrick@fgv6.net>
---
drivers/gpu/drm/i915/display/intel_bios.c | 2 +-
drivers/gpu/drm/i915/display/intel_vbt_defs.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c
index 21501d565327..b416b394b641 100644
--- a/drivers/gpu/drm/i915/display/intel_bios.c
+++ b/drivers/gpu/drm/i915/display/intel_bios.c
@@ -766,7 +766,7 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
}
if (bdb->version >= 226) {
- u32 wakeup_time = psr_table->psr2_tp2_tp3_wakeup_time;
+ u32 wakeup_time = psr->psr2_tp2_tp3_wakeup_time;
wakeup_time = (wakeup_time >> (2 * panel_type)) & 0x3;
switch (wakeup_time) {
diff --git a/drivers/gpu/drm/i915/display/intel_vbt_defs.h b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
index 93f5c9d204d6..09cd37fb0b1c 100644
--- a/drivers/gpu/drm/i915/display/intel_vbt_defs.h
+++ b/drivers/gpu/drm/i915/display/intel_vbt_defs.h
@@ -481,13 +481,13 @@ struct psr_table {
/* TP wake up time in multiple of 100 */
u16 tp1_wakeup_time;
u16 tp2_tp3_wakeup_time;
-
- /* PSR2 TP2/TP3 wakeup time for 16 panels */
- u32 psr2_tp2_tp3_wakeup_time;
} __packed;
struct bdb_psr {
struct psr_table psr_table[16];
+
+ /* PSR2 TP2/TP3 wakeup time for 16 panels */
+ u32 psr2_tp2_tp3_wakeup_time;
} __packed;
/*
--
2.17.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-17 22:34 [PATCH] " Dhinakaran Pandiyan
@ 2019-07-19 0:45 ` Sasha Levin
2019-07-30 20:42 ` [Intel-gfx] " Rodrigo Vivi
0 siblings, 1 reply; 13+ messages in thread
From: Sasha Levin @ 2019-07-19 0:45 UTC (permalink / raw)
To: Sasha Levin, intel-gfx; +Cc: stable, Dhinakaran Pandiyan
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 88a0d9606aff drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time.
The bot has tested the following trees: v5.2.1.
v5.2.1: Failed to apply! Possible dependencies:
231dcffc234f ("drm/i915/bios: add BDB block comments before definitions")
843444ed1301 ("drm/i915/bios: sort BDB block definitions using block ID")
f87f6599c843 ("drm/i915/bios: reserve struct bdb_ prefix for BDB blocks")
NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
--
Thanks,
Sasha
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [Intel-gfx] [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-19 0:45 ` Sasha Levin
@ 2019-07-30 20:42 ` Rodrigo Vivi
2019-07-30 21:48 ` Sasha Levin
0 siblings, 1 reply; 13+ messages in thread
From: Rodrigo Vivi @ 2019-07-30 20:42 UTC (permalink / raw)
To: Sasha Levin; +Cc: Dhinakaran Pandiyan, intel-gfx, stable
Hi Sasha,
On Thu, Jul 18, 2019 at 5:45 PM Sasha Levin <sashal@kernel.org> wrote:
>
> Hi,
>
> [This is an automated email]
Where did you get this patch from? Since stable needs patches merged
on Linus tree,
shouldn't your scripts run to try backporting only patches from there?
Thanks,
Rodrigo.
>
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: 88a0d9606aff drm/i915/vbt: Parse and use the new field with PSR2 TP2/3 wakeup time.
>
> The bot has tested the following trees: v5.2.1.
> v5.2.1: Failed to apply! Possible dependencies:
> 231dcffc234f ("drm/i915/bios: add BDB block comments before definitions")
> 843444ed1301 ("drm/i915/bios: sort BDB block definitions using block ID")
> f87f6599c843 ("drm/i915/bios: reserve struct bdb_ prefix for BDB blocks")
>
>
> NOTE: The patch will not be queued to stable trees until it is upstream.
>
> How should we proceed with this patch?
>
> --
> Thanks,
> Sasha
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-30 20:42 ` [Intel-gfx] " Rodrigo Vivi
@ 2019-07-30 21:48 ` Sasha Levin
2019-07-31 17:14 ` Vivi, Rodrigo
0 siblings, 1 reply; 13+ messages in thread
From: Sasha Levin @ 2019-07-30 21:48 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: intel-gfx, Dhinakaran Pandiyan, stable
On Tue, Jul 30, 2019 at 01:42:45PM -0700, Rodrigo Vivi wrote:
>Hi Sasha,
Hello!
>On Thu, Jul 18, 2019 at 5:45 PM Sasha Levin <sashal@kernel.org> wrote:
>>
>> Hi,
>>
>> [This is an automated email]
>
>Where did you get this patch from? Since stable needs patches merged
This bot grabs them from various mailing lists.
>on Linus tree,
>shouldn't your scripts run to try backporting only patches from there?
There's a note a few lines down that says:
"NOTE: The patch will not be queued to stable trees until it is upstream."
Otherwise, no, there's no rule that says we can't look at patches before
they are upstream. We can't queue them up, but we sure can poke them.
The reasoning behind this is that it's easier to get replies (and
backports) from folks who are actively working on the patch now, rather
than a few weeks later when Greg sends his "FAILED:" mails and gets
ignored because said folks have moved on.
--
Thanks,
Sasha
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section
2019-07-30 21:48 ` Sasha Levin
@ 2019-07-31 17:14 ` Vivi, Rodrigo
0 siblings, 0 replies; 13+ messages in thread
From: Vivi, Rodrigo @ 2019-07-31 17:14 UTC (permalink / raw)
To: Sasha Levin; +Cc: intel-gfx, Pandiyan, Dhinakaran, stable@vger.kernel.org
> On Jul 30, 2019, at 2:48 PM, Sasha Levin <sashal@kernel.org> wrote:
>
> On Tue, Jul 30, 2019 at 01:42:45PM -0700, Rodrigo Vivi wrote:
>> Hi Sasha,
>
> Hello!
>
>> On Thu, Jul 18, 2019 at 5:45 PM Sasha Levin <sashal@kernel.org> wrote:
>>>
>>> Hi,
>>>
>>> [This is an automated email]
>>
>> Where did you get this patch from? Since stable needs patches merged
>
> This bot grabs them from various mailing lists.
>
>> on Linus tree,
>> shouldn't your scripts run to try backporting only patches from there?
>
> There's a note a few lines down that says:
>
> "NOTE: The patch will not be queued to stable trees until it is upstream."
>
> Otherwise, no, there's no rule that says we can't look at patches before
> they are upstream. We can't queue them up, but we sure can poke them.
>
> The reasoning behind this is that it's easier to get replies (and
> backports) from folks who are actively working on the patch now,
This is a very good reason indeed...
> rather
> than a few weeks later when Greg sends his "FAILED:" mails and gets
> ignored because said folks have moved on.
however this could potentially cause extra work and confusion like we can see on this
thread where the developer immediately responded to your email and sent the
backported patch to the stable mailing list.
Maybe it is just because we are used to Greg's failed to apply email or maybe
it was just a matter of education...
But I wonder if there isn't something that could be improved on the automated
message here. Some message clearly stating:
- No action required at this point
- you can work to prepare the backport in advance
- don't send it to stable before requested by Greg
Anyway, just few ideas. I just reached you to understand the flow and I'm already
happy to understand what happened here.
Thanks a lot for that,
Rodrigo.
>
> --
> Thanks,
> Sasha
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-07-31 17:14 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-16 22:03 [PATCH] drm/i915/vbt: Fix VBT parsing for the PSR section Dhinakaran Pandiyan
2019-07-16 22:10 ` Pandiyan, Dhinakaran
2019-07-17 16:41 ` Souza, Jose
2019-07-17 16:56 ` Rodrigo Vivi
2019-07-17 19:49 ` François Guerraz
2019-07-17 11:35 ` [PATCH] " Ville Syrjälä
2019-07-17 23:45 ` Pandiyan, Dhinakaran
2019-07-17 19:34 ` François Guerraz
2019-07-17 19:36 ` François Guerraz
-- strict thread matches above, loose matches on Subject: below --
2019-07-17 22:34 [PATCH] " Dhinakaran Pandiyan
2019-07-19 0:45 ` Sasha Levin
2019-07-30 20:42 ` [Intel-gfx] " Rodrigo Vivi
2019-07-30 21:48 ` Sasha Levin
2019-07-31 17:14 ` Vivi, Rodrigo
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).