[1/2] drm/i915: Limit MST modes based on plane size too
diff mbox series

Message ID 20191001154629.11063-1-ville.syrjala@linux.intel.com
State New
Headers show
Series
  • [1/2] drm/i915: Limit MST modes based on plane size too
Related show

Commit Message

Ville Syrjälä Oct. 1, 2019, 3:46 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

When adding the max plane size checks to the .mode_valid() hooks
I naturally forgot about MST. Take care of that one as well.

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Sean Paul <sean@poorly.run>
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: 2d20411e25a3 ("drm/i915: Don't advertise modes that exceed the max plane size")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Souza, Jose Oct. 1, 2019, 5:25 p.m. UTC | #1
On Tue, 2019-10-01 at 18:46 +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> When adding the max plane size checks to the .mode_valid() hooks
> I naturally forgot about MST. Take care of that one as well.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Cc: Sean Paul <sean@poorly.run>
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Fixes: 2d20411e25a3 ("drm/i915: Don't advertise modes that exceed the
> max plane size")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index df4f35c10a69..2203be28ea01 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -424,6 +424,7 @@ static enum drm_mode_status
>  intel_dp_mst_mode_valid(struct drm_connector *connector,
>  			struct drm_display_mode *mode)
>  {
> +	struct drm_i915_private *dev_priv = to_i915(connector->dev);
>  	struct intel_connector *intel_connector =
> to_intel_connector(connector);
>  	struct intel_dp *intel_dp = intel_connector->mst_port;
>  	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
> @@ -451,7 +452,7 @@ intel_dp_mst_mode_valid(struct drm_connector
> *connector,
>  	if (mode_rate > max_rate || mode->clock > max_dotclk)
>  		return MODE_CLOCK_HIGH;
>  
> -	return MODE_OK;
> +	return intel_mode_valid_max_plane_size(dev_priv, mode);
>  }
>  
>  static struct drm_encoder *intel_mst_atomic_best_encoder(struct
> drm_connector *connector,

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index df4f35c10a69..2203be28ea01 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -424,6 +424,7 @@  static enum drm_mode_status
 intel_dp_mst_mode_valid(struct drm_connector *connector,
 			struct drm_display_mode *mode)
 {
+	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	struct intel_connector *intel_connector = to_intel_connector(connector);
 	struct intel_dp *intel_dp = intel_connector->mst_port;
 	int max_dotclk = to_i915(connector->dev)->max_dotclk_freq;
@@ -451,7 +452,7 @@  intel_dp_mst_mode_valid(struct drm_connector *connector,
 	if (mode_rate > max_rate || mode->clock > max_dotclk)
 		return MODE_CLOCK_HIGH;
 
-	return MODE_OK;
+	return intel_mode_valid_max_plane_size(dev_priv, mode);
 }
 
 static struct drm_encoder *intel_mst_atomic_best_encoder(struct drm_connector *connector,