Hi Ander,

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20161111]
[cannot apply to v4.9-rc4]
[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/Ander-Conselvan-de-Oliveira/drm-i915-glk-Reuse-broxton-code-for-geminilake/20161111-215001
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-randconfig-x006-201645 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/agp_backend.h:33,
                    from include/drm/drmP.h:35,
                    from drivers/gpu/drm/i915/intel_mocs.h:52,
                    from drivers/gpu/drm/i915/intel_mocs.c:23:
   drivers/gpu/drm/i915/intel_mocs.c: In function 'get_mocs_settings':
>> drivers/gpu/drm/i915/intel_mocs.c:185:13: error: implicit declaration of 
>> function 'IS_GEN9_LP' [-Werror=implicit-function-declaration]
     } else if (IS_GEN9_LP(dev_priv)) {
                ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/intel_mocs.c:185:9: note: in expansion of macro 'if'
     } else if (IS_GEN9_LP(dev_priv)) {
            ^~
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/i915_reg.h:i915_mmio_reg_offset
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_ringbuffer.h:intel_ring_emit
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_ringbuffer.h:intel_ring_emit_reg
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_ringbuffer.h:intel_ring_advance
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/i915_drv.h:to_i915
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_mocs.c:l3cc_combine
   Cyclomatic Complexity 9 drivers/gpu/drm/i915/intel_mocs.c:mocs_register
   Cyclomatic Complexity 23 drivers/gpu/drm/i915/intel_mocs.c:get_mocs_settings
   Cyclomatic Complexity 9 
drivers/gpu/drm/i915/intel_mocs.c:emit_mocs_control_table
   Cyclomatic Complexity 11 
drivers/gpu/drm/i915/intel_mocs.c:emit_mocs_l3cc_table
   Cyclomatic Complexity 8 
drivers/gpu/drm/i915/intel_mocs.c:intel_mocs_init_engine
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_mocs.c:intel_mocs_init_l3cc_table
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_mocs.c:intel_rcs_context_init_mocs
   cc1: all warnings being treated as errors
--
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/drm/drm_dp_helper.h:26,
                    from drivers/gpu/drm/i915/intel_bios.c:28:
   drivers/gpu/drm/i915/intel_bios.c: In function 
'intel_bios_is_port_hpd_inverted':
>> drivers/gpu/drm/i915/intel_bios.c:1768:20: error: implicit declaration of 
>> function 'IS_GEN9_LP' [-Werror=implicit-function-declaration]
     if (WARN_ON_ONCE(!IS_GEN9_LP(dev_priv)))
                       ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/intel_bios.c:1768:2: note: in expansion of macro 'if'
     if (WARN_ON_ONCE(!IS_GEN9_LP(dev_priv)))
     ^~
>> drivers/gpu/drm/i915/i915_drv.h:95:25: note: in expansion of macro 
>> 'WARN_ONCE'
    #define WARN_ON_ONCE(x) WARN_ONCE((x), "%s", "WARN_ON_ONCE(" __stringify(x) 
")")
                            ^~~~~~~~~
>> drivers/gpu/drm/i915/intel_bios.c:1768:6: note: in expansion of macro 
>> 'WARN_ON_ONCE'
     if (WARN_ON_ONCE(!IS_GEN9_LP(dev_priv)))
         ^~~~~~~~~~~~
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
   Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
   Cyclomatic Complexity 56 include/linux/slab.h:kmalloc_index
   Cyclomatic Complexity 67 include/linux/slab.h:kmalloc_large
   Cyclomatic Complexity 9 include/linux/slab.h:kmalloc
   Cyclomatic Complexity 17 include/linux/slab.h:kmalloc_array
   Cyclomatic Complexity 1 include/linux/slab.h:kcalloc
   Cyclomatic Complexity 1 include/linux/slab.h:kzalloc
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_bios.c:get_lvds_dvo_timing
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_ssc_frequency
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_bios.c:child_device_ptr
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_bios.c:get_bdb_header
   Cyclomatic Complexity 9 drivers/gpu/drm/i915/intel_bios.c:_get_blocksize
   Cyclomatic Complexity 6 drivers/gpu/drm/i915/intel_bios.c:find_section
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_bios.c:get_blocksize
   Cyclomatic Complexity 11 drivers/gpu/drm/i915/intel_bios.c:get_lvds_fp_timing
   Cyclomatic Complexity 4 drivers/gpu/drm/i915/intel_bios.c:init_vbt_defaults
   Cyclomatic Complexity 11 
