[Intel-gfx] [PATCH] drm/i915: Fix issues caused from get_clock elimination

Daniel Vetter daniel at ffwll.ch
Fri Sep 6 18:00:40 CEST 2013


On Fri, Sep 06, 2013 at 04:24:17PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> For non-PCH encoders ironlake_crtc_clock_get() attempts to extract
> adjusted_mode.clock from port_clock. But now that we call
> ironlake_crtc_clock_get() before the encoders' get_config() that no
> longer works.
> 
> To fix the problem also call ironlake_crtc_clock_get() before
> get_config() for PCH encoders, and afterwards for non-PCH encoders.
> Also be careful not to clobber port_clock when calling it afterwards.
> 
> The problem was introduced by:
> "drm/i915: Fix port_clock readout for SDVO and HDMI 12bpc cases"
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Plan B, since this is only a special case for the cpu edp encoder where
the port clock is stored in the encoder. What about we move the full
responsibility for computing the clocks for the cpu edp port to the
encoder callback? ironlake_crtc_get_clock would then more correctly just
be a ironlake_get_pch_clocks or so.

Note that the exact same issue happens for hsw ddi ports where also the
port itself selects the port clock (and as usual for dp with the m/n
stuff then the dotclock). So we need a notch more generic solution here
than just a hack.

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list