[Intel-gfx] [PATCH 2/4] drm/i915: Update render power clock state configuration for given context

kbuild test robot lkp at intel.com
Sat Sep 22 19:13:25 UTC 2018


Hi Praveen,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v4.19-rc4 next-20180921]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/kedar-j-karanje-intel-com/drm-i915-Get-active-pending-request-for-given-context/20180923-012250
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-x014-201838 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/i915/intel_lrc.c: In function 'execlists_update_context':
>> drivers/gpu//drm/i915/intel_lrc.c:452:26: error: unused variable 'engine' [-Werror=unused-variable]
     struct intel_engine_cs *engine = rq->engine;
                             ^~~~~~
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_read
   Cyclomatic Complexity 1 include/linux/kasan-checks.h:kasan_check_write
   Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:set_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__set_bit
   Cyclomatic Complexity 2 arch/x86/include/asm/bitops.h:clear_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__clear_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:test_and_set_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:__test_and_set_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:variable_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/arch_hweight.h:__arch_hweight32
   Cyclomatic Complexity 1 arch/x86/include/asm/arch_hweight.h:__arch_hweight8
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_read
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_dec
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_add_return
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_sub_return
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_read
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_dec
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_inc_return
   Cyclomatic Complexity 1 include/asm-generic/atomic-instrumented.h:atomic_dec_return
   Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
   Cyclomatic Complexity 1 include/linux/list.h:__list_add_valid
   Cyclomatic Complexity 1 include/linux/list.h:__list_del_entry_valid
   Cyclomatic Complexity 2 include/linux/list.h:__list_add
   Cyclomatic Complexity 1 include/linux/list.h:list_add
   Cyclomatic Complexity 1 include/linux/list.h:list_add_tail
   Cyclomatic Complexity 1 include/linux/list.h:__list_del
   Cyclomatic Complexity 2 include/linux/list.h:__list_del_entry
   Cyclomatic Complexity 1 include/linux/list.h:list_move_tail
   Cyclomatic Complexity 1 include/linux/list.h:list_empty
   Cyclomatic Complexity 1 arch/x86/include/asm/current.h:get_current
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 1 include/linux/err.h:IS_ERR
   Cyclomatic Complexity 3 include/linux/err.h:IS_ERR_OR_NULL
   Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:rep_nop
   Cyclomatic Complexity 1 arch/x86/include/asm/processor.h:cpu_relax
   Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:should_resched
   Cyclomatic Complexity 1 include/linux/lockdep.h:lock_is_held
   Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock_irq
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irq
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irqrestore
   Cyclomatic Complexity 1 arch/x86/include/asm/io.h:readl
   Cyclomatic Complexity 1 arch/x86/include/asm/io.h:writel
   Cyclomatic Complexity 1 include/linux/rbtree.h:rb_link_node
   Cyclomatic Complexity 1 include/linux/seqlock.h:raw_write_seqcount_begin
   Cyclomatic Complexity 1 include/linux/seqlock.h:raw_write_seqcount_end
   Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqcount_begin_nested
   Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqcount_begin
   Cyclomatic Complexity 1 include/linux/seqlock.h:write_seqcount_end
   Cyclomatic Complexity 1 include/linux/seqlock.h:__write_seqlock_irqsave
   Cyclomatic Complexity 1 include/linux/seqlock.h:write_sequnlock_irqrestore
   Cyclomatic Complexity 1 include/linux/jiffies.h:_msecs_to_jiffies
   Cyclomatic Complexity 3 include/linux/jiffies.h:msecs_to_jiffies
   Cyclomatic Complexity 3 include/linux/ktime.h:ktime_compare
   Cyclomatic Complexity 1 include/linux/ktime.h:ktime_after
   Cyclomatic Complexity 1 include/linux/completion.h:__init_completion
   Cyclomatic Complexity 3 include/linux/mmzone.h:__nr_to_section
   Cyclomatic Complexity 1 include/linux/mmzone.h:__section_mem_map_addr
   Cyclomatic Complexity 1 include/linux/kref.h:kref_get
   Cyclomatic Complexity 2 include/linux/kref.h:kref_put
   Cyclomatic Complexity 2 include/linux/interrupt.h:tasklet_unlock_wait
   Cyclomatic Complexity 2 include/linux/interrupt.h:tasklet_schedule
   Cyclomatic Complexity 2 include/linux/interrupt.h:tasklet_hi_schedule
   Cyclomatic Complexity 1 include/linux/mm.h:page_to_section
   Cyclomatic Complexity 1 include/linux/mm.h:lowmem_page_address
   Cyclomatic Complexity 1 include/linux/uaccess.h:pagefault_disabled_inc
   Cyclomatic Complexity 1 include/linux/uaccess.h:pagefault_disabled_dec
   Cyclomatic Complexity 1 include/linux/uaccess.h:pagefault_disable
   Cyclomatic Complexity 1 include/linux/uaccess.h:pagefault_enable
   Cyclomatic Complexity 1 include/linux/highmem.h:kmap_atomic
   Cyclomatic Complexity 2 include/linux/highmem.h:__kunmap_atomic
   Cyclomatic Complexity 2 include/linux/dma-fence.h:dma_fence_put
   Cyclomatic Complexity 2 include/linux/dma-fence.h:dma_fence_get
   Cyclomatic Complexity 3 include/linux/dma-fence.h:dma_fence_set_error
   Cyclomatic Complexity 1 include/drm/drm_print.h:drm_debug_printer
   Cyclomatic Complexity 1 include/drm/drm_mm.h:drm_mm_node_allocated
   Cyclomatic Complexity 1 include/drm/drm_gem.h:drm_gem_object_get
   Cyclomatic Complexity 1 include/drm/drm_gem.h:__drm_gem_object_put
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_reg.h:i915_mmio_reg_offset
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_utils.h:__list_del_many
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/i915_gem.h:__tasklet_disable_sync_once
   Cyclomatic Complexity 2 drivers/gpu//drm/i915/i915_gem.h:__tasklet_enable_sync_once
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_gem.h:__tasklet_is_enabled
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_sw_fence.h:i915_sw_fence_done
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_request.h:dma_fence_is_i915
   Cyclomatic Complexity 4 drivers/gpu//drm/i915/i915_request.h:to_request
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_request.h:i915_request_get
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_request.h:i915_request_put
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_request.h:i915_request_global_seqno
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_request.h:i915_seqno_passed
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/i915_timeline.h:i915_timeline_put
   Cyclomatic Complexity 1 drivers/gpu//drm/i915/intel_ringbuffer.h:intel_engine_has_preemption

