[9/9] drm/i915: use intel_bios_is_port_present()
diff mbox series

Message ID 42544944ce505826335bab30cc76e135581229be.1579270868.git.jani.nikula@intel.com
State New
Headers show
Series
  • drm/i915/bios: stop using vbt.ddi_port_info directly
Related show

Commit Message

Jani Nikula Jan. 17, 2020, 2:29 p.m. UTC
Don't access i915->vbt.ddi_port_info[] directly.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_combo_phy.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Ville Syrjälä Jan. 17, 2020, 3:14 p.m. UTC | #1
On Fri, Jan 17, 2020 at 04:29:29PM +0200, Jani Nikula wrote:
> Don't access i915->vbt.ddi_port_info[] directly.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_combo_phy.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_combo_phy.c b/drivers/gpu/drm/i915/display/intel_combo_phy.c
> index 44bbc7e74fc3..5f54aca7c36f 100644
> --- a/drivers/gpu/drm/i915/display/intel_combo_phy.c
> +++ b/drivers/gpu/drm/i915/display/intel_combo_phy.c
> @@ -265,8 +265,8 @@ void intel_combo_phy_power_up_lanes(struct drm_i915_private *dev_priv,
>  
>  static u32 ehl_combo_phy_a_mux(struct drm_i915_private *i915, u32 val)
>  {
> -	bool ddi_a_present = i915->vbt.ddi_port_info[PORT_A].child != NULL;
> -	bool ddi_d_present = i915->vbt.ddi_port_info[PORT_D].child != NULL;
> +	bool ddi_a_present = intel_bios_is_port_present(i915, PORT_A);
> +	bool ddi_d_present = intel_bios_is_port_present(i915, PORT_D);
>  	bool dsi_present = intel_bios_is_dsi_present(i915, NULL);
>  
>  	/*
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_combo_phy.c b/drivers/gpu/drm/i915/display/intel_combo_phy.c
index 44bbc7e74fc3..5f54aca7c36f 100644
--- a/drivers/gpu/drm/i915/display/intel_combo_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_combo_phy.c
@@ -265,8 +265,8 @@  void intel_combo_phy_power_up_lanes(struct drm_i915_private *dev_priv,
 
 static u32 ehl_combo_phy_a_mux(struct drm_i915_private *i915, u32 val)
 {
-	bool ddi_a_present = i915->vbt.ddi_port_info[PORT_A].child != NULL;
-	bool ddi_d_present = i915->vbt.ddi_port_info[PORT_D].child != NULL;
+	bool ddi_a_present = intel_bios_is_port_present(i915, PORT_A);
+	bool ddi_d_present = intel_bios_is_port_present(i915, PORT_D);
 	bool dsi_present = intel_bios_is_dsi_present(i915, NULL);
 
 	/*