]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: Clean up nv50_head_atomic_check_mode() and fix blankus calculation
authorAlastair Bridgewater <alastair.bridgewater@gmail.com>
Tue, 11 Apr 2017 17:11:16 +0000 (13:11 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 16 Jun 2017 04:04:18 +0000 (14:04 +1000)
commit115090229bfa4f6f5d07e27f73ccf1ade1ae1010
tree0ed14636872efd294c86cdc5c36ea5a88115b177
parent58a5dbbb3ff25823fc888f24bfbbbeeeb64f7452
drm/nouveau: Clean up nv50_head_atomic_check_mode() and fix blankus calculation

drm_mode_set_crtcinfo() does compensation for interlace and
doublescan timing effects already, so do it first and use the
compensated figures instead of the constant "vscan / ilace" terms
that we had before.

And then it turns out that the hardware model for how the timing
parameters are configured is basically the standard model, but
starting one clock before the sync pulse rather than at the start
of the display area, which lets us drastically simplify the
overall timing calculations (verifying the changes by algebraic
operations is left as an exercise for the reader).

Finally, there were a couple of issues with the computation of
m->v.blankus that are addressed here.  Interlaced modes would
generate a negative intermediate result.  Double scan modes would
generate an overestimate rather than an underestimate.  And when
enabling frame-packing modes, a rather extreme overestimate would
be generated.  Fixed, by using the timings as adjusted for the
CRTC to find the length of the vertical blanking period instead of
mixing adjusted and pre-adjustment timing parameters.

Signed-off-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv50_display.c