Message ID | 1507014667-16276-1-git-send-email-madhav.chauhan@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Please ignore this patch. Error happened while sending patches. > -----Original Message----- > From: Chauhan, Madhav > Sent: Tuesday, October 3, 2017 12:41 PM > To: intel-gfx@lists.freedesktop.org > Cc: Nikula, Jani <jani.nikula@intel.com>; Hiremath, Shashidhar > <shashidhar.hiremath@intel.com>; Shankar, Uma > <uma.shankar@intel.com>; patches/0001-drm-i915-Parse-DSI-backlight- > cabc-ports.patch; Chauhan, Madhav <madhav.chauhan@intel.com> > Subject: [PATCH 2/2] drm/i915/: Use existing DSI backlight ports info > > This patch re-use already parsed DSI backlight/cabc ports info for saving it > inside struct intel_dsi rather than parsing it at the time of DSI initialization. > > Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com> > --- > drivers/gpu/drm/i915/intel_dsi.c | 37 ++++--------------------------------- > 1 file changed, 4 insertions(+), 33 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_dsi.c > b/drivers/gpu/drm/i915/intel_dsi.c > index 20a7b00..6d21ae8 100644 > --- a/drivers/gpu/drm/i915/intel_dsi.c > +++ b/drivers/gpu/drm/i915/intel_dsi.c > @@ -1746,42 +1746,13 @@ void intel_dsi_init(struct drm_i915_private > *dev_priv) > else > intel_encoder->crtc_mask = BIT(PIPE_B); > > - if (dev_priv->vbt.dsi.config->dual_link) { > + if (dev_priv->vbt.dsi.config->dual_link) > intel_dsi->ports = BIT(PORT_A) | BIT(PORT_C); > - > - switch (dev_priv->vbt.dsi.config->dl_dcs_backlight_ports) { > - case DL_DCS_PORT_A: > - intel_dsi->dcs_backlight_ports = BIT(PORT_A); > - break; > - case DL_DCS_PORT_C: > - intel_dsi->dcs_backlight_ports = BIT(PORT_C); > - break; > - default: > - case DL_DCS_PORT_A_AND_C: > - intel_dsi->dcs_backlight_ports = BIT(PORT_A) | > BIT(PORT_C); > - break; > - } > - > - switch (dev_priv->vbt.dsi.config->dl_dcs_cabc_ports) { > - case DL_DCS_PORT_A: > - intel_dsi->dcs_cabc_ports = BIT(PORT_A); > - break; > - case DL_DCS_PORT_C: > - intel_dsi->dcs_cabc_ports = BIT(PORT_C); > - break; > - default: > - case DL_DCS_PORT_A_AND_C: > - intel_dsi->dcs_cabc_ports = BIT(PORT_A) | > BIT(PORT_C); > - break; > - } > - } else { > + else > intel_dsi->ports = BIT(port); > - intel_dsi->dcs_backlight_ports = BIT(port); > - intel_dsi->dcs_cabc_ports = BIT(port); > - } > > - if (!dev_priv->vbt.dsi.config->cabc_supported) > - intel_dsi->dcs_cabc_ports = 0; > + intel_dsi->dcs_backlight_ports = dev_priv->vbt.dsi.bl_ports; > + intel_dsi->dcs_cabc_ports = dev_priv->vbt.dsi.cabc_ports; > > /* Create a DSI host (and a device) for each port. */ > for_each_dsi_port(port, intel_dsi->ports) { > -- > 2.7.4
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index 20a7b00..6d21ae8 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c @@ -1746,42 +1746,13 @@ void intel_dsi_init(struct drm_i915_private *dev_priv) else intel_encoder->crtc_mask = BIT(PIPE_B); - if (dev_priv->vbt.dsi.config->dual_link) { + if (dev_priv->vbt.dsi.config->dual_link) intel_dsi->ports = BIT(PORT_A) | BIT(PORT_C); - - switch (dev_priv->vbt.dsi.config->dl_dcs_backlight_ports) { - case DL_DCS_PORT_A: - intel_dsi->dcs_backlight_ports = BIT(PORT_A); - break; - case DL_DCS_PORT_C: - intel_dsi->dcs_backlight_ports = BIT(PORT_C); - break; - default: - case DL_DCS_PORT_A_AND_C: - intel_dsi->dcs_backlight_ports = BIT(PORT_A) | BIT(PORT_C); - break; - } - - switch (dev_priv->vbt.dsi.config->dl_dcs_cabc_ports) { - case DL_DCS_PORT_A: - intel_dsi->dcs_cabc_ports = BIT(PORT_A); - break; - case DL_DCS_PORT_C: - intel_dsi->dcs_cabc_ports = BIT(PORT_C); - break; - default: - case DL_DCS_PORT_A_AND_C: - intel_dsi->dcs_cabc_ports = BIT(PORT_A) | BIT(PORT_C); - break; - } - } else { + else intel_dsi->ports = BIT(port); - intel_dsi->dcs_backlight_ports = BIT(port); - intel_dsi->dcs_cabc_ports = BIT(port); - } - if (!dev_priv->vbt.dsi.config->cabc_supported) - intel_dsi->dcs_cabc_ports = 0; + intel_dsi->dcs_backlight_ports = dev_priv->vbt.dsi.bl_ports; + intel_dsi->dcs_cabc_ports = dev_priv->vbt.dsi.cabc_ports; /* Create a DSI host (and a device) for each port. */ for_each_dsi_port(port, intel_dsi->ports) {
This patch re-use already parsed DSI backlight/cabc ports info for saving it inside struct intel_dsi rather than parsing it at the time of DSI initialization. Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com> --- drivers/gpu/drm/i915/intel_dsi.c | 37 ++++--------------------------------- 1 file changed, 4 insertions(+), 33 deletions(-)