vim +/engine +452 drivers/gpu//drm/i915/intel_lrc.c

   447	
   448	static u64 execlists_update_context(struct i915_request *rq)
   449	{
   450		struct intel_context *ce = rq->hw_context;
   451		struct i915_gem_context *ctx = rq->gem_context;
 > 452		struct intel_engine_cs *engine = rq->engine;
   453		struct i915_hw_ppgtt *ppgtt =
   454			rq->gem_context->ppgtt ?: rq->i915->mm.aliasing_ppgtt;
   455		u32 *reg_state = ce->lrc_reg_state;
   456		u32 rpcs_config = 0;
   457	
   458		reg_state[CTX_RING_TAIL+1] = intel_ring_set_tail(rq->ring, rq->tail);
   459		if (ctx->pid && ctx->name && (rq->engine->id == RCS) &&
   460				ctx->update_render_config) {
   461			rpcs_config = get_context_rpcs_config(ctx);
   462			reg_state[CTX_LRI_HEADER_2] = MI_LOAD_REGISTER_IMM(1);
   463			CTX_REG(reg_state, CTX_R_PWR_CLK_STATE, GEN8_R_PWR_CLK_STATE,
   464					rpcs_config);
   465			ctx->update_render_config = 0;
   466		}
   467	
   468		/* True 32b PPGTT with dynamic page allocation: update PDP
   469		 * registers and point the unallocated PDPs to scratch page.
   470		 * PML4 is allocated during ppgtt init, so this is not needed
   471		 * in 48-bit mode.
   472		 */
   473		if (ppgtt && !i915_vm_is_48bit(&ppgtt->vm))
   474			execlists_update_context_pdps(ppgtt, reg_state);
   475	
   476		return ce->lrc_desc;
   477	}
   478	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35871 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20180923/3c25528d/attachment-0001.gz>


More information about the Intel-gfx mailing list