<div dir="ltr"><div>Looks good to me. With this properly sprinkled on the appropriate patches, the entire series is</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 14, 2018 at 5:57 PM, Keith Packard <span dir="ltr"><<a href="mailto:keithp@keithp.com" target="_blank">keithp@keithp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We sorted out what 'vscan' means and are trying to use it correctly.<br>
<br>
vscan = 0 is the same as vscan = 1, which is slightly annoying; we use<br>
MAX2(vscan, 1) everywhere.<br>
<br>
randr doesn't pass vscan at all, so we set wsi mode vscan = 0.<br>
<br>
The doublescan flag doubles the vscan value, so we don't need to deal<br>
with that separately, we can just compare flags normally.<br>
<br>
Signed-off-by: Keith Packard <<a href="mailto:keithp@keithp.com">keithp@keithp.com</a>><br>
---<br>
src/vulkan/wsi/wsi_common_<wbr>display.c | 7 +++----<br>
1 file changed, 3 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/vulkan/wsi/wsi_common_<wbr>display.c b/src/vulkan/wsi/wsi_common_<wbr>display.c<br>
index c7f794a0eff..de1c1826bd2 100644<br>
--- a/src/vulkan/wsi/wsi_common_<wbr>display.c<br>
+++ b/src/vulkan/wsi/wsi_common_<wbr>display.c<br>
@@ -149,7 +149,7 @@ wsi_display_mode_matches_drm(<wbr>wsi_display_mode *wsi,<br>
wsi->vsync_start == drm->vsync_start &&<br>
wsi->vsync_end == drm->vsync_end &&<br>
wsi->vtotal == drm->vtotal &&<br>
- wsi->vscan == drm->vscan &&<br>
+ MAX2(wsi->vscan, 1) == MAX2(drm->vscan, 1) &&<br>
wsi->flags == drm->flags;<br>
}<br>
<br>
@@ -158,7 +158,7 @@ wsi_display_mode_refresh(<wbr>struct wsi_display_mode *wsi)<br>
{<br>
return (double) wsi->clock * 1000.0 / ((double) wsi->htotal *<br>
(double) wsi->vtotal *<br>
- (double) (wsi->vscan + 1));<br>
+ (double) MAX2(wsi->vscan, 1));<br>
}<br>
<br>
static uint64_t wsi_get_current_monotonic(<wbr>void)<br>
@@ -1657,6 +1657,7 @@ wsi_display_mode_matches_x(<wbr>struct wsi_display_mode *wsi,<br>
wsi->vsync_start == xcb->vsync_start &&<br>
wsi->vsync_end == xcb->vsync_end &&<br>
wsi->vtotal == xcb->vtotal &&<br>
+ wsi->vscan <= 1 && <br>
wsi->flags == xcb->mode_flags;<br>
}<br>
<br>
@@ -1707,8 +1708,6 @@ wsi_display_register_x_mode(<wbr>struct wsi_device *wsi_device,<br>
display_mode->vsync_end = x_mode->vsync_end;<br>
display_mode->vtotal = x_mode->vtotal;<br>
display_mode->vscan = 0;<br>
- if (x_mode->mode_flags & XCB_RANDR_MODE_FLAG_DOUBLE_<wbr>SCAN)<br>
- display_mode->vscan = 1;<br>
display_mode->flags = x_mode->mode_flags;<br>
<br>
list_addtail(&display_mode-><wbr>list, &connector->display_modes);<br>
<span class="HOEnZb"><font color="#888888">-- <br>
2.17.1<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>