drm/i915: Assign hwmode after encoder state readout
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 10 Sep 2015 15:59:07 +0000 (18:59 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 23 Sep 2015 08:31:31 +0000 (10:31 +0200)
commit7f4c62840cc416986f983a8c68f7010c97e06daf
tree204444eae1c1d84c18403061f2504490283f5b3a
parent237ed86c693d8a8e4db476976aeb30df4deac74b
drm/i915: Assign hwmode after encoder state readout

The dotclock is often calculated in encoder .get_config(), so we
shouldn't copy the adjusted_mode to hwmode until we have read out the
dotclock.

Gets rid of some warnings like these:
[drm:drm_calc_timestamping_constants [drm]] *ERROR* crtc 21: Can't calculate constants, dotclock = 0!
[drm:i915_get_vblank_timestamp] crtc 0 is disabled

v2: Steal Maarten's idea to move crtc->mode etc. assignment too

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91428
Reviewed-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c