drivers/gpu/drm/i915/intel_bios.c:parse_general_features
   Cyclomatic Complexity 11 
drivers/gpu/drm/i915/intel_bios.c:parse_lfp_backlight
   Cyclomatic Complexity 25 
drivers/gpu/drm/i915/intel_bios.c:parse_sdvo_device_mapping
   Cyclomatic Complexity 7 
drivers/gpu/drm/i915/intel_bios.c:parse_driver_features
   Cyclomatic Complexity 25 drivers/gpu/drm/i915/intel_bios.c:parse_edp
   Cyclomatic Complexity 7 drivers/gpu/drm/i915/intel_bios.c:parse_psr
   Cyclomatic Complexity 14 
drivers/gpu/drm/i915/intel_bios.c:find_panel_sequence_block
   Cyclomatic Complexity 11 
drivers/gpu/drm/i915/intel_bios.c:goto_next_sequence_v3
   Cyclomatic Complexity 11 drivers/gpu/drm/i915/intel_bios.c:goto_next_sequence
   Cyclomatic Complexity 8 drivers/gpu/drm/i915/intel_bios.c:sanitize_ddc_pin
   Cyclomatic Complexity 8 drivers/gpu/drm/i915/intel_bios.c:sanitize_aux_ch
   Cyclomatic Complexity 3 drivers/gpu/drm/i915/intel_bios.c:translate_iboost
   Cyclomatic Complexity 89 drivers/gpu/drm/i915/intel_bios.c:parse_ddi_port
   Cyclomatic Complexity 8 drivers/gpu/drm/i915/intel_bios.c:parse_ddi_ports
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_bios.c:parse_general_definitions
   Cyclomatic Complexity 9 
drivers/gpu/drm/i915/intel_bios.c:fill_detail_timing_data
   Cyclomatic Complexity 28 
drivers/gpu/drm/i915/intel_bios.c:parse_lfp_panel_data
   Cyclomatic Complexity 11 
drivers/gpu/drm/i915/intel_bios.c:parse_sdvo_panel_data
   Cyclomatic Complexity 35 
drivers/gpu/drm/i915/intel_bios.c:parse_device_mapping
   Cyclomatic Complexity 21 
drivers/gpu/drm/i915/intel_bios.c:parse_mipi_sequence
   Cyclomatic Complexity 11 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_is_valid_vbt
   Cyclomatic Complexity 4 drivers/gpu/drm/i915/intel_bios.c:find_vbt
   Cyclomatic Complexity 9 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_is_tv_present
   Cyclomatic Complexity 17 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_is_lvds_present
   Cyclomatic Complexity 21 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_is_port_present
   Cyclomatic Complexity 12 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_is_port_edp
   Cyclomatic Complexity 17 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_is_port_dp_dual_mode
   Cyclomatic Complexity 8 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_is_dsi_present
   Cyclomatic Complexity 16 drivers/gpu/drm/i915/intel_bios.c:parse_mipi_config
   Cyclomatic Complexity 11 drivers/gpu/drm/i915/intel_bios.c:intel_bios_init
   Cyclomatic Complexity 26 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_is_port_hpd_inverted
   Cyclomatic Complexity 18 
drivers/gpu/drm/i915/intel_bios.c:intel_bios_is_lspcon_present
   cc1: all warnings being treated as errors
--
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/dmi.h:4,
                    from drivers/gpu/drm/i915/intel_display.c:27:
   drivers/gpu/drm/i915/intel_display.c: In function 'intel_PLL_is_valid':
>> drivers/gpu/drm/i915/intel_display.c:617:35: error: implicit declaration of 
>> function 'IS_GEN9_LP' [-Werror=implicit-function-declaration]
         !IS_CHERRYVIEW(dev_priv) && !IS_GEN9_LP(dev_priv))
                                      ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
   drivers/gpu/drm/i915/intel_display.c:616:2: note: in expansion of macro 'if'
     if (!IS_PINEVIEW(dev_priv) && !IS_VALLEYVIEW(dev_priv) &&
     ^~
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 5 include/linux/compiler.h:__write_once_size
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:ffs
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls
   Cyclomatic Complexity 1 include/linux/bitops.h:fls_long
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32
   Cyclomatic Complexity 3 include/linux/log2.h:is_power_of_2
   Cyclomatic Complexity 1 include/linux/log2.h:__roundup_pow_of_two
   Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
   Cyclomatic Complexity 1 include/linux/list.h:list_empty
   Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
   Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR
   Cyclomatic Complexity 2 include/linux/err.h:IS_ERR
   Cyclomatic Complexity 1 include/linux/err.h:ERR_CAST
   Cyclomatic Complexity 2 include/linux/err.h:PTR_ERR_OR_ZERO
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_read
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_set
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_sub_and_test
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_inc
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_dec
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_add_return
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_cmpxchg
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_or
   Cyclomatic Complexity 5 arch/x86/include/asm/atomic.h:__atomic_add_unless
   Cyclomatic Complexity 1 include/linux/atomic.h:atomic_add_unless
   Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
   Cyclomatic Complexity 1 include/linux/jump_label.h:static_key_count
   Cyclomatic Complexity 2 include/linux/jump_label.h:static_key_false
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_save_flags
   Cyclomatic Complexity 1 
arch/x86/include/asm/paravirt.h:arch_local_irq_restore
   Cyclomatic Complexity 1 
arch/x86/include/asm/paravirt.h:arch_local_irq_disable
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_enable
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_irq_save
   Cyclomatic Complexity 3 arch/x86/include/asm/div64.h:div_u64_rem
   Cyclomatic Complexity 1 include/linux/math64.h:div_u64
   Cyclomatic Complexity 1 
arch/x86/include/asm/irqflags.h:arch_irqs_disabled_flags
   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 include/linux/mutex.h:mutex_is_locked
   Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:preempt_count
   Cyclomatic Complexity 8 arch/x86/include/asm/preempt.h:__preempt_count_add
   Cyclomatic Complexity 1 
arch/x86/include/asm/preempt.h:__preempt_count_dec_and_test
   Cyclomatic Complexity 1 arch/x86/include/asm/preempt.h:should_resched
   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 2 include/linux/spinlock.h:spin_unlock
   Cyclomatic Complexity 2 include/linux/spinlock.h:spin_unlock_irq
   Cyclomatic Complexity 3 include/linux/spinlock.h:spin_unlock_irqrestore
   Cyclomatic Complexity 3 include/linux/seqlock.h:__read_seqcount_begin
   Cyclomatic Complexity 1 include/linux/seqlock.h:raw_read_seqcount_begin
   Cyclomatic Complexity 1 include/linux/seqlock.h:read_seqcount_begin
   Cyclomatic Complexity 2 include/linux/seqlock.h:__read_seqcount_retry
   Cyclomatic Complexity 1 include/linux/seqlock.h:read_seqcount_retry
   Cyclomatic Complexity 1 include/linux/wait.h:waitqueue_active
   Cyclomatic Complexity 1 include/linux/jiffies.h:_msecs_to_jiffies
   Cyclomatic Complexity 5 include/linux/jiffies.h:msecs_to_jiffies
   Cyclomatic Complexity 1 include/linux/jiffies.h:_usecs_to_jiffies
   Cyclomatic Complexity 4 include/linux/jiffies.h:usecs_to_jiffies
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_lock
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_unlock
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_read_lock_sched_notrace
   Cyclomatic Complexity 2 
include/linux/rcupdate.h:rcu_read_unlock_sched_notrace
   Cyclomatic Complexity 9 include/linux/idr.h:idr_find
   Cyclomatic Complexity 13 include/linux/kref.h:kref_get
   Cyclomatic Complexity 5 include/linux/kref.h:kref_sub
   Cyclomatic Complexity 1 include/linux/kref.h:kref_put
   Cyclomatic Complexity 1 include/linux/kref.h:kref_get_unless_zero
   Cyclomatic Complexity 1 include/linux/workqueue.h:queue_work
   Cyclomatic Complexity 1 include/linux/workqueue.h:flush_scheduled_work
   Cyclomatic Complexity 1 include/linux/sched.h:local_clock
   Cyclomatic Complexity 56 include/linux/slab.h:kmalloc_index
   Cyclomatic Complexity 67 include/linux/slab.h:kmalloc_large
   Cyclomatic Complexity 9 include/linux/slab.h:kmalloc
   Cyclomatic Complexity 1 include/linux/slab.h:kzalloc
   Cyclomatic Complexity 1 arch/x86/include/asm/io.h:outb
   Cyclomatic Complexity 1 arch/x86/include/asm/io.h:inb
   Cyclomatic Complexity 1 include/linux/vgaarb.h:vga_get_uninterruptible
   Cyclomatic Complexity 1 include/linux/pci.h:pci_read_config_word
   Cyclomatic Complexity 1 include/linux/pci.h:pci_write_config_word
   Cyclomatic Complexity 3 include/linux/dma-fence.h:dma_fence_put
   Cyclomatic Complexity 3 include/linux/dma-fence.h:dma_fence_get
   Cyclomatic Complexity 5 include/linux/dma-fence.h:dma_fence_is_signaled
   Cyclomatic Complexity 1 include/linux/ww_mutex.h:ww_mutex_is_locked
   Cyclomatic Complexity 1 include/drm/drm_modeset_lock.h:drm_modeset_is_locked
   Cyclomatic Complexity 1 include/drm/drm_rect.h:drm_rect_width
   Cyclomatic Complexity 1 include/drm/drm_rect.h:drm_rect_height
   Cyclomatic Complexity 1 
include/drm/drm_framebuffer.h:drm_framebuffer_reference
   Cyclomatic Complexity 1 
include/drm/drm_framebuffer.h:drm_framebuffer_unreference
   Cyclomatic Complexity 1 include/drm/drm_connector.h:drm_connector_index
   Cyclomatic Complexity 1 include/drm/drm_connector.h:drm_connector_reference
--
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/async.h:15,
                    from drivers/gpu/drm/i915/intel_drv.h:28,
                    from drivers/gpu/drm/i915/intel_dpll_mgr.c:24:
   drivers/gpu/drm/i915/intel_dpll_mgr.c: In function 'intel_shared_dpll_init':
>> drivers/gpu/drm/i915/intel_dpll_mgr.c:1864:11: error: implicit declaration 
>> of function 'IS_GEN9_LP' [-Werror=implicit-function-declaration]
     else if (IS_GEN9_LP(dev_priv))
              ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/i915/intel_dpll_mgr.c:1864:7: note: in expansion of macro 
>> 'if'
     else if (IS_GEN9_LP(dev_priv))
          ^~
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_save_flags
   Cyclomatic Complexity 3 arch/x86/include/asm/div64.h:div_u64_rem
   Cyclomatic Complexity 1 include/linux/math64.h:div_u64
   Cyclomatic Complexity 1 
arch/x86/include/asm/irqflags.h:arch_irqs_disabled_flags
   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:preempt_count
   Cyclomatic Complexity 1 include/linux/jiffies.h:_usecs_to_jiffies
   Cyclomatic Complexity 4 include/linux/jiffies.h:usecs_to_jiffies
   Cyclomatic Complexity 1 include/drm/drm_crtc.h:drm_crtc_index
   Cyclomatic Complexity 4 include/drm/drmP.h:drm_can_sleep
   Cyclomatic Complexity 2 drivers/gpu/drm/i915/i915_drv.h:onoff
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/i915_drv.h:to_i915
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_drv.h:enc_to_dig_port
   Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_drv.h:enc_to_mst
   Cyclomatic Complexity 3 
drivers/gpu/drm/i915/intel_dpll_mgr.c:ibx_pch_dpll_mode_set
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_wrpll_disable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_spll_disable
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_wrpll_get_budget_for_freq
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_lcpll_enable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_lcpll_disable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_lcpll_get_hw_state
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_pll_write_ctrl1
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_dpll0_enable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_pll_disable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_dpll0_disable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:bxt_ddi_pll_disable
   Cyclomatic Complexity 4 
drivers/gpu/drm/i915/intel_dpll_mgr.c:bxt_ddi_dp_pll_dividers
   Cyclomatic Complexity 33 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_wrpll_update_rnp
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_calculate_wrpll
   Cyclomatic Complexity 39 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_wrpll_get_multipliers
   Cyclomatic Complexity 18 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_wrpll_params_populate
   Cyclomatic Complexity 23 
drivers/gpu/drm/i915/intel_dpll_mgr.c:bxt_ddi_set_dpll_hw_state
   Cyclomatic Complexity 15 
drivers/gpu/drm/i915/intel_dpll_mgr.c:ibx_assert_pch_refclk_enabled
   Cyclomatic Complexity 7 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_ddi_pll_init
   Cyclomatic Complexity 9 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_find_shared_dpll
   Cyclomatic Complexity 3 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_hdmi_get_dpll
   Cyclomatic Complexity 5 
drivers/gpu/drm/i915/intel_dpll_mgr.c:ibx_pch_dpll_get_hw_state
   Cyclomatic Complexity 2 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_spll_get_hw_state
   Cyclomatic Complexity 2 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_wrpll_get_hw_state
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_pll_get_hw_state
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_dpll0_get_hw_state
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_dpll_mgr.c:ibx_pch_dpll_disable
   Cyclomatic Complexity 5 
drivers/gpu/drm/i915/intel_dpll_mgr.c:ibx_pch_dpll_enable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_spll_enable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_wrpll_enable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_wrpll_context_init
   Cyclomatic Complexity 5 
drivers/gpu/drm/i915/intel_dpll_mgr.c:bxt_ddi_hdmi_pll_dividers
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:bxt_ddi_hdmi_set_dpll_hw_state
   Cyclomatic Complexity 5 
drivers/gpu/drm/i915/intel_dpll_mgr.c:bxt_ddi_pll_get_hw_state
   Cyclomatic Complexity 11 
drivers/gpu/drm/i915/intel_dpll_mgr.c:bxt_ddi_pll_enable
   Cyclomatic Complexity 20 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_wrpll_try_divider
   Cyclomatic Complexity 16 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_calculate_wrpll
   Cyclomatic Complexity 2 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_hdmi_pll_dividers
   Cyclomatic Complexity 2 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_pll_enable
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_get_shared_dpll_by_id
   Cyclomatic Complexity 7 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_get_shared_dpll_id
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_shared_dpll_config_get
   Cyclomatic Complexity 3 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_reference_shared_dpll
   Cyclomatic Complexity 5 drivers/gpu/drm/i915/intel_dpll_mgr.c:ibx_get_dpll
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_shared_dpll_config_put
   Cyclomatic Complexity 12 
drivers/gpu/drm/i915/intel_dpll_mgr.c:assert_shared_dpll
   Cyclomatic Complexity 13 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_prepare_shared_dpll
   Cyclomatic Complexity 22 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_enable_shared_dpll
   Cyclomatic Complexity 13 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_disable_shared_dpll
   Cyclomatic Complexity 3 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_shared_dpll_commit
   Cyclomatic Complexity 6 
drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_ddi_dp_get_dpll
   Cyclomatic Complexity 22 drivers/gpu/drm/i915/intel_dpll_mgr.c:hsw_get_dpll
   Cyclomatic Complexity 7 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_ddi_dp_set_dpll_hw_state
   Cyclomatic Complexity 11 
drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_find_link_pll
   Cyclomatic Complexity 22 drivers/gpu/drm/i915/intel_dpll_mgr.c:skl_get_dpll
   Cyclomatic Complexity 1 
drivers/gpu/drm/i915/intel_dpll_mgr.c:bxt_ddi_dp_set_dpll_hw_state
   Cyclomatic Complexity 9 drivers/gpu/drm/i915/intel_dpll_mgr.c:bxt_get_dpll
   Cyclomatic Complexity 17 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_shared_dpll_init
   Cyclomatic Complexity 5 
drivers/gpu/drm/i915/intel_dpll_mgr.c:intel_get_shared_dpll
   cc1: all warnings being treated as errors
..

vim +/IS_GEN9_LP +185 drivers/gpu/drm/i915/intel_mocs.c

    17   * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 
OTHER
    18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
ARISING FROM,
    19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
DEALINGS IN THE
    20   * SOFTWARE.
    21   */
    22  
  > 23  #include "intel_mocs.h"
    24  #include "intel_lrc.h"
    25  #include "intel_ringbuffer.h"
    26  
    27  /* structures required */
    28  struct drm_i915_mocs_entry {
    29          u32 control_value;
    30          u16 l3cc_value;
    31  };
    32  
    33  struct drm_i915_mocs_table {
    34          u32 size;
    35          const struct drm_i915_mocs_entry *table;
    36  };
    37  
    38  /* Defines for the tables (XXX_MOCS_0 - XXX_MOCS_63) */
    39  #define LE_CACHEABILITY(value)  ((value) << 0)
    40  #define LE_TGT_CACHE(value)     ((value) << 2)
    41  #define LE_LRUM(value)          ((value) << 4)
    42  #define LE_AOM(value)           ((value) << 6)
    43  #define LE_RSC(value)           ((value) << 7)
    44  #define LE_SCC(value)           ((value) << 8)
    45  #define LE_PFM(value)           ((value) << 11)
    46  #define LE_SCF(value)           ((value) << 14)
    47  
    48  /* Defines for the tables (LNCFMOCS0 - LNCFMOCS31) - two entries per 
word */
    49  #define L3_ESC(value)           ((value) << 0)
    50  #define L3_SCC(value)           ((value) << 1)
    51  #define L3_CACHEABILITY(value)  ((value) << 4)
    52  
    53  /* Helper defines */
    54  #define GEN9_NUM_MOCS_ENTRIES   62  /* 62 out of 64 - 63 & 64 are 
reserved. */
    55  
    56  /* (e)LLC caching options */
    57  #define LE_PAGETABLE            0
    58  #define LE_UC                   1
    59  #define LE_WT                   2
    60  #define LE_WB                   3
    61  
    62  /* L3 caching options */
    63  #define L3_DIRECT               0
    64  #define L3_UC                   1
    65  #define L3_RESERVED             2
    66  #define L3_WB                   3
    67  
    68  /* Target cache */
    69  #define LE_TC_PAGETABLE         0
    70  #define LE_TC_LLC               1
    71  #define LE_TC_LLC_ELLC          2
    72  #define LE_TC_LLC_ELLC_ALT      3
    73  
    74  /*
    75   * MOCS tables
    76   *
    77   * These are the MOCS tables that are programmed across all the rings.
    78   * The control value is programmed to all the rings that support the
    79   * MOCS registers. While the l3cc_values are only programmed to the
    80   * LNCFCMOCS0 - LNCFCMOCS32 registers.
    81   *
    82   * These tables are intended to be kept reasonably consistent across
    83   * platforms. However some of the fields are not applicable to all of
    84   * them.
    85   *
    86   * Entries not part of the following tables are undefined as far as
    87   * userspace is concerned and shouldn't be relied upon.  For the time
    88   * being they will be implicitly initialized to the strictest caching
    89   * configuration (uncached) to guarantee forwards compatibility with
    90   * userspace programs written against more recent kernels providing
    91   * additional MOCS entries.
    92   *
    93   * NOTE: These tables MUST start with being uncached and the length
    94   *       MUST be less than 63 as the last two registers are reserved
    95   *       by the hardware.  These tables are part of the kernel ABI and
    96   *       may only be updated incrementally by adding entries at the
    97   *       end.
    98   */
    99  static const struct drm_i915_mocs_entry skylake_mocs_table[] = {
   100          [I915_MOCS_UNCACHED] = {
   101            /* 0x00000009 */
   102            .control_value = LE_CACHEABILITY(LE_UC) |
   103                             LE_TGT_CACHE(LE_TC_LLC_ELLC) |
   104                             LE_LRUM(0) | LE_AOM(0) | LE_RSC(0) | 
LE_SCC(0) |
   105                             LE_PFM(0) | LE_SCF(0),
   106  
   107            /* 0x0010 */
   108            .l3cc_value =    L3_ESC(0) | L3_SCC(0) | 
L3_CACHEABILITY(L3_UC),
   109          },
   110          [I915_MOCS_PTE] = {
   111            /* 0x00000038 */
   112            .control_value = LE_CACHEABILITY(LE_PAGETABLE) |
   113                             LE_TGT_CACHE(LE_TC_LLC_ELLC) |
   114                             LE_LRUM(3) | LE_AOM(0) | LE_RSC(0) | 
LE_SCC(0) |
   115                             LE_PFM(0) | LE_SCF(0),
   116            /* 0x0030 */
   117            .l3cc_value =    L3_ESC(0) | L3_SCC(0) | 
L3_CACHEABILITY(L3_WB),
   118          },
   119          [I915_MOCS_CACHED] = {
   120            /* 0x0000003b */
   121            .control_value = LE_CACHEABILITY(LE_WB) |
   122                             LE_TGT_CACHE(LE_TC_LLC_ELLC) |
   123                             LE_LRUM(3) | LE_AOM(0) | LE_RSC(0) | 
LE_SCC(0) |
   124                             LE_PFM(0) | LE_SCF(0),
   125            /* 0x0030 */
   126            .l3cc_value =   L3_ESC(0) | L3_SCC(0) | 
L3_CACHEABILITY(L3_WB),
   127          },
   128  };
   129  
   130  /* NOTE: the LE_TGT_CACHE is not used on Broxton */
   131  static const struct drm_i915_mocs_entry broxton_mocs_table[] = {
   132          [I915_MOCS_UNCACHED] = {
   133            /* 0x00000009 */
   134            .control_value = LE_CACHEABILITY(LE_UC) |
   135                             LE_TGT_CACHE(LE_TC_LLC_ELLC) |
   136                             LE_LRUM(0) | LE_AOM(0) | LE_RSC(0) | 
LE_SCC(0) |
   137                             LE_PFM(0) | LE_SCF(0),
   138  
   139            /* 0x0010 */
   140            .l3cc_value =    L3_ESC(0) | L3_SCC(0) | 
L3_CACHEABILITY(L3_UC),
   141          },
   142          [I915_MOCS_PTE] = {
   143            /* 0x00000038 */
   144            .control_value = LE_CACHEABILITY(LE_PAGETABLE) |
   145                             LE_TGT_CACHE(LE_TC_LLC_ELLC) |
   146                             LE_LRUM(3) | LE_AOM(0) | LE_RSC(0) | 
LE_SCC(0) |
   147                             LE_PFM(0) | LE_SCF(0),
   148  
   149            /* 0x0030 */
   150            .l3cc_value =    L3_ESC(0) | L3_SCC(0) | 
L3_CACHEABILITY(L3_WB),
   151          },
   152          [I915_MOCS_CACHED] = {
   153            /* 0x00000039 */
   154            .control_value = LE_CACHEABILITY(LE_UC) |
   155                             LE_TGT_CACHE(LE_TC_LLC_ELLC) |
   156                             LE_LRUM(3) | LE_AOM(0) | LE_RSC(0) | 
LE_SCC(0) |
   157                             LE_PFM(0) | LE_SCF(0),
   158  
   159            /* 0x0030 */
   160            .l3cc_value =    L3_ESC(0) | L3_SCC(0) | 
L3_CACHEABILITY(L3_WB),
   161          },
   162  };
   163  
   164  /**
   165   * get_mocs_settings()
   166   * @dev_priv:   i915 device.
   167   * @table:      Output table that will be made to point at appropriate
   168   *            MOCS values for the device.
   169   *
   170   * This function will return the values of the MOCS table that needs to
   171   * be programmed for the platform. It will return the values that need
   172   * to be programmed and if they need to be programmed.
   173   *
   174   * Return: true if there are applicable MOCS settings for the device.
   175   */
   176  static bool get_mocs_settings(struct drm_i915_private *dev_priv,
   177                                struct drm_i915_mocs_table *table)
   178  {
   179          bool result = false;
   180  
   181          if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) {
   182                  table->size  = ARRAY_SIZE(skylake_mocs_table);
   183                  table->table = skylake_mocs_table;
   184                  result = true;
 > 185          } else if (IS_GEN9_LP(dev_priv)) {
   186                  table->size  = ARRAY_SIZE(broxton_mocs_table);
   187                  table->table = broxton_mocs_table;
   188                  result = true;

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to