Re: [Intel-gfx] [PATCH 2/6] drm/i915: Simplfy LVDS crtc_mask setup

2019-10-31 Thread Juha-Pekka Heikkila

From this set patches 2,5,6 look all ok to me.

Reviewed-by: Juha-Pekka Heikkila 

On 2.10.2019 19.25, Ville Syrjala wrote:

From: Ville Syrjälä 

We don't need to special case PCH vs. gen4 when setting up the LVDS
crtc_mask. Just claim pipes A|B|C work and
intel_encoder_possible_crtcs() will drop out any crtc that doesn't
exist.

v2: Put the special case first to match what most other encoders do

Signed-off-by: Ville Syrjälä 
---
  drivers/gpu/drm/i915/display/intel_lvds.c | 8 +++-
  1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c 
b/drivers/gpu/drm/i915/display/intel_lvds.c
index 13841d7c455b..cf1cd2295b9b 100644
--- a/drivers/gpu/drm/i915/display/intel_lvds.c
+++ b/drivers/gpu/drm/i915/display/intel_lvds.c
@@ -899,12 +899,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
intel_encoder->power_domain = POWER_DOMAIN_PORT_OTHER;
intel_encoder->port = PORT_NONE;
intel_encoder->cloneable = 0;
-   if (HAS_PCH_SPLIT(dev_priv))
-   intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | 
BIT(PIPE_C);
-   else if (IS_GEN(dev_priv, 4))
-   intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B);
-   else
+   if (INTEL_GEN(dev_priv) < 4)
intel_encoder->crtc_mask = BIT(PIPE_B);
+   else
+   intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | 
BIT(PIPE_C);
  
  	drm_connector_helper_add(connector, _lvds_connector_helper_funcs);

connector->display_info.subpixel_order = SubPixelHorizontalRGB;



___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH 2/6] drm/i915: Simplfy LVDS crtc_mask setup

2019-10-02 Thread Ville Syrjala
From: Ville Syrjälä 

We don't need to special case PCH vs. gen4 when setting up the LVDS
crtc_mask. Just claim pipes A|B|C work and
intel_encoder_possible_crtcs() will drop out any crtc that doesn't
exist.

v2: Put the special case first to match what most other encoders do

Signed-off-by: Ville Syrjälä 
---
 drivers/gpu/drm/i915/display/intel_lvds.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c 
b/drivers/gpu/drm/i915/display/intel_lvds.c
index 13841d7c455b..cf1cd2295b9b 100644
--- a/drivers/gpu/drm/i915/display/intel_lvds.c
+++ b/drivers/gpu/drm/i915/display/intel_lvds.c
@@ -899,12 +899,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
intel_encoder->power_domain = POWER_DOMAIN_PORT_OTHER;
intel_encoder->port = PORT_NONE;
intel_encoder->cloneable = 0;
-   if (HAS_PCH_SPLIT(dev_priv))
-   intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | 
BIT(PIPE_C);
-   else if (IS_GEN(dev_priv, 4))
-   intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B);
-   else
+   if (INTEL_GEN(dev_priv) < 4)
intel_encoder->crtc_mask = BIT(PIPE_B);
+   else
+   intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | 
BIT(PIPE_C);
 
drm_connector_helper_add(connector, _lvds_connector_helper_funcs);
connector->display_info.subpixel_order = SubPixelHorizontalRGB;
-- 
2.21.0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx