Home
last modified time | relevance | path

Searched refs:best (Results 1 – 25 of 57) sorted by relevance

123

/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
Dshadow.c180 }, *mthd, *best = NULL; in nvbios_shadow() local
193 best = mthd; in nvbios_shadow()
200 if (!best && (best = mthd)) { in nvbios_shadow()
206 if (!best->score) { in nvbios_shadow()
214 if (!best || !best->score) { in nvbios_shadow()
215 for (mthd = mthds, best = mthd; mthd->func; mthd++) { in nvbios_shadow()
216 if (!mthd->skip || best->score < mthd->skip) { in nvbios_shadow()
218 if (mthd->score > best->score) in nvbios_shadow()
219 best = mthd; in nvbios_shadow()
227 if (mthd != best) in nvbios_shadow()
[all …]
/drivers/usb/core/
Dgeneric.c48 struct usb_host_config *c, *best; in usb_choose_configuration() local
53 best = NULL; in usb_choose_configuration()
118 best = c; in usb_choose_configuration()
130 best = c; in usb_choose_configuration()
136 else if (!best) in usb_choose_configuration()
137 best = c; in usb_choose_configuration()
145 if (best) { in usb_choose_configuration()
146 i = best->desc.bConfigurationValue; in usb_choose_configuration()
/drivers/gpu/drm/
Ddrm_vma_manager.c146 struct drm_mm_node *node, *best; in drm_vma_offset_lookup_locked() local
151 best = NULL; in drm_vma_offset_lookup_locked()
158 best = node; in drm_vma_offset_lookup_locked()
167 if (best) { in drm_vma_offset_lookup_locked()
168 offset = best->start + best->size; in drm_vma_offset_lookup_locked()
170 best = NULL; in drm_vma_offset_lookup_locked()
173 if (!best) in drm_vma_offset_lookup_locked()
176 return container_of(best, struct drm_vma_offset_node, vm_node); in drm_vma_offset_lookup_locked()
Ddrm_mm.c509 struct drm_mm_node *best; in drm_mm_search_free_generic() local
516 best = NULL; in drm_mm_search_free_generic()
536 best = entry; in drm_mm_search_free_generic()
541 return best; in drm_mm_search_free_generic()
553 struct drm_mm_node *best; in drm_mm_search_free_in_range_generic() local
560 best = NULL; in drm_mm_search_free_in_range_generic()
583 best = entry; in drm_mm_search_free_in_range_generic()
588 return best; in drm_mm_search_free_in_range_generic()
/drivers/video/fbdev/core/
Dmodedb.c702 u32 best, diff, tdiff; in fb_find_mode() local
817 best = -1; in fb_find_mode()
827 best = i; in fb_find_mode()
831 if (best != -1) { in fb_find_mode()
832 fb_try_mode(var, info, &db[best], bpp); in fb_find_mode()
837 best = -1; in fb_find_mode()
854 best = i; in fb_find_mode()
858 if (best != -1) { in fb_find_mode()
859 fb_try_mode(var, info, &db[best], bpp); in fb_find_mode()
992 struct fb_videomode *mode, *best = NULL; in fb_find_best_mode() local
[all …]
/drivers/net/bonding/
Dbond_3ad.c1507 static struct aggregator *ad_agg_selection_test(struct aggregator *best, in ad_agg_selection_test() argument
1534 if (!best) in ad_agg_selection_test()
1537 if (!curr->is_individual && best->is_individual) in ad_agg_selection_test()
1540 if (curr->is_individual && !best->is_individual) in ad_agg_selection_test()
1541 return best; in ad_agg_selection_test()
1543 if (__agg_has_partner(curr) && !__agg_has_partner(best)) in ad_agg_selection_test()
1546 if (!__agg_has_partner(curr) && __agg_has_partner(best)) in ad_agg_selection_test()
1547 return best; in ad_agg_selection_test()
1551 if (__agg_active_ports(curr) > __agg_active_ports(best)) in ad_agg_selection_test()
1554 if (__agg_active_ports(curr) < __agg_active_ports(best)) in ad_agg_selection_test()
[all …]
/drivers/md/
Ddm-queue-length.c190 struct path_info *pi = NULL, *best = NULL; in ql_select_path() local
202 if (!best || in ql_select_path()
203 (atomic_read(&pi->qlen) < atomic_read(&best->qlen))) in ql_select_path()
204 best = pi; in ql_select_path()
206 if (!atomic_read(&best->qlen)) in ql_select_path()
210 if (!best) in ql_select_path()
213 ret = best->path; in ql_select_path()
Ddm-service-time.c277 struct path_info *pi = NULL, *best = NULL; in st_select_path() local
289 if (!best || (st_compare_load(pi, best, nr_bytes) < 0)) in st_select_path()
290 best = pi; in st_select_path()
292 if (!best) in st_select_path()
295 ret = best->path; in st_select_path()
/drivers/gpu/drm/i915/
Dintel_dpll_mgr.c586 struct hsw_wrpll_rnp *best) in hsw_wrpll_update_rnp() argument
591 if (best->p == 0) { in hsw_wrpll_update_rnp()
592 best->p = p; in hsw_wrpll_update_rnp()
593 best->n2 = n2; in hsw_wrpll_update_rnp()
594 best->r2 = r2; in hsw_wrpll_update_rnp()
613 b = freq2k * budget * best->p * best->r2; in hsw_wrpll_update_rnp()
615 diff_best = abs_diff(freq2k * best->p * best->r2, in hsw_wrpll_update_rnp()
616 LC_FREQ_2K * best->n2); in hsw_wrpll_update_rnp()
622 if (best->p * best->r2 * diff < p * r2 * diff_best) { in hsw_wrpll_update_rnp()
623 best->p = p; in hsw_wrpll_update_rnp()
[all …]
/drivers/crypto/qat/qat_common/
Dqat_crypto.c99 unsigned long best = ~0; in qat_crypto_get_instance_node() local
109 if (best > ctr) { in qat_crypto_get_instance_node()
111 best = ctr; in qat_crypto_get_instance_node()
131 best = ~0; in qat_crypto_get_instance_node()
136 if (best > ctr) { in qat_crypto_get_instance_node()
138 best = ctr; in qat_crypto_get_instance_node()
/drivers/leds/
Dleds-tca6507.c413 int best = -1;/* full-on */ in led_prepare() local
425 best = i; in led_prepare()
431 best = i; in led_prepare()
434 if (best == -1) { in led_prepare()
441 if (!tca->bank[best].level_use) in led_prepare()
442 set_level(tca, best, level); in led_prepare()
444 tca->bank[best].level_use++; in led_prepare()
445 led->bank = best; in led_prepare()
446 set_select(tca, led->num, bank_source[best]); in led_prepare()
447 led->led_cdev.brightness = TO_BRIGHT(tca->bank[best].level); in led_prepare()
/drivers/media/platform/
Dsh_vou.c522 unsigned int best_err = UINT_MAX, best = 0, img_height_max; in vou_adjust_input() local
550 best = found; in vou_adjust_input()
556 geo->in_width = best; in vou_adjust_input()
575 best = found; in vou_adjust_input()
581 geo->in_height = best; in vou_adjust_input()
591 unsigned int best_err = UINT_MAX, best = geo->in_width, in vou_adjust_output() local
619 best = found; in vou_adjust_output()
625 geo->output.width = best; in vou_adjust_output()
627 if (geo->output.left + best > width_max) in vou_adjust_output()
628 geo->output.left = width_max - best; in vou_adjust_output()
[all …]
/drivers/clk/
Dclk-multiplier.c43 unsigned long best, unsigned long flags) in __is_best_rate() argument
46 return abs(rate - new) < abs(rate - best); in __is_best_rate()
48 return new >= rate && new < best; in __is_best_rate()
Dclk-wm831x.c143 int best = 0; in wm831x_fll_round_rate() local
148 abs(wm831x_fll_auto_rates[best] - rate)) in wm831x_fll_round_rate()
149 best = i; in wm831x_fll_round_rate()
151 return wm831x_fll_auto_rates[best]; in wm831x_fll_round_rate()
Dclk-divider.c257 unsigned long best, unsigned long flags) in _is_best_div() argument
260 return abs(rate - now) < abs(rate - best); in _is_best_div()
262 return now <= rate && now > best; in _is_best_div()
284 unsigned long parent_rate, best = 0, now, maxdiv; in clk_divider_bestdiv() local
320 if (_is_best_div(rate, now, best, flags)) { in clk_divider_bestdiv()
322 best = now; in clk_divider_bestdiv()
/drivers/video/fbdev/via/
Dviamode.c357 const struct fb_videomode *best = NULL; in get_best_mode() local
364 if (!best || abs(modes[i].refresh - refresh) < in get_best_mode()
365 abs(best->refresh - refresh)) in get_best_mode()
366 best = &modes[i]; in get_best_mode()
369 return best; in get_best_mode()
/drivers/mtd/
Dftl.c606 uint32_t best; in reclaim_block() local
612 best = 0xffffffff; xfer = 0xffff; in reclaim_block()
635 if (part->XferInfo[i].EraseCount <= best) { in reclaim_block()
636 best = part->XferInfo[i].EraseCount; in reclaim_block()
666 best = 0xffffffff; in reclaim_block()
668 if (part->EUNInfo[i].EraseCount <= best) { in reclaim_block()
669 best = part->EUNInfo[i].EraseCount; in reclaim_block()
673 best = 0; in reclaim_block()
675 if (part->EUNInfo[i].Deleted >= best) { in reclaim_block()
676 best = part->EUNInfo[i].Deleted; in reclaim_block()
[all …]
/drivers/base/
Dmap.c99 unsigned long best = ~0UL; in kobj_lookup() local
110 if (p->range - 1 >= best) in kobj_lookup()
117 best = p->range - 1; in kobj_lookup()
/drivers/media/v4l2-core/
Dv4l2-common.c380 const struct v4l2_frmsize_discrete *size, *best = NULL; in v4l2_find_nearest_format() local
383 return best; in v4l2_find_nearest_format()
389 best = size; in v4l2_find_nearest_format()
395 return best; in v4l2_find_nearest_format()
/drivers/block/paride/
Dparide.c277 int best, range; in pi_probe_mode() local
290 best = -1; in pi_probe_mode()
299 best = pi->mode; in pi_probe_mode()
301 pi->mode = best; in pi_probe_mode()
302 return (best > -1); in pi_probe_mode()
/drivers/clk/sunxi/
Dclk-sun9i-cpus.c116 unsigned long parent_rate, best = 0, child_rate, best_child_rate = 0; in sun9i_a80_cpus_clk_determine_rate() local
135 best = parent_rate; in sun9i_a80_cpus_clk_determine_rate()
144 req->best_parent_rate = best; in sun9i_a80_cpus_clk_determine_rate()
/drivers/rtc/
Drtc-ac100.c179 unsigned long best = 0; in ac100_clkout_determine_rate() local
190 if (req->rate - tmp < req->rate - best) { in ac100_clkout_determine_rate()
191 best = tmp; in ac100_clkout_determine_rate()
196 if (!best) in ac100_clkout_determine_rate()
200 req->best_parent_rate = best; in ac100_clkout_determine_rate()
201 req->rate = best; in ac100_clkout_determine_rate()
/drivers/gpu/drm/radeon/
Dradeon_sa.c252 unsigned i, soffset, best, tmp; in radeon_sa_bo_next_hole() local
263 best = sa_manager->size * 2; in radeon_sa_bo_next_hole()
293 if (tmp < best) { in radeon_sa_bo_next_hole()
295 best = tmp; in radeon_sa_bo_next_hole()
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_sa.c251 unsigned i, soffset, best, tmp; in amdgpu_sa_bo_next_hole() local
262 best = sa_manager->size * 2; in amdgpu_sa_bo_next_hole()
291 if (tmp < best) { in amdgpu_sa_bo_next_hole()
293 best = tmp; in amdgpu_sa_bo_next_hole()
/drivers/net/wan/
Dixp4xx_hss.c1189 u32 *best, u32 *best_diff, u32 *reg) in check_clock() argument
1200 *best = new_rate; in check_clock()
1207 static void find_best_clock(u32 rate, u32 *best, u32 *reg) in find_best_clock() argument
1214 check_clock(rate, 0x3FF, 1, 1, best, &diff, reg); in find_best_clock()
1223 check_clock(rate, a - 1, 1, 1, best, &diff, reg); in find_best_clock()
1233 !check_clock(rate, a - 1, 1, 1, best, &diff, reg)) in find_best_clock()
1235 check_clock(rate, a, b, 0xFFF, best, &diff, reg); in find_best_clock()
1238 if (!check_clock(rate, a, b, c, best, &diff, reg)) in find_best_clock()
1240 if (!check_clock(rate, a, b, c + 1, best, &diff, reg)) in find_best_clock()

123