* [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow
@ 2020-10-22 19:42 Ville Syrjala
2020-10-22 20:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Ville Syrjala @ 2020-10-22 19:42 UTC (permalink / raw)
To: dri-devel; +Cc: intel-gfx, Randy Dunlap, stable
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
The new >8k CEA modes have dotclocks reaching 5.94 GHz, which
means our clock*1000 will now overflow the 32bit unsigned
integer. Switch to 64bit maths to avoid it.
Cc: stable@vger.kernel.org
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
An interesting question how many other place might suffer from similar
overflows. I think i915 should be mostly OK. The one place I know we use
Hz instead kHz is the hsw DPLL code, which I would prefer we also change
to use kHz. The other concern is whether we have any potential overflows
before we check this against the platform's max dotclock.
I do have this unreviewed igt series
https://patchwork.freedesktop.org/series/69531/ which extends the
current testing with some other forms of invalid modes. Could probably
extend that with a mode.clock=INT_MAX test to see if anything else might
trip up.
No idea about other drivers.
drivers/gpu/drm/drm_modes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 501b4fe55a3d..511cde5c7fa6 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -762,7 +762,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
if (mode->htotal == 0 || mode->vtotal == 0)
return 0;
- num = mode->clock * 1000;
+ num = mode->clock;
den = mode->htotal * mode->vtotal;
if (mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -772,7 +772,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
if (mode->vscan > 1)
den *= mode->vscan;
- return DIV_ROUND_CLOSEST(num, den);
+ return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(num, 1000), den);
}
EXPORT_SYMBOL(drm_mode_vrefresh);
--
2.26.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/modes: Switch to 64bit maths to avoid integer overflow
2020-10-22 19:42 [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow Ville Syrjala
@ 2020-10-22 20:48 ` Patchwork
2020-10-22 23:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-10-22 20:48 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 2582 bytes --]
== Series Details ==
Series: drm/modes: Switch to 64bit maths to avoid integer overflow
URL : https://patchwork.freedesktop.org/series/82963/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9186 -> Patchwork_18767
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/index.html
Known issues
------------
Here are the changes found in Patchwork_18767 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_create@basic-files:
- fi-apl-guc: [PASS][1] -> [INCOMPLETE][2] ([i915#1635])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/fi-apl-guc/igt@gem_ctx_create@basic-files.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/fi-apl-guc/igt@gem_ctx_create@basic-files.html
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-bsw-kefka: [PASS][3] -> [DMESG-WARN][4] ([i915#1982])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/fi-bsw-kefka/igt@i915_pm_rpm@basic-pci-d3-state.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/fi-bsw-kefka/igt@i915_pm_rpm@basic-pci-d3-state.html
* igt@kms_cursor_legacy@basic-flip-after-cursor-atomic:
- fi-icl-u2: [PASS][5] -> [DMESG-WARN][6] ([i915#1982])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/fi-icl-u2/igt@kms_cursor_legacy@basic-flip-after-cursor-atomic.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/fi-icl-u2/igt@kms_cursor_legacy@basic-flip-after-cursor-atomic.html
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
Participating hosts (44 -> 39)
------------------------------
Additional (1): fi-skl-lmem
Missing (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper
Build changes
-------------
* Linux: CI_DRM_9186 -> Patchwork_18767
CI-20190529: 20190529
CI_DRM_9186: 88e88abb49e9b08d25ba928cc34ed09082f209b0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5822: b4bcf05cb9839037128905deda7146434155cc41 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18767: af56b064d8e01c158fb67bbc7f7475f4cb6a5ba7 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
af56b064d8e0 drm/modes: Switch to 64bit maths to avoid integer overflow
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/index.html
[-- Attachment #1.2: Type: text/html, Size: 3315 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/modes: Switch to 64bit maths to avoid integer overflow
2020-10-22 19:42 [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow Ville Syrjala
2020-10-22 20:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
@ 2020-10-22 23:14 ` Patchwork
2020-10-23 18:04 ` [Intel-gfx] [PATCH] " Randy Dunlap
2020-10-30 14:19 ` Chris Wilson
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-10-22 23:14 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 17025 bytes --]
== Series Details ==
Series: drm/modes: Switch to 64bit maths to avoid integer overflow
URL : https://patchwork.freedesktop.org/series/82963/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_9186_full -> Patchwork_18767_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_18767_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_reloc@basic-many-active@rcs0:
- shard-snb: [PASS][1] -> [FAIL][2] ([i915#2389])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-snb7/igt@gem_exec_reloc@basic-many-active@rcs0.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-snb7/igt@gem_exec_reloc@basic-many-active@rcs0.html
* igt@gem_exec_whisper@basic-forked-all:
- shard-glk: [PASS][3] -> [DMESG-WARN][4] ([i915#118] / [i915#95])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-glk1/igt@gem_exec_whisper@basic-forked-all.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-glk7/igt@gem_exec_whisper@basic-forked-all.html
* igt@i915_pm_dc@dc6-psr:
- shard-skl: [PASS][5] -> [FAIL][6] ([i915#454])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl7/igt@i915_pm_dc@dc6-psr.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl7/igt@i915_pm_dc@dc6-psr.html
* igt@i915_suspend@debugfs-reader:
- shard-kbl: [PASS][7] -> [INCOMPLETE][8] ([i915#155])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-kbl7/igt@i915_suspend@debugfs-reader.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-kbl4/igt@i915_suspend@debugfs-reader.html
* igt@kms_big_fb@linear-32bpp-rotate-180:
- shard-glk: [PASS][9] -> [DMESG-FAIL][10] ([i915#118] / [i915#95])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-glk7/igt@kms_big_fb@linear-32bpp-rotate-180.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-glk5/igt@kms_big_fb@linear-32bpp-rotate-180.html
* igt@kms_big_fb@y-tiled-16bpp-rotate-0:
- shard-skl: [PASS][11] -> [FAIL][12] ([i915#1119])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl1/igt@kms_big_fb@y-tiled-16bpp-rotate-0.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl9/igt@kms_big_fb@y-tiled-16bpp-rotate-0.html
* igt@kms_big_fb@y-tiled-8bpp-rotate-180:
- shard-kbl: [PASS][13] -> [DMESG-WARN][14] ([i915#1982])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-kbl7/igt@kms_big_fb@y-tiled-8bpp-rotate-180.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-kbl4/igt@kms_big_fb@y-tiled-8bpp-rotate-180.html
* igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size:
- shard-skl: [PASS][15] -> [DMESG-WARN][16] ([i915#1982]) +7 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl9/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl10/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size.html
* igt@kms_cursor_legacy@flip-vs-cursor-legacy:
- shard-skl: [PASS][17] -> [FAIL][18] ([i915#2346])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl7/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl8/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html
* igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled:
- shard-snb: [PASS][19] -> [FAIL][20] ([i915#54])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-snb4/igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-snb2/igt@kms_draw_crc@draw-method-xrgb8888-render-xtiled.html
* igt@kms_flip@flip-vs-expired-vblank@a-edp1:
- shard-skl: [PASS][21] -> [FAIL][22] ([i915#79])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl1/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl4/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html
* igt@kms_flip@plain-flip-ts-check-interruptible@c-edp1:
- shard-skl: [PASS][23] -> [FAIL][24] ([i915#2122]) +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl9/igt@kms_flip@plain-flip-ts-check-interruptible@c-edp1.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl10/igt@kms_flip@plain-flip-ts-check-interruptible@c-edp1.html
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt:
- shard-tglb: [PASS][25] -> [DMESG-WARN][26] ([i915#1982]) +2 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-tglb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-tglb5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt.html
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][27] -> [FAIL][28] ([i915#1188]) +1 similar issue
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl9/igt@kms_hdr@bpc-switch-dpms.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl2/igt@kms_hdr@bpc-switch-dpms.html
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-kbl: [PASS][29] -> [DMESG-WARN][30] ([i915#180])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-kbl1/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-kbl4/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][31] -> [FAIL][32] ([fdo#108145] / [i915#265])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl10/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl7/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
* igt@kms_plane_cursor@pipe-a-primary-size-256:
- shard-glk: [PASS][33] -> [DMESG-WARN][34] ([i915#1982])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-glk9/igt@kms_plane_cursor@pipe-a-primary-size-256.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-glk2/igt@kms_plane_cursor@pipe-a-primary-size-256.html
* igt@kms_psr2_su@frontbuffer:
- shard-iclb: [PASS][35] -> [SKIP][36] ([fdo#109642] / [fdo#111068])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-iclb2/igt@kms_psr2_su@frontbuffer.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-iclb1/igt@kms_psr2_su@frontbuffer.html
* igt@kms_psr@psr2_sprite_blt:
- shard-iclb: [PASS][37] -> [SKIP][38] ([fdo#109441]) +1 similar issue
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-iclb2/igt@kms_psr@psr2_sprite_blt.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-iclb8/igt@kms_psr@psr2_sprite_blt.html
#### Possible fixes ####
* igt@core_hotunplug@hotrebind-lateclose:
- shard-snb: [INCOMPLETE][39] ([i915#82]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-snb4/igt@core_hotunplug@hotrebind-lateclose.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-snb2/igt@core_hotunplug@hotrebind-lateclose.html
* igt@gem_exec_whisper@basic-queues-forked:
- shard-glk: [DMESG-WARN][41] ([i915#118] / [i915#95]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-glk6/igt@gem_exec_whisper@basic-queues-forked.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-glk5/igt@gem_exec_whisper@basic-queues-forked.html
* igt@gem_exec_whisper@basic-queues-priority-all:
- shard-glk: [INCOMPLETE][43] -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-glk4/igt@gem_exec_whisper@basic-queues-priority-all.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-glk1/igt@gem_exec_whisper@basic-queues-priority-all.html
* igt@gem_userptr_blits@sync-unmap-cycles:
- shard-skl: [TIMEOUT][45] ([i915#2424]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl8/igt@gem_userptr_blits@sync-unmap-cycles.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl2/igt@gem_userptr_blits@sync-unmap-cycles.html
* {igt@kms_async_flips@async-flip-with-page-flip-events}:
- shard-apl: [FAIL][47] ([i915#1635] / [i915#2521]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-apl4/igt@kms_async_flips@async-flip-with-page-flip-events.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-apl2/igt@kms_async_flips@async-flip-with-page-flip-events.html
* igt@kms_cursor_crc@pipe-c-cursor-128x128-onscreen:
- shard-skl: [FAIL][49] ([i915#54]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl7/igt@kms_cursor_crc@pipe-c-cursor-128x128-onscreen.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl7/igt@kms_cursor_crc@pipe-c-cursor-128x128-onscreen.html
* igt@kms_cursor_legacy@cursor-vs-flip-varying-size:
- shard-hsw: [FAIL][51] ([i915#2370]) -> [PASS][52]
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-hsw6/igt@kms_cursor_legacy@cursor-vs-flip-varying-size.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-hsw2/igt@kms_cursor_legacy@cursor-vs-flip-varying-size.html
* igt@kms_flip@blocking-wf_vblank@a-edp1:
- shard-tglb: [DMESG-WARN][53] ([i915#1982]) -> [PASS][54] +2 similar issues
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-tglb6/igt@kms_flip@blocking-wf_vblank@a-edp1.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-tglb2/igt@kms_flip@blocking-wf_vblank@a-edp1.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1:
- shard-skl: [FAIL][55] ([i915#79]) -> [PASS][56] +1 similar issue
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl2/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl4/igt@kms_flip@flip-vs-expired-vblank-interruptible@c-edp1.html
* igt@kms_flip@plain-flip-fb-recreate-interruptible@a-hdmi-a1:
- shard-glk: [FAIL][57] ([i915#2122]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-glk4/igt@kms_flip@plain-flip-fb-recreate-interruptible@a-hdmi-a1.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-glk3/igt@kms_flip@plain-flip-fb-recreate-interruptible@a-hdmi-a1.html
* igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1:
- shard-skl: [FAIL][59] ([i915#2122]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl10/igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl6/igt@kms_flip@plain-flip-fb-recreate-interruptible@c-edp1.html
* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [FAIL][61] ([i915#1188]) -> [PASS][62]
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl4/igt@kms_hdr@bpc-switch-suspend.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl9/igt@kms_hdr@bpc-switch-suspend.html
* igt@kms_plane_alpha_blend@pipe-c-coverage-7efc:
- shard-skl: [FAIL][63] ([fdo#108145] / [i915#265]) -> [PASS][64] +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl7/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl7/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html
* igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format:
- shard-skl: [DMESG-WARN][65] ([i915#1982]) -> [PASS][66] +4 similar issues
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl7/igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl8/igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format.html
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [SKIP][67] ([fdo#109441]) -> [PASS][68] +2 similar issues
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-iclb7/igt@kms_psr@psr2_cursor_render.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
* igt@kms_setmode@basic:
- shard-apl: [FAIL][69] ([i915#1635] / [i915#31]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-apl1/igt@kms_setmode@basic.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-apl6/igt@kms_setmode@basic.html
#### Warnings ####
* igt@kms_flip@flip-vs-suspend-interruptible@a-edp1:
- shard-skl: [DMESG-WARN][71] ([i915#1982]) -> [INCOMPLETE][72] ([i915#198] / [i915#1982])
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-skl7/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-skl7/igt@kms_flip@flip-vs-suspend-interruptible@a-edp1.html
* igt@kms_frontbuffer_tracking@fbcpsr-suspend:
- shard-tglb: [DMESG-WARN][73] ([i915#1982] / [i915#2411]) -> [DMESG-WARN][74] ([i915#2411])
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9186/shard-tglb3/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/shard-tglb6/igt@kms_frontbuffer_tracking@fbcpsr-suspend.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[i915#1119]: https://gitlab.freedesktop.org/drm/intel/issues/1119
[i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#155]: https://gitlab.freedesktop.org/drm/intel/issues/155
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2370]: https://gitlab.freedesktop.org/drm/intel/issues/2370
[i915#2389]: https://gitlab.freedesktop.org/drm/intel/issues/2389
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#2424]: https://gitlab.freedesktop.org/drm/intel/issues/2424
[i915#2521]: https://gitlab.freedesktop.org/drm/intel/issues/2521
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Build changes
-------------
* Linux: CI_DRM_9186 -> Patchwork_18767
CI-20190529: 20190529
CI_DRM_9186: 88e88abb49e9b08d25ba928cc34ed09082f209b0 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5822: b4bcf05cb9839037128905deda7146434155cc41 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18767: af56b064d8e01c158fb67bbc7f7475f4cb6a5ba7 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18767/index.html
[-- Attachment #1.2: Type: text/html, Size: 20011 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow
2020-10-22 19:42 [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow Ville Syrjala
2020-10-22 20:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-10-22 23:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
@ 2020-10-23 18:04 ` Randy Dunlap
2020-10-30 14:19 ` Chris Wilson
3 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2020-10-23 18:04 UTC (permalink / raw)
To: Ville Syrjala, dri-devel; +Cc: intel-gfx, stable
On 10/22/20 12:42 PM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The new >8k CEA modes have dotclocks reaching 5.94 GHz, which
> means our clock*1000 will now overflow the 32bit unsigned
> integer. Switch to 64bit maths to avoid it.
>
> Cc: stable@vger.kernel.org
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This cures the problem that I reported. Thanks.
Tested-by: Randy Dunlap <rdunlap@infradead.org>
> ---
> An interesting question how many other place might suffer from similar
> overflows. I think i915 should be mostly OK. The one place I know we use
> Hz instead kHz is the hsw DPLL code, which I would prefer we also change
> to use kHz. The other concern is whether we have any potential overflows
> before we check this against the platform's max dotclock.
>
> I do have this unreviewed igt series
> https://patchwork.freedesktop.org/series/69531/ which extends the
> current testing with some other forms of invalid modes. Could probably
> extend that with a mode.clock=INT_MAX test to see if anything else might
> trip up.
>
> No idea about other drivers.
>
> drivers/gpu/drm/drm_modes.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 501b4fe55a3d..511cde5c7fa6 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -762,7 +762,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
> if (mode->htotal == 0 || mode->vtotal == 0)
> return 0;
>
> - num = mode->clock * 1000;
> + num = mode->clock;
> den = mode->htotal * mode->vtotal;
>
> if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> @@ -772,7 +772,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
> if (mode->vscan > 1)
> den *= mode->vscan;
>
> - return DIV_ROUND_CLOSEST(num, den);
> + return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(num, 1000), den);
> }
> EXPORT_SYMBOL(drm_mode_vrefresh);
>
>
--
~Randy
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow
2020-10-22 19:42 [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow Ville Syrjala
` (2 preceding siblings ...)
2020-10-23 18:04 ` [Intel-gfx] [PATCH] " Randy Dunlap
@ 2020-10-30 14:19 ` Chris Wilson
2020-10-30 14:43 ` Ville Syrjälä
3 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2020-10-30 14:19 UTC (permalink / raw)
To: Ville Syrjala, dri-devel; +Cc: intel-gfx, Randy Dunlap, stable
Quoting Ville Syrjala (2020-10-22 20:42:56)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The new >8k CEA modes have dotclocks reaching 5.94 GHz, which
> means our clock*1000 will now overflow the 32bit unsigned
> integer. Switch to 64bit maths to avoid it.
>
> Cc: stable@vger.kernel.org
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> An interesting question how many other place might suffer from similar
> overflows. I think i915 should be mostly OK. The one place I know we use
> Hz instead kHz is the hsw DPLL code, which I would prefer we also change
> to use kHz. The other concern is whether we have any potential overflows
> before we check this against the platform's max dotclock.
>
> I do have this unreviewed igt series
> https://patchwork.freedesktop.org/series/69531/ which extends the
> current testing with some other forms of invalid modes. Could probably
> extend that with a mode.clock=INT_MAX test to see if anything else might
> trip up.
>
> No idea about other drivers.
>
> drivers/gpu/drm/drm_modes.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> index 501b4fe55a3d..511cde5c7fa6 100644
> --- a/drivers/gpu/drm/drm_modes.c
> +++ b/drivers/gpu/drm/drm_modes.c
> @@ -762,7 +762,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
> if (mode->htotal == 0 || mode->vtotal == 0)
> return 0;
>
> - num = mode->clock * 1000;
> + num = mode->clock;
> den = mode->htotal * mode->vtotal;
You don't want to promote den to u64 while you are here? We are at
8kx4k, throw in dblscan and some vscan, and we could soon have wacky
refresh rates.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow
2020-10-30 14:19 ` Chris Wilson
@ 2020-10-30 14:43 ` Ville Syrjälä
2020-11-25 19:44 ` Chris Wilson
0 siblings, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2020-10-30 14:43 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, Randy Dunlap, stable, dri-devel
On Fri, Oct 30, 2020 at 02:19:45PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjala (2020-10-22 20:42:56)
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > The new >8k CEA modes have dotclocks reaching 5.94 GHz, which
> > means our clock*1000 will now overflow the 32bit unsigned
> > integer. Switch to 64bit maths to avoid it.
> >
> > Cc: stable@vger.kernel.org
> > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > An interesting question how many other place might suffer from similar
> > overflows. I think i915 should be mostly OK. The one place I know we use
> > Hz instead kHz is the hsw DPLL code, which I would prefer we also change
> > to use kHz. The other concern is whether we have any potential overflows
> > before we check this against the platform's max dotclock.
> >
> > I do have this unreviewed igt series
> > https://patchwork.freedesktop.org/series/69531/ which extends the
> > current testing with some other forms of invalid modes. Could probably
> > extend that with a mode.clock=INT_MAX test to see if anything else might
> > trip up.
> >
> > No idea about other drivers.
> >
> > drivers/gpu/drm/drm_modes.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> > index 501b4fe55a3d..511cde5c7fa6 100644
> > --- a/drivers/gpu/drm/drm_modes.c
> > +++ b/drivers/gpu/drm/drm_modes.c
> > @@ -762,7 +762,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
> > if (mode->htotal == 0 || mode->vtotal == 0)
> > return 0;
> >
> > - num = mode->clock * 1000;
> > + num = mode->clock;
> > den = mode->htotal * mode->vtotal;
>
> You don't want to promote den to u64 while you are here? We are at
> 8kx4k, throw in dblscan and some vscan, and we could soon have wacky
> refresh rates.
i915 has 16kx8k hard limit currently, and we reject vscan>1
(wish we could also reject DBLSCAN). So we should not hit
that, at least not yet. Other drivers might not be so strict
I guess.
I have a nagging feeling that other places are in danger of
overflows if we try to push the current limits significantly.
But I guess no real harm in going full 64bit here, except
maybe making it a bit slower.
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow
2020-10-30 14:43 ` Ville Syrjälä
@ 2020-11-25 19:44 ` Chris Wilson
0 siblings, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2020-11-25 19:44 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx, Randy Dunlap, stable, dri-devel
Quoting Ville Syrjälä (2020-10-30 14:43:46)
> On Fri, Oct 30, 2020 at 02:19:45PM +0000, Chris Wilson wrote:
> > Quoting Ville Syrjala (2020-10-22 20:42:56)
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > The new >8k CEA modes have dotclocks reaching 5.94 GHz, which
> > > means our clock*1000 will now overflow the 32bit unsigned
> > > integer. Switch to 64bit maths to avoid it.
> > >
> > > Cc: stable@vger.kernel.org
> > > Reported-by: Randy Dunlap <rdunlap@infradead.org>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > > An interesting question how many other place might suffer from similar
> > > overflows. I think i915 should be mostly OK. The one place I know we use
> > > Hz instead kHz is the hsw DPLL code, which I would prefer we also change
> > > to use kHz. The other concern is whether we have any potential overflows
> > > before we check this against the platform's max dotclock.
> > >
> > > I do have this unreviewed igt series
> > > https://patchwork.freedesktop.org/series/69531/ which extends the
> > > current testing with some other forms of invalid modes. Could probably
> > > extend that with a mode.clock=INT_MAX test to see if anything else might
> > > trip up.
> > >
> > > No idea about other drivers.
> > >
> > > drivers/gpu/drm/drm_modes.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
> > > index 501b4fe55a3d..511cde5c7fa6 100644
> > > --- a/drivers/gpu/drm/drm_modes.c
> > > +++ b/drivers/gpu/drm/drm_modes.c
> > > @@ -762,7 +762,7 @@ int drm_mode_vrefresh(const struct drm_display_mode *mode)
> > > if (mode->htotal == 0 || mode->vtotal == 0)
> > > return 0;
> > >
> > > - num = mode->clock * 1000;
> > > + num = mode->clock;
> > > den = mode->htotal * mode->vtotal;
> >
> > You don't want to promote den to u64 while you are here? We are at
> > 8kx4k, throw in dblscan and some vscan, and we could soon have wacky
> > refresh rates.
>
> i915 has 16kx8k hard limit currently, and we reject vscan>1
> (wish we could also reject DBLSCAN). So we should not hit
> that, at least not yet. Other drivers might not be so strict
> I guess.
>
> I have a nagging feeling that other places are in danger of
> overflows if we try to push the current limits significantly.
> But I guess no real harm in going full 64bit here, except
> maybe making it a bit slower.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-11-25 19:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-22 19:42 [Intel-gfx] [PATCH] drm/modes: Switch to 64bit maths to avoid integer overflow Ville Syrjala
2020-10-22 20:48 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-10-22 23:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-10-23 18:04 ` [Intel-gfx] [PATCH] " Randy Dunlap
2020-10-30 14:19 ` Chris Wilson
2020-10-30 14:43 ` Ville Syrjälä
2020-11-25 19:44 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox