[Intel-gfx] [PATCH v2 16/17] drm/i915: Use crtc->hwmode for vblanks.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Mon May 18 23:10:46 PDT 2015


Op 18-05-15 om 18:28 schreef Ville Syrjälä:
> On Mon, May 18, 2015 at 05:49:23PM +0200, Daniel Vetter wrote:
>> On Wed, May 13, 2015 at 10:23:46PM +0200, Maarten Lankhorst wrote:
>>> intel_crtc->config will be removed eventually, so use crtc->hwmode.
>>> drm_atomic_helper_update_legacy_modeset_state updates hwmode,
>>> but crtc->active will eventually be gone too. Set dotclock to zero
>>> to indicate the crtc is inactive.
>>>
>>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
>> I think adding a code comment to our assignment of crtc->hw_mode that we
>> need this for i915_get_vblank_timestamp (and only for that) would be
>> really good. Especially since I can't find it with a quick grep, at least
>> in current upstream ;-)
> I don't particularly like resurrecting this zombie. Why we can't just use
> crtc->state->adjusted_mode (or wherever the current adjusted mode is kept)?
>
Because we want to get rid of intel_crtc->config, and if drm_atomic_swap_state
is moved to be done before any call to then crtc->state->adjusted_mode will not
be in sync with the hw state, and any wai tfor vblank will produce funny results.

Since I don't think you should want to pass a state to vblank you would have to use
some crtc local variable somewhere, in this case I chose to use hwmode for that.

~Maarten


More information about the Intel-gfx mailing list