[Intel-gfx] [PATCH] drm/i915: add encoder get_config function v2

Daniel Vetter daniel at ffwll.ch
Tue May 7 20:47:18 CEST 2013


On Tue, May 7, 2013 at 7:59 PM, Daniel Vetter <daniel at ffwll.ch> wrote:
> On Tue, May 7, 2013 at 7:44 PM, Ville Syrjälä
> <ville.syrjala at linux.intel.com> wrote:
>>> +static void intel_sdvo_get_config(struct intel_encoder *encoder,
>>> +                               struct intel_crtc_config *pipe_config)
>>> +{
>>> +     struct intel_sdvo *intel_sdvo = to_intel_sdvo(&encoder->base);
>>> +     struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
>>> +     u32 tmp, flags = 0;
>>> +
>>> +     tmp = I915_READ(intel_sdvo->sdvo_reg);
>>> +
>>> +     if (tmp & SDVO_HSYNC_ACTIVE_HIGH)
>>> +             flags |= DRM_MODE_FLAG_PHSYNC;
>>> +     else
>>> +             flags |= DRM_MODE_FLAG_NHSYNC;
>>> +
>>> +     if (tmp & SDVO_VSYNC_ACTIVE_HIGH)
>>> +             flags |= DRM_MODE_FLAG_PVSYNC;
>>> +     else
>>> +             flags |= DRM_MODE_FLAG_NVSYNC;
>>
>> I'm guessing this guy should actually ask the SDVO chip for these
>> instead. Well, assuming that's even possible.
>
> The important part is that it matches up with the adjusted_mode we do
> when modesetting. That way the hw checker is happy and for fastboot we
> can just compare what we'd put into hw registers with the newly
> computed state (and fully skip the modeset dance if it matches). Or
> just forget about fastboot on sdvo.

I should read code before I write a mail next time around ...

Ville is right.
-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