Commit dd166fbd authored by Chris Wilson's avatar Chris Wilson Committed by Jani Nikula

drm/i915: Nul-terminate legacy debug string

Make sure that when we don't have any scheduler attributes for the
request, the string is terminated.

Fixes: 247870ac ("drm/i915: Build request info on stack before printk")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180517152824.11619-1-chris@chris-wilson.co.uk
(cherry picked from commit 96d4f03c)
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 315852b4
...@@ -1114,7 +1114,7 @@ static void print_request(struct drm_printer *m, ...@@ -1114,7 +1114,7 @@ static void print_request(struct drm_printer *m,
const char *prefix) const char *prefix)
{ {
const char *name = rq->fence.ops->get_timeline_name(&rq->fence); const char *name = rq->fence.ops->get_timeline_name(&rq->fence);
char buf[80]; char buf[80] = "";
int x = 0; int x = 0;
x = print_sched_attr(rq->i915, &rq->sched.attr, buf, x, sizeof(buf)); x = print_sched_attr(rq->i915, &rq->sched.attr, buf, x, sizeof(buf));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment