drm: i915: remove timeval users
Subsystems (2)
PATCH 1/1 drm: i915: remove timeval users
struct timeval is deprecated because it cannot represent times past 2038. In this driver, the only use of this structure is to capture debug information. This is easily changed to ktime_t, which we then format as needed when printing it later.
--- drivers/gpu/drm/i915/i915_drv.h | 6 +++--- drivers/gpu/drm/i915/i915_gpu_error.c | 25 ++++++++++++++----------- 2 files changed, 17 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +3 -3
@@ -896,9 +896,9 @@ struct intel_display_error_state;struct i915_gpu_state {struct kref ref; -struct timeval time; -struct timeval boottime; -struct timeval uptime; +ktime_t time; +ktime_t boottime; +ktime_t uptime;struct drm_i915_private *i915;
drivers/gpu/drm/i915/i915_gpu_error.c +14 -11
@@ -594,6 +594,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m, {struct drm_i915_private *dev_priv = m->i915;struct drm_i915_error_object *obj; +struct timespec64 ts;int i, j;if (!error) {
@@ -604,12 +605,15 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,if (*error->error_msg)err_printf (m,"%s\n" , error->error_msg);err_printf (m,"Kernel: " UTS_RELEASE "\n" ); -err_printf (m,"Time: %ld s %ld us\n" , - error->time.tv_sec, error->time.tv_usec); -err_printf (m,"Boottime: %ld s %ld us\n" , - error->boottime.tv_sec, error->boottime.tv_usec); -err_printf (m,"Uptime: %ld s %ld us\n" , - error->uptime.tv_sec, error->uptime.tv_usec); + ts =ktime_to_timespec64 (error->time); +err_printf (m,"Time: %lld s %ld us\n" , + (s64 )ts.tv_sec, ts.tv_nsec /NSEC_PER_USEC ); + ts =ktime_to_timespec64 (error->boottime); +err_printf (m,"Boottime: %lld s %ld us\n" , + (s64 )ts.tv_sec, ts.tv_nsec /NSEC_PER_USEC ); + ts =ktime_to_timespec64 (error->uptime); +err_printf (m,"Uptime: %lld s %ld us\n" , + (s64 )ts.tv_sec, ts.tv_nsec /NSEC_PER_USEC );for (i =0 ; i <ARRAY_SIZE (error->engine); i++) { if (error->engine[i].hangcheck_stalled &&
@@ -1699,11 +1703,10 @@ static int capture(void *data) {struct i915_gpu_state *error = data; -do_gettimeofday (&error->time); - error->boottime =ktime_to_timeval (ktime_get_boottime ()); - error->uptime = -ktime_to_timeval (ktime_sub (ktime_get (), - error->i915->gt.last_init_time)); + error->time =ktime_get_real (); + error->boottime =ktime_get_boottime (); + error->uptime =ktime_sub (ktime_get (), + error->i915->gt.last_init_time); error->params = i915_modparams;#define DUP (T , x, ...) dup_param(#T, &error->params.x);
Signature · 6 lines
2.9.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm: i915: remove timeval users
== Series Details ==
== Series Details ==
Series: drm: i915: remove timeval users
URL : https://patchwork.freedesktop.org/series/33147/
State : failure
== Summary ==
Series 33147v1 drm: i915: remove timeval users
https://patchwork.freedesktop.org/api/1.0/series/33147/revisions/1/mbox/
Test chamelium:
Subgroup dp-crc-fast:
pass -> FAIL (fi-kbl-7500u) fdo#102514
Test gem_basic:
Subgroup create-close:
dmesg-warn -> PASS (fi-cfl-s)
Subgroup create-fd-close:
dmesg-warn -> PASS (fi-cfl-s)
Test gem_exec_reloc:
Subgroup basic-write-cpu-active:
pass -> FAIL (fi-gdg-551)
Test kms_cursor_legacy:
Subgroup basic-flip-after-cursor-legacy:
pass -> SKIP (fi-hsw-4770r)
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-c-frame-sequence:
pass -> DMESG-WARN (fi-skl-6700k)
Subgroup read-crc-pipe-a:
pass -> INCOMPLETE (fi-skl-6700k)
Subgroup read-crc-pipe-b:
pass -> SKIP (fi-hsw-4770r)
Subgroup read-crc-pipe-c:
dmesg-warn -> PASS (fi-bsw-n3050)
Subgroup read-crc-pipe-c-frame-sequence:
pass -> INCOMPLETE (fi-cnl-y)fdo#102514 https://bugs.freedesktop.org/show_bug.cgi?id=102514
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:440s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:456s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:381s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:541s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:275s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:508s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:511s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:519s fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:490s fi-cfl-s total:289 pass:254 dwarn:3 dfail:0 fail:0 skip:32 time:561s fi-cnl-y total:244 pass:219 dwarn:0 dfail:0 fail:0 skip:24 fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:431s fi-gdg-551 total:289 pass:177 dwarn:1 dfail:0 fail:2 skip:109 time:260s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:593s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:429s fi-hsw-4770r total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:438s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:431s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:496s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:465s fi-kbl-7500u total:289 pass:263 dwarn:1 dfail:0 fail:1 skip:24 time:481s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:582s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:481s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:586s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:569s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:457s fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:593s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:647s fi-skl-6700k total:239 pass:217 dwarn:1 dfail:0 fail:0 skip:20 fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:502s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:462s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:568s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:416s
8b0ae6b50a229dc661a02f4034252ee854cc9b83 drm-tip: 2017y-11m-03d-17h-15m-57s UTC integration manifest ee005a5bc201 drm: i915: remove timeval users
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6951/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm: i915: remove timeval users
In reply to Arnd Bergmann== Series Details ==
== Series Details ==
Series: drm: i915: remove timeval users
URL : https://patchwork.freedesktop.org/series/33147/
State : failure
== Summary ==
Series 33147v1 drm: i915: remove timeval users
https://patchwork.freedesktop.org/api/1.0/series/33147/revisions/1/mbox/
Test kms_addfb_basic:
Subgroup bad-pitch-32:
pass -> FAIL (fi-glk-dsi)
Subgroup bad-pitch-63:
pass -> INCOMPLETE (fi-glk-dsi)
Test kms_flip:
Subgroup basic-plain-flip:
pass -> INCOMPLETE (fi-cnl-y)
Test kms_frontbuffer_tracking:
Subgroup basic:
pass -> INCOMPLETE (fi-cfl-s)
Test kms_pipe_crc_basic:
Subgroup read-crc-pipe-b-frame-sequence:
pass -> SKIP (fi-hsw-4770r) fdo#102332fdo#102332 https://bugs.freedesktop.org/show_bug.cgi?id=102332
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:445s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:455s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:380s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:542s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:276s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:511s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:497s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:504s fi-cfl-s total:225 pass:199 dwarn:0 dfail:0 fail:0 skip:25 fi-cnl-y total:220 pass:199 dwarn:0 dfail:0 fail:0 skip:20 fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:427s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:263s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:591s fi-glk-dsi total:182 pass:158 dwarn:0 dfail:0 fail:1 skip:22 fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:434s fi-hsw-4770r total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:440s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:436s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:502s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:464s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:576s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:482s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:589s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:574s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:457s fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:593s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:650s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:518s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:506s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:467s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:577s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:421s
fi-byt-n2820 failed to connect after reboot
9cc9686b44e192d2561a513f84d5ac95518cad73 drm-tip: 2017y-11m-06d-10h-10m-17s UTC integration manifest 815e64ed395b drm: i915: remove timeval users
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6971/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm: i915: remove timeval users
In reply to Arnd Bergmann== Series Details ==
== Series Details ==
Series: drm: i915: remove timeval users
URL : https://patchwork.freedesktop.org/series/33147/
State : failure
== Summary ==
Series 33147v1 drm: i915: remove timeval users
https://patchwork.freedesktop.org/api/1.0/series/33147/revisions/1/mbox/
Test kms_frontbuffer_tracking:
Subgroup basic:
pass -> INCOMPLETE (fi-cfl-s)
Test kms_pipe_crc_basic:
Subgroup read-crc-pipe-b-frame-sequence:
pass -> SKIP (fi-hsw-4770r) fdo#102332fdo#102332 https://bugs.freedesktop.org/show_bug.cgi?id=102332
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:445s fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:455s fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:380s fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:542s fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:276s fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:511s fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:497s fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:504s fi-cfl-s total:225 pass:199 dwarn:0 dfail:0 fail:0 skip:25 fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:427s fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:263s fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:591s fi-hsw-4770 total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:434s fi-hsw-4770r total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:440s fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:436s fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:502s fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:464s fi-kbl-7560u total:289 pass:270 dwarn:0 dfail:0 fail:0 skip:19 time:576s fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:482s fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:589s fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:574s fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:457s fi-skl-6600u total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:593s fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:650s fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:518s fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:506s fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:467s fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:577s fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:421s Blacklisted hosts: fi-cnl-y total:220 pass:199 dwarn:0 dfail:0 fail:0 skip:20 fi-glk-dsi total:182 pass:158 dwarn:0 dfail:0 fail:1 skip:22
fi-byt-n2820 failed to connect after reboot
9cc9686b44e192d2561a513f84d5ac95518cad73 drm-tip: 2017y-11m-06d-10h-10m-17s UTC integration manifest 815e64ed395b drm: i915: remove timeval users
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6971/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: failure for drm: i915: remove timeval users
Quoted 6 lines · Patchwork
== Series Details ==
Series: drm: i915: remove timeval users
URL : https://patchwork.freedesktop.org/series/33147/
State : failure
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6971/
Can someone explain to me what to make of the test results for my patch?
I received three mails that all sound like there is something seriously wrong with my patch. It's possible that this is the case, but I don't see anything I did related to what I find in the test report.
Are there known false-positives that would explain it, or do I have to look harder?
Arnd
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: failure for drm: i915: remove timeval users
Quoted 9 lines · Arnd Bergmann
Quoted 6 lines · Patchwork
== Series Details ==
Series: drm: i915: remove timeval users
URL : https://patchwork.freedesktop.org/series/33147/
State : failure
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6971/
Quoted 8 lines
Can someone explain to me what to make of the test results for my patch?
I received three mails that all sound like there is something seriously wrong with my patch. It's possible that this is the case, but I don't see anything I did related to what I find in the test report.
Are there known false-positives that would explain it, or do I have to look harder?
CI on fire, sorry about the noise. It unfortunately still happens too often, which is why we don't inflict it on the general unsuspecting public, but just people who submit stuff to intel-gfx. -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines · Chris Wilson
Quoting Arnd Bergmann (2017-11-03 19:53:52)
Quoted 6 lines
struct timeval is deprecated because it cannot represent times past 2038. In this driver, the only use of this structure is to capture debug information. This is easily changed to
ktime_t, which we then format as needed when printing it later.Signed-off-by Arnd Bergmann <[email protected]>
I just noticed this hasn't gone in yet.
Quoted 11 lines
drivers/gpu/drm/i915/i915_gpu_error.c int i915_error_state_to_str(struct drm_i915_error_state_buf *m, · line 616
Quoted 7 lines
drivers/gpu/drm/i915/i915_gpu_error.c +7
-0+ (s64)ts.tv_sec, ts.tv_nsec / NSEC_PER_USEC); + ts =ktime_to_timespec64 (error->boottime); +err_printf (m,"Boottime: %lld s %ld us\n" , + (s64 )ts.tv_sec, ts.tv_nsec /NSEC_PER_USEC ); + ts =ktime_to_timespec64 (error->uptime); +err_printf (m,"Uptime: %lld s %ld us\n" , + (s64 )ts.tv_sec, ts.tv_nsec /NSEC_PER_USEC );We could just change it to ns, nothing that I know of parses those field except us robots. (It's just to try and alert us in case this hang is likely following a device reset.)
Right, but it is used in a sysfs file, so I think it's better to not change it. The i915_error_state_to_str() function is only called when we actually look at the output, so it's not performance critical.
Quoted 1 line
Reviewed-by Chris Wilson <[email protected]>
Thanks! I'll resend the patch unchanged in case it helps getting it in now.
Arnd