Home Home > GIT Browse > SLE15-SP1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-01-18 15:24:21 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2019-01-18 16:06:05 +0100
commit0570bd2d15b48c3dd6e42839ab7825a363f6a10a (patch)
tree361f17ce563954c21e4fdaf42f5696f1f0124765
parent0535f767a1de395b930410bd7e6d1f378cb2a527 (diff)
drm/i915/icl: create function to identify combophy port (bsc#1113956)
-rw-r--r--patches.drm/0001-drm-i915-icl-create-function-to-identify-combophy-po.patch126
-rw-r--r--series.conf1
2 files changed, 127 insertions, 0 deletions
diff --git a/patches.drm/0001-drm-i915-icl-create-function-to-identify-combophy-po.patch b/patches.drm/0001-drm-i915-icl-create-function-to-identify-combophy-po.patch
new file mode 100644
index 0000000000..bfd2669ccc
--- /dev/null
+++ b/patches.drm/0001-drm-i915-icl-create-function-to-identify-combophy-po.patch
@@ -0,0 +1,126 @@
+From 176597a12d61709727d1639836e5d68a6e7c437b Mon Sep 17 00:00:00 2001
+From: Mahesh Kumar <mahesh1.kumar@intel.com>
+Date: Thu, 4 Oct 2018 14:20:43 +0530
+Subject: drm/i915/icl: create function to identify combophy port
+Git-commit: 176597a12d61709727d1639836e5d68a6e7c437b
+Patch-mainline: v5.0-rc1
+References: bsc#1113956
+
+This patch creates a function/wrapper to check if port is combophy port
+instead of explicitly comparing ports.
+
+Changes since V1:
+ - keep all intel_port_is_* helper together (Lucas)
+
+Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
+Cc: Madhav Chauhan <madhav.chauhan@intel.com>
+Cc: Manasi Navare <manasi.d.navare@intel.com>
+Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
+Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
+Link: https://patchwork.freedesktop.org/patch/msgid/20181004085043.10154-1-mahesh1.kumar@intel.com
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ drivers/gpu/drm/i915/intel_ddi.c | 15 ++++++++-------
+ drivers/gpu/drm/i915/intel_display.c | 11 +++++++++++
+ drivers/gpu/drm/i915/intel_drv.h | 1 +
+ 3 files changed, 20 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_ddi.c
++++ b/drivers/gpu/drm/i915/intel_ddi.c
+@@ -916,7 +916,7 @@ static int intel_ddi_hdmi_level(struct d
+ level = dev_priv->vbt.ddi_port_info[port].hdmi_level_shift;
+
+ if (IS_ICELAKE(dev_priv)) {
+- if (port == PORT_A || port == PORT_B)
++ if (intel_port_is_combophy(dev_priv, port))
+ icl_get_combo_buf_trans(dev_priv, port,
+ INTEL_OUTPUT_HDMI, &n_entries);
+ else
+@@ -1460,7 +1460,7 @@ static void icl_ddi_clock_get(struct int
+ uint32_t pll_id;
+
+ pll_id = intel_get_shared_dpll_id(dev_priv, pipe_config->shared_dpll);
+- if (port == PORT_A || port == PORT_B) {
++ if (intel_port_is_combophy(dev_priv, port)) {
+ if (intel_crtc_has_type(pipe_config, INTEL_OUTPUT_HDMI))
+ link_clock = cnl_calc_wrpll_link(dev_priv, pll_id);
+ else
+@@ -2158,7 +2158,7 @@ u8 intel_ddi_dp_voltage_max(struct intel
+ int n_entries;
+
+ if (IS_ICELAKE(dev_priv)) {
+- if (port == PORT_A || port == PORT_B)
++ if (intel_port_is_combophy(dev_priv, port))
+ icl_get_combo_buf_trans(dev_priv, port, encoder->type,
+ &n_entries);
+ else
+@@ -2471,9 +2471,10 @@ static void icl_combo_phy_ddi_vswing_seq
+ static void icl_ddi_vswing_sequence(struct intel_encoder *encoder, u32 level,
+ enum intel_output_type type)
+ {
++ struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+ enum port port = encoder->port;
+
+- if (port == PORT_A || port == PORT_B)
++ if (intel_port_is_combophy(dev_priv, port))
+ icl_combo_phy_ddi_vswing_sequence(encoder, level, type);
+ else
+ /* Not Implemented Yet */
+@@ -2559,7 +2560,7 @@ void icl_map_plls_to_ports(struct drm_cr
+ val = I915_READ(DPCLKA_CFGCR0_ICL);
+ WARN_ON((val & DPCLKA_CFGCR0_DDI_CLK_OFF(port)) == 0);
+
+- if (port == PORT_A || port == PORT_B) {
++ if (intel_port_is_combophy(dev_priv, port)) {
+ val &= ~DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(port);
+ val |= DPCLKA_CFGCR0_DDI_CLK_SEL(pll->info->id, port);
+ I915_WRITE(DPCLKA_CFGCR0_ICL, val);
+@@ -2612,7 +2613,7 @@ static void intel_ddi_clk_select(struct
+ mutex_lock(&dev_priv->dpll_lock);
+
+ if (IS_ICELAKE(dev_priv)) {
+- if (port >= PORT_C)
++ if (!intel_port_is_combophy(dev_priv, port))
+ I915_WRITE(DDI_CLK_SEL(port),
+ icl_pll_to_ddi_pll_sel(encoder, pll));
+ } else if (IS_CANNONLAKE(dev_priv)) {
+@@ -2654,7 +2655,7 @@ static void intel_ddi_clk_disable(struct
+ enum port port = encoder->port;
+
+ if (IS_ICELAKE(dev_priv)) {
+- if (port >= PORT_C)
++ if (!intel_port_is_combophy(dev_priv, port))
+ I915_WRITE(DDI_CLK_SEL(port), DDI_CLK_SEL_NONE);
+ } else if (IS_CANNONLAKE(dev_priv)) {
+ I915_WRITE(DPCLKA_CFGCR0, I915_READ(DPCLKA_CFGCR0) |
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -5899,6 +5899,17 @@ static void i9xx_pfit_enable(struct inte
+ I915_WRITE(BCLRPAT(crtc->pipe), 0);
+ }
+
++bool intel_port_is_combophy(struct drm_i915_private *dev_priv, enum port port)
++{
++ if (port == PORT_NONE)
++ return false;
++
++ if (IS_ICELAKE(dev_priv))
++ return port <= PORT_B;
++
++ return false;
++}
++
+ bool intel_port_is_tc(struct drm_i915_private *dev_priv, enum port port)
+ {
+ if (IS_ICELAKE(dev_priv))
+--- a/drivers/gpu/drm/i915/intel_drv.h
++++ b/drivers/gpu/drm/i915/intel_drv.h
+@@ -1507,6 +1507,7 @@ void intel_connector_attach_encoder(stru
+ struct intel_encoder *encoder);
+ struct drm_display_mode *
+ intel_encoder_current_mode(struct intel_encoder *encoder);
++bool intel_port_is_combophy(struct drm_i915_private *dev_priv, enum port port);
+ bool intel_port_is_tc(struct drm_i915_private *dev_priv, enum port port);
+ enum tc_port intel_port_to_tc(struct drm_i915_private *dev_priv,
+ enum port port);
diff --git a/series.conf b/series.conf
index ded18059b6..b7c31fb625 100644
--- a/series.conf
+++ b/series.conf
@@ -42094,6 +42094,7 @@
patches.drm/0001-drm-vc4-x_scaling-1-should-never-be-set-to-VC4_SCALI.patch
patches.drm/0043-drm-i915-dp-Do-not-grab-crtc-modeset-lock-in-intel_d.patch
patches.drm/0048-drm-i915-selftests-Disable-shrinker-across-mmap-exha.patch
+ patches.drm/0001-drm-i915-icl-create-function-to-identify-combophy-po.patch
patches.drm/0052-drm-i915-icl-Fix-signal_levels.patch
patches.drm/0061-drm-i915-Fix-VIDEO_DIP_CTL-bit-shifts.patch
patches.drm/0062-drm-i915-Fix-error-handling-for-the-NV12-fb-dimensio.patch