Message ID | 20210722054338.12891-9-jose.souza@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/10] drm/i915/bios: Allow DSI ports to be parsed by parse_ddi_port() | expand |
On Wed, Jul 21, 2021 at 10:43:37PM -0700, José Roberto de Souza wrote: > On newer platform this opregion call always fails, also it do not > support multiple panels so dropping it. > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Jani Nikula <jani.nikula@intel.com> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com> > --- > drivers/gpu/drm/i915/display/intel_bios.c | 19 +++++++------------ > 1 file changed, 7 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c > index d1ad6d625e521..6c848384a2ada 100644 > --- a/drivers/gpu/drm/i915/display/intel_bios.c > +++ b/drivers/gpu/drm/i915/display/intel_bios.c > @@ -1924,7 +1924,7 @@ static void parse_integrated_panel(struct drm_i915_private *i915, > { > const struct vbt_header *vbt = i915->opregion.vbt; > const struct bdb_header *bdb; > - int lfp_inst = 0, panel_index, opregion_panel_index; > + int lfp_inst = 0, panel_index; > > if (devdata->child.handle == HANDLE_LFP_1) > lfp_inst = 1; > @@ -1937,17 +1937,12 @@ static void parse_integrated_panel(struct drm_i915_private *i915, > bdb = get_bdb_header(vbt); > panel_index = get_lfp_panel_index(i915, bdb, lfp_inst); > > - opregion_panel_index = intel_opregion_get_panel_type(i915); > - /* > - * TODO: the current implementation always use the panel index from > - * opregion if available due to issues with old platforms. > - * But this do not supports two panels and in SKL or newer I never saw a > - * system were this call returns a valid value. > - * So will change this to only use opregion up to BDW in a separated > - * commit. > - */ > - if (opregion_panel_index >= 0) > - panel_index = opregion_panel_index; > + if (DISPLAY_VER(i915) < 9) { > + int opregion_panel_index = intel_opregion_get_panel_type(i915); > + > + if (opregion_panel_index >= 0) > + opregion_panel_index = panel_index; > + } > > if (panel_index == -1) > return; > -- > 2.32.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Wed, Jul 21, 2021 at 10:43:37PM -0700, José Roberto de Souza wrote: > On newer platform this opregion call always fails, also it do not > support multiple panels so dropping it. We only use the panel type from opregion on specific machines based on aa DMI match. So this patch is basically a no-op. > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > Cc: Jani Nikula <jani.nikula@intel.com> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > --- > drivers/gpu/drm/i915/display/intel_bios.c | 19 +++++++------------ > 1 file changed, 7 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c > index d1ad6d625e521..6c848384a2ada 100644 > --- a/drivers/gpu/drm/i915/display/intel_bios.c > +++ b/drivers/gpu/drm/i915/display/intel_bios.c > @@ -1924,7 +1924,7 @@ static void parse_integrated_panel(struct drm_i915_private *i915, > { > const struct vbt_header *vbt = i915->opregion.vbt; > const struct bdb_header *bdb; > - int lfp_inst = 0, panel_index, opregion_panel_index; > + int lfp_inst = 0, panel_index; > > if (devdata->child.handle == HANDLE_LFP_1) > lfp_inst = 1; > @@ -1937,17 +1937,12 @@ static void parse_integrated_panel(struct drm_i915_private *i915, > bdb = get_bdb_header(vbt); > panel_index = get_lfp_panel_index(i915, bdb, lfp_inst); > > - opregion_panel_index = intel_opregion_get_panel_type(i915); > - /* > - * TODO: the current implementation always use the panel index from > - * opregion if available due to issues with old platforms. > - * But this do not supports two panels and in SKL or newer I never saw a > - * system were this call returns a valid value. > - * So will change this to only use opregion up to BDW in a separated > - * commit. > - */ > - if (opregion_panel_index >= 0) > - panel_index = opregion_panel_index; > + if (DISPLAY_VER(i915) < 9) { > + int opregion_panel_index = intel_opregion_get_panel_type(i915); > + > + if (opregion_panel_index >= 0) > + opregion_panel_index = panel_index; > + } > > if (panel_index == -1) > return; > -- > 2.32.0
diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index d1ad6d625e521..6c848384a2ada 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -1924,7 +1924,7 @@ static void parse_integrated_panel(struct drm_i915_private *i915, { const struct vbt_header *vbt = i915->opregion.vbt; const struct bdb_header *bdb; - int lfp_inst = 0, panel_index, opregion_panel_index; + int lfp_inst = 0, panel_index; if (devdata->child.handle == HANDLE_LFP_1) lfp_inst = 1; @@ -1937,17 +1937,12 @@ static void parse_integrated_panel(struct drm_i915_private *i915, bdb = get_bdb_header(vbt); panel_index = get_lfp_panel_index(i915, bdb, lfp_inst); - opregion_panel_index = intel_opregion_get_panel_type(i915); - /* - * TODO: the current implementation always use the panel index from - * opregion if available due to issues with old platforms. - * But this do not supports two panels and in SKL or newer I never saw a - * system were this call returns a valid value. - * So will change this to only use opregion up to BDW in a separated - * commit. - */ - if (opregion_panel_index >= 0) - panel_index = opregion_panel_index; + if (DISPLAY_VER(i915) < 9) { + int opregion_panel_index = intel_opregion_get_panel_type(i915); + + if (opregion_panel_index >= 0) + opregion_panel_index = panel_index; + } if (panel_index == -1) return;
On newer platform this opregion call always fails, also it do not support multiple panels so dropping it. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> --- drivers/gpu/drm/i915/display/intel_bios.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)