On Wed, Nov 23, 2016 at 03:57:00PM +0100, Maarten Lankhorst wrote:
> In all cases we can now obtain the relevant crtc_state/conn_state
> from the relevant callbacks, which means all the ->config accesses
> can be removed and the code cleaned up.
> 
> Changes since v1:
> - cstate -> crtc_state
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankho...@linux.intel.com>
> ---
<snip>
> @@ -560,28 +566,16 @@ static void g4x_set_infoframes(struct drm_encoder 
> *encoder,
>       I915_WRITE(reg, val);
>       POSTING_READ(reg);
>  
> -     intel_hdmi_set_avi_infoframe(encoder, adjusted_mode);
> -     intel_hdmi_set_spd_infoframe(encoder);
> -     intel_hdmi_set_hdmi_infoframe(encoder, adjusted_mode);
> +     intel_hdmi_set_avi_infoframe(encoder, crtc_state);
> +     intel_hdmi_set_spd_infoframe(encoder, crtc_state);
> +     intel_hdmi_set_hdmi_infoframe(encoder, crtc_state);
>  }
>  
> -static bool hdmi_sink_is_deep_color(struct drm_encoder *encoder)
> +static bool hdmi_sink_is_deep_color(const struct drm_connector_state 
> *conn_state)
>  {
> -     struct drm_device *dev = encoder->dev;
> -     struct drm_connector *connector;
> -
> -     WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
> +     struct drm_connector *connector = conn_state->connector;
>  
> -     /*
> -      * HDMI cloning is only supported on g4x which doesn't
> -      * support deep color or GCP infoframes anyway so no
> -      * need to worry about multiple HDMI sinks here.
> -      */

Please don't remove that comment.

With the comment restored this is
Reviewed-by: Ville Syrjälä <ville.syrj...@linux.intel.com>

> -     list_for_each_entry(connector, &dev->mode_config.connector_list, head)
> -             if (connector->encoder == encoder)
> -                     return connector->display_info.bpc > 8;
> -
> -     return false;
> +     return connector->display_info.bpc > 8;
>  }
>  
>  /*
  

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to