Re: [PATCH v2 03/11] drm/i915: HDMI pixel clock check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 30, 2015 at 09:49:30AM +0300, Mika Kahola wrote:
> It is possible the we request to have a mode that has
> higher pixel clock than our HW can support. This patch
> checks if requested pixel clock is lower than the one
> supported by the HW. The requested mode is discarded
> if we cannot support the requested pixel clock.
> 
> This patch applies to HDMI.
> 
> V2:
> - removed computation for max dot clock
> 
> Signed-off-by: Mika Kahola <mika.kahola@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 70bad5b..b85efaa 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -1191,15 +1191,22 @@ intel_hdmi_mode_valid(struct drm_connector *connector,
>  {
>  	struct intel_hdmi *hdmi = intel_attached_hdmi(connector);
>  	struct drm_device *dev = intel_hdmi_to_dev(hdmi);
> +	struct drm_i915_private *dev_priv = to_i915(dev);
>  	enum drm_mode_status status;
>  	int clock;
> +	int max_pixclk = dev_priv->max_dotclk;
>  
>  	if (mode->flags & DRM_MODE_FLAG_DBLSCAN)
>  		return MODE_NO_DBLESCAN;
>  
>  	clock = mode->clock;
> -	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> +	if (mode->flags & DRM_MODE_FLAG_DBLCLK) {
>  		clock *= 2;
> +		max_pixclk *= 2;
> +	}
> +
> +	if (clock > max_pixclk)
> +		return MODE_CLOCK_HIGH;

Or do the test before the DBLCLK?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux