drm/i915/dp: Add a helper function to return DP link rate index
Subsystems (2)
PATCH 1/1 drm/i915/dp: Add a helper function to return DP link rate index
Common rates array is used to keep track of common rates supported between DP sink and source. This helper function returns the index of a specific link rate in this common rates array.
This is in prep with patches for DP Link training compliance tests that need an index for the link rate specified by the test as well as for link training failure handling patches that require index of fallback link rate.
--- drivers/gpu/drm/i915/intel_dp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/gpu/drm/i915/intel_dp.c +15 -0
@@ -288,6 +288,21 @@ static int intel_dp_common_rates(struct intel_dp *intel_dp, common_rates); } +static int intel_dp_link_rate_index (struct intel_dp *intel_dp, +int *common_rates,int link_rate) +{ +int common_len; +int index; + + common_len =intel_dp_common_rates (intel_dp, common_rates); +for (index =0 ; index < common_len; index++) { +if (link_rate == common_rates[common_len - index -1 ]) +return common_len - index -1 ; + } + +return -1 ; +} +static enum drm_mode_status intel_dp_mode_valid (struct drm_connector *connector,struct drm_display_mode *mode)
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/dp: Add a helper function to return DP link rate index
== Series Details ==
== Series Details ==
Series: drm/i915/dp: Add a helper function to return DP link rate index
URL : https://patchwork.freedesktop.org/series/15689/
State : failure
== Summary ==
CC [M] drivers/gpu/drm/i915/intel_tv.o
LD sound/pci/built-in.o
CC [M] drivers/gpu/drm/i915/i915_gpu_error.o
CC [M] drivers/gpu/drm/i915/gvt/gvt.o
CC [M] drivers/gpu/drm/i915/i915_vgpu.o
CC [M] drivers/gpu/drm/i915/intel_gvt.o
CC [M] drivers/gpu/drm/i915/gvt/aperture_gm.o
CC [M] drivers/gpu/drm/i915/gvt/vgpu.o
CC [M] drivers/gpu/drm/i915/gvt/handlers.o
LD drivers/iommu/built-in.o
CC [M] drivers/gpu/drm/i915/gvt/trace_points.o
CC [M] drivers/gpu/drm/i915/gvt/cfg_space.o
CC [M] drivers/gpu/drm/i915/gvt/opregion.o
CC [M] drivers/gpu/drm/i915/gvt/firmware.o
CC [M] drivers/gpu/drm/i915/gvt/gtt.o
CC [M] drivers/gpu/drm/i915/gvt/interrupt.o
CC [M] drivers/gpu/drm/i915/gvt/mmio.o
CC [M] drivers/gpu/drm/i915/gvt/display.o
CC [M] drivers/gpu/drm/i915/gvt/execlist.o
LD net/packet/built-in.o
CC [M] drivers/gpu/drm/i915/gvt/edid.o
CC [M] drivers/gpu/drm/i915/gvt/scheduler.o
CC [M] drivers/gpu/drm/i915/gvt/sched_policy.o
CC [M] drivers/gpu/drm/i915/gvt/cmd_parser.o
CC [M] drivers/gpu/drm/i915/gvt/render.o
LD drivers/tty/serial/8250/8250.o
LD drivers/pci/pcie/aer/aerdriver.o
LD drivers/pci/pcie/aer/built-in.o
LD drivers/pci/pcie/built-in.o
LD sound/built-in.o
LD drivers/usb/gadget/libcomposite.o
LD drivers/gpu/drm/drm.o
LD drivers/spi/built-in.o
LD drivers/thermal/thermal_sys.o
LD drivers/thermal/built-in.o
LD drivers/pci/built-in.o
LD net/xfrm/built-in.o
LD drivers/video/fbdev/core/fb.o
LD drivers/video/fbdev/core/built-in.o
LD drivers/usb/gadget/udc/udc-core.o
LD drivers/usb/gadget/udc/built-in.o
LD drivers/usb/gadget/built-in.o
LD drivers/acpi/acpica/acpi.o
LD drivers/scsi/sd_mod.o
LD drivers/scsi/built-in.o
LD drivers/acpi/acpica/built-in.o
LD net/ipv6/ipv6.o
LD drivers/acpi/built-in.o
LD net/ipv6/built-in.o
LD fs/btrfs/btrfs.o
LD drivers/tty/serial/8250/8250_base.o
LD drivers/tty/serial/8250/built-in.o
drivers/gpu/drm/i915/intel_dp.c:291:12: error: ‘intel_dp_link_rate_index’ defined but not used [-Werror=unused-function]
static int intel_dp_link_rate_index(struct intel_dp *intel_dp,
^
LD drivers/tty/serial/built-in.o
LD drivers/video/fbdev/built-in.o
LD drivers/video/console/built-in.o
LD fs/btrfs/built-in.o
AR lib/lib.a
LD drivers/video/built-in.o
EXPORTS lib/lib-ksyms.o
LD drivers/usb/core/usbcore.o
LD drivers/usb/core/built-in.o
LD [M] drivers/net/ethernet/intel/igbvf/igbvf.o
LD drivers/usb/host/xhci-hcd.o
LD lib/built-in.o
LD drivers/tty/vt/built-in.o
LD drivers/tty/built-in.o
CC arch/x86/kernel/cpu/capflags.o
LD arch/x86/kernel/cpu/built-in.o
LD drivers/md/md-mod.o
LD arch/x86/kernel/built-in.o
LD drivers/md/built-in.o
LD net/ipv4/built-in.o
LD drivers/usb/host/built-in.o
LD drivers/usb/built-in.o
LD arch/x86/built-in.o
LD net/core/built-in.o
LD [M] drivers/net/ethernet/intel/e1000/e1000.o
LD net/built-in.o
LD [M] drivers/net/ethernet/intel/igb/igb.o
LD fs/ext4/ext4.o
LD fs/ext4/built-in.o
LD fs/built-in.occ1: all warnings being treated as errorsscripts/Makefile.build:293: recipe for target 'drivers/gpu/drm/i915/intel_dp.o' failed make[4]: *** [drivers/gpu/drm/i915/intel_dp.o] Error 1
make[4]: *** Waiting for unfinished jobs....
LD [M] drivers/net/ethernet/intel/e1000e/e1000e.o LD drivers/net/ethernet/built-in.o LD drivers/net/built-in.o
scripts/Makefile.build:544: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2 scripts/Makefile.build:544: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2 scripts/Makefile.build:544: recipe for target 'drivers/gpu' failed make[1]: *** [drivers/gpu] Error 2
Makefile:986: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
kbuild test robot
build botreproduce:
Hi Manasi,
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on next-20161117]
[cannot apply to v4.9-rc6]
[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/Manasi-Navare/drm-i915-dp-Add-a-helper-function-to-return-DP-link-rate-index/20161122-073517 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-randconfig-x000-201647 (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=x86_64
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/i915/intel_dp.c:291:12: error: 'intel_dp_link_rate_index' defined but not used [-Werror=unused-function]
static int intel_dp_link_rate_index(struct intel_dp *intel_dp,
^~~~~~~~~~~~~~~~~~~~~~~~
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:ffs
Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64
Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64
Cyclomatic Complexity 1 include/linux/list.h:INIT_LIST_HEAD
Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR
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/atomic.h:atomic_read
Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_save_flags 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 1 include/linux/jiffies.h:_msecs_to_jiffies
Cyclomatic Complexity 3 include/linux/jiffies.h:msecs_to_jiffies
Cyclomatic Complexity 1 include/linux/jiffies.h:_usecs_to_jiffies
Cyclomatic Complexity 3 include/linux/jiffies.h:usecs_to_jiffies
Cyclomatic Complexity 2 include/linux/ktime.h:ktime_divns
Cyclomatic Complexity 1 include/linux/ktime.h:ktime_to_ms
Cyclomatic Complexity 1 include/linux/ktime.h:ktime_ms_delta
Cyclomatic Complexity 1 include/linux/timekeeping.h:ktime_get_boottime Cyclomatic Complexity 1 include/linux/workqueue.h:to_delayed_work
Cyclomatic Complexity 1 include/linux/workqueue.h:__init_work
Cyclomatic Complexity 1 include/linux/workqueue.h:queue_delayed_work Cyclomatic Complexity 1 include/linux/workqueue.h:schedule_delayed_work Cyclomatic Complexity 1 include/linux/kasan.h:kasan_kmalloc
Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
Cyclomatic Complexity 1 include/linux/slab.h:kmem_cache_alloc_trace Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_order_trace
Cyclomatic Complexity 68 include/linux/slab.h:kmalloc_large
Cyclomatic Complexity 5 include/linux/slab.h:kmalloc
Cyclomatic Complexity 1 include/linux/slab.h:kzalloc
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 3 include/drm/drmP.h:drm_can_sleep
Cyclomatic Complexity 1 include/drm/drm_modeset_helper_vtables.h:drm_connector_helper_add Cyclomatic Complexity 1 drivers/gpu/drm/i915/i915_reg.h:i915_mmio_reg_offset Cyclomatic Complexity 2 drivers/gpu/drm/i915/i915_drv.h:yesno
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/i915_drv.h:intel_info
Cyclomatic Complexity 1 drivers/gpu/drm/i915/i915_drv.h:msecs_to_jiffies_timeout Cyclomatic Complexity 5 drivers/gpu/drm/i915/i915_drv.h:wait_remaining_ms_from_jiffies Cyclomatic Complexity 1 include/drm/drm_dp_helper.h:drm_dp_max_lane_count Cyclomatic Complexity 3 include/drm/drm_dp_helper.h:drm_dp_enhanced_frame_cap Cyclomatic Complexity 3 include/drm/drm_dp_helper.h:drm_dp_tps3_supported Cyclomatic Complexity 1 include/drm/drm_dp_helper.h:drm_dp_is_branch Cyclomatic Complexity 1 include/drm/drm_dp_helper.h:drm_dp_dpcd_readb Cyclomatic Complexity 1 include/drm/drm_dp_helper.h:drm_dp_dpcd_writeb Cyclomatic Complexity 2 drivers/gpu/drm/i915/intel_drv.h:vlv_pipe_to_channel Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_drv.h:intel_get_crtc_for_pipe Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_drv.h:intel_attached_encoder 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_intel_dp Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_drv.h:dp_to_dig_port Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_drv.h:intel_crtc_has_type Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_drv.h:intel_wait_for_vblank Cyclomatic Complexity 2 drivers/gpu/drm/i915/intel_drv.h:intel_wait_for_vblank_if_active Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_drv.h:intel_dp_unused_lane_mask Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:is_edp
Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:intel_dp_to_dev Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:intel_attached_dp Cyclomatic Complexity 2 drivers/gpu/drm/i915/intel_dp.c:intel_dp_max_lane_count Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:intel_dp_link_required Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:intel_dp_max_data_rate Cyclomatic Complexity 3 drivers/gpu/drm/i915/intel_dp.c:intel_dp_unpack_aux Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:vlv_pipe_has_pp_on Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:vlv_pipe_has_vdd_on Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:vlv_pipe_any Cyclomatic Complexity 4 drivers/gpu/drm/i915/intel_dp.c:vlv_initial_pps_pipe Cyclomatic Complexity 2 drivers/gpu/drm/i915/intel_dp.c:g4x_get_aux_clock_divider Cyclomatic Complexity 3 drivers/gpu/drm/i915/intel_dp.c:ilk_get_aux_clock_divider Cyclomatic Complexity 5 drivers/gpu/drm/i915/intel_dp.c:hsw_get_aux_clock_divider Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:skl_get_aux_clock_divider Cyclomatic Complexity 5 drivers/gpu/drm/i915/intel_dp.c:g4x_get_aux_send_ctl Cyclomatic Complexity 2 drivers/gpu/drm/i915/intel_dp.c:skl_get_aux_send_ctl Cyclomatic Complexity 8 drivers/gpu/drm/i915/intel_dp.c:intel_dp_set_clock Cyclomatic Complexity 3 drivers/gpu/drm/i915/intel_dp.c:rate_to_index Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:wait_backlight_on Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:edp_wait_backlight_off Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:edp_panel_vdd_schedule_off Cyclomatic Complexity 7 drivers/gpu/drm/i915/intel_dp.c:gen4_signal_levels Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:intel_dp_autotest_link_training Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:intel_dp_autotest_video_pattern Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:intel_dp_autotest_phy_pattern Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_dp.c:intel_dp_init_panel_power_timestamps Cyclomatic Complexity 3 drivers/gpu/drm/i915/intel_dp.c:intel_dp_max_link_bw Cyclomatic Complexity 2 drivers/gpu/drm/i915/intel_dp.c:intel_dp_sink_rates Cyclomatic Complexity 6 drivers/gpu/drm/i915/intel_dp.c:intersect_rates Cyclomatic Complexity 6 drivers/gpu/drm/i915/intel_dp.c:ibx_digital_port_connected Cyclomatic Complexity 7 drivers/gpu/drm/i915/intel_dp.c:cpt_digital_port_connected Cyclomatic Complexity 5 drivers/gpu/drm/i915/intel_dp.c:gm45_digital_port_connected Cyclomatic Complexity 5 drivers/gpu/drm/i915/intel_dp.c:g4x_digital_port_connected Cyclomatic Complexity 3 drivers/gpu/drm/i915/intel_dp.c:skl_aux_ctl_reg
vim +/intel_dp_link_rate_index +291 drivers/gpu/drm/i915/intel_dp.c
285
286 return intersect_rates(source_rates, source_len,
287 sink_rates, sink_len,
288 common_rates);
289 }
290
> 291 static int intel_dp_link_rate_index(struct intel_dp *intel_dp,
292 int *common_rates, int link_rate)
293 {
294 int common_len;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 9 lines · Manasi Navare
Common rates array is used to keep track of common rates supported between DP sink and source. This helper function returns the index of a specific link rate in this common rates array.
This is in prep with patches for DP Link training compliance tests that need an index for the link rate specified by the test as well as for link training failure handling patches that require index of fallback link rate.
I'm not a fan of adding functions that are not used in prep patches.
BR,
Jani.
Quoted 35 lines
Cc Jani Nikula <[email protected]>Cc Daniel Vetter <[email protected]>Cc Ville Syrjala <[email protected]>Signed-off-by Manasi Navare <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)drivers/gpu/drm/i915/intel_dp.c +15
-0@@ -288,6 +288,21 @@ static int intel_dp_common_rates(struct intel_dp *intel_dp, common_rates); } +static int intel_dp_link_rate_index (struct intel_dp *intel_dp, +int *common_rates,int link_rate) +{ +int common_len; +int index; + + common_len =intel_dp_common_rates (intel_dp, common_rates); +for (index =0 ; index < common_len; index++) { +if (link_rate == common_rates[common_len - index -1 ]) +return common_len - index -1 ; + } + +return -1 ; +} +static enum drm_mode_status intel_dp_mode_valid (struct drm_connector *connector,struct drm_display_mode *mode)
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx