tree:   git://anongit.freedesktop.org/drm-intel drm-intel-next-queued
head:   9f58892ea9962002399132fd3f40c6a273f8d9e1
commit: 9f58892ea9962002399132fd3f40c6a273f8d9e1 [2/2] drm/i915: Pull all the 
reset functionality together into i915_reset.c
config: i386-randconfig-x007-201903 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
reproduce:
        git checkout 9f58892ea9962002399132fd3f40c6a273f8d9e1
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from include/linux/sched/mm.h:5,
                    from drivers/gpu//drm/i915/i915_reset.c:7:
   drivers/gpu//drm/i915/i915_reset.c: In function 'reset_request':
>> drivers/gpu//drm/i915/i915_reset.c:689:13: error: format '%lld' expects 
>> argument of type 'long long int', but argument 5 has type 'unsigned int' 
>> [-Werror=format=]
      GEM_TRACE("%s pardoned global=%d (fence %llx:%lld), current %d\n",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:691:25:
         rq->fence.context, rq->fence.seqno,
                            ~~~~~~~~~~~~~~~
   include/linux/kernel.h:683:33: note: in definition of macro 
'__trace_printk_check_format'
      ____trace_printk_check_format(fmt, ##args);  \
                                    ^~~
   include/linux/kernel.h:720:3: note: in expansion of macro 'do_trace_printk'
      do_trace_printk(fmt, ##__VA_ARGS__); \
      ^~~~~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_gem.h:66:24: note: in expansion of macro 
'trace_printk'
    #define GEM_TRACE(...) trace_printk(__VA_ARGS__)
                           ^~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:689:3: note: in expansion of macro 
'GEM_TRACE'
      GEM_TRACE("%s pardoned global=%d (fence %llx:%lld), current %d\n",
      ^~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:689:13: error: format '%lld' expects 
argument of type 'long long int', but argument 6 has type 'unsigned int' 
[-Werror=format=]
      GEM_TRACE("%s pardoned global=%d (fence %llx:%lld), current %d\n",
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:691:25:
         rq->fence.context, rq->fence.seqno,
                            ~~~~~~~~~~~~~~~
   include/linux/kernel.h:736:29: note: in definition of macro 'do_trace_printk'
      __trace_printk(_THIS_IP_, fmt, ##args);   \
                                ^~~
   drivers/gpu//drm/i915/i915_gem.h:66:24: note: in expansion of macro 
'trace_printk'
    #define GEM_TRACE(...) trace_printk(__VA_ARGS__)
                           ^~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:689:3: note: in expansion of macro 
'GEM_TRACE'
      GEM_TRACE("%s pardoned global=%d (fence %llx:%lld), current %d\n",
      ^~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c: In function 'nop_submit_request':
   drivers/gpu//drm/i915/i915_reset.c:804:12: error: format '%lld' expects 
argument of type 'long long int', but argument 4 has type 'unsigned int' 
[-Werror=format=]
     GEM_TRACE("%s fence %llx:%lld -> -EIO\n",
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:806:29:
        request->fence.context, request->fence.seqno);
                                ~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:683:33: note: in definition of macro 
'__trace_printk_check_format'
      ____trace_printk_check_format(fmt, ##args);  \
                                    ^~~
   include/linux/kernel.h:720:3: note: in expansion of macro 'do_trace_printk'
      do_trace_printk(fmt, ##__VA_ARGS__); \
      ^~~~~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_gem.h:66:24: note: in expansion of macro 
'trace_printk'
    #define GEM_TRACE(...) trace_printk(__VA_ARGS__)
                           ^~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:804:2: note: in expansion of macro 
'GEM_TRACE'
     GEM_TRACE("%s fence %llx:%lld -> -EIO\n",
     ^~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:804:12: error: format '%lld' expects 
argument of type 'long long int', but argument 5 has type 'unsigned int' 
[-Werror=format=]
     GEM_TRACE("%s fence %llx:%lld -> -EIO\n",
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:806:29:
        request->fence.context, request->fence.seqno);
                                ~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:736:29: note: in definition of macro 'do_trace_printk'
      __trace_printk(_THIS_IP_, fmt, ##args);   \
                                ^~~
   drivers/gpu//drm/i915/i915_gem.h:66:24: note: in expansion of macro 
'trace_printk'
    #define GEM_TRACE(...) trace_printk(__VA_ARGS__)
                           ^~~~~~~~~~~~
   drivers/gpu//drm/i915/i915_reset.c:804:2: note: in expansion of macro 
'GEM_TRACE'
     GEM_TRACE("%s fence %llx:%lld -> -EIO\n",
     ^~~~~~~~~
   cc1: all warnings being treated as errors

vim +689 drivers/gpu//drm/i915/i915_reset.c

   659  
   660  /* Returns the request if it was guilty of the hang */
   661  static struct i915_request *
   662  reset_request(struct intel_engine_cs *engine,
   663                struct i915_request *rq,
   664                bool stalled)
   665  {
   666          /*
   667           * The guilty request will get skipped on a hung engine.
   668           *
   669           * Users of client default contexts do not rely on logical
   670           * state preserved between batches so it is safe to execute
   671           * queued requests following the hang. Non default contexts
   672           * rely on preserved state, so skipping a batch loses the
   673           * evolution of the state and it needs to be considered 
corrupted.
   674           * Executing more queued batches on top of corrupted state is
   675           * risky. But we take the risk by trying to advance through
   676           * the queued requests in order to make the client behaviour
   677           * more predictable around resets, by not throwing away random
   678           * amount of batches it has prepared for execution. 
Sophisticated
   679           * clients can use gem_reset_stats_ioctl and dma fence status
   680           * (exported via sync_file info ioctl on explicit fences) to 
observe
   681           * when it loses the context state and should rebuild 
accordingly.
   682           *
   683           * The context ban, and ultimately the client ban, mechanism 
are safety
   684           * valves if client submission ends up resulting in nothing 
more than
   685           * subsequent hangs.
   686           */
   687  
   688          if (i915_request_completed(rq)) {
 > 689                  GEM_TRACE("%s pardoned global=%d (fence %llx:%lld), 
 > current %d\n",
   690                            engine->name, rq->global_seqno,
   691                            rq->fence.context, rq->fence.seqno,
   692                            intel_engine_get_seqno(engine));
   693                  stalled = false;
   694          }
   695  
   696          if (stalled) {
   697                  context_mark_guilty(rq->gem_context);
   698                  i915_request_skip(rq, -EIO);
   699  
   700                  /* If this context is now banned, skip all pending 
requests. */
   701                  if (i915_gem_context_is_banned(rq->gem_context))
   702                          engine_skip_context(rq);
   703          } else {
   704                  /*
   705                   * Since this is not the hung engine, it may have 
advanced
   706                   * since the hang declaration. Double check by refinding
   707                   * the active request at the time of the reset.
   708                   */
   709                  rq = i915_gem_find_active_request(engine);
   710                  if (rq) {
   711                          unsigned long flags;
   712  
   713                          context_mark_innocent(rq->gem_context);
   714                          dma_fence_set_error(&rq->fence, -EAGAIN);
   715  
   716                          /* Rewind the engine to replay the incomplete 
rq */
   717                          spin_lock_irqsave(&engine->timeline.lock, 
flags);
   718                          rq = list_prev_entry(rq, link);
   719                          if (&rq->link == &engine->timeline.requests)
   720                                  rq = NULL;
   721                          spin_unlock_irqrestore(&engine->timeline.lock, 
flags);
   722                  }
   723          }
   724  
   725          return rq;
   726  }
   727  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to