Lines Matching refs:temp1_fp
330 s64 temp1_fp, temp2_fp, temp3_fp; in msm_dp_panel_update_tu_timings() local
345 temp1_fp = drm_fixp_from_fraction(2, 1); in msm_dp_panel_update_tu_timings()
346 tu->pclk_fp = drm_fixp_div(tu->pclk_fp, temp1_fp); in msm_dp_panel_update_tu_timings()
347 tu->lwidth_fp = drm_fixp_div(tu->lwidth_fp, temp1_fp); in msm_dp_panel_update_tu_timings()
374 temp1_fp = drm_fixp_from_fraction(in->compress_ratio, 100); in msm_dp_panel_update_tu_timings()
376 temp3_fp = drm_fixp_div(temp2_fp, temp1_fp); in msm_dp_panel_update_tu_timings()
379 temp1_fp = drm_fixp_from_fraction(8, 1); in msm_dp_panel_update_tu_timings()
380 temp3_fp = drm_fixp_div(temp2_fp, temp1_fp); in msm_dp_panel_update_tu_timings()
400 temp1_fp = drm_fixp_div(temp2_fp, tu->lwidth_fp); in msm_dp_panel_update_tu_timings()
401 pclk_dsc_fp = temp1_fp; in msm_dp_panel_update_tu_timings()
403 temp1_fp = drm_fixp_div(pclk_dsc_fp, tu->pclk_fp); in msm_dp_panel_update_tu_timings()
404 temp2_fp = drm_fixp_mul(tu->hbp_relative_to_pclk_fp, temp1_fp); in msm_dp_panel_update_tu_timings()
414 temp1_fp = drm_fixp_from_fraction(976, 1000); /* 0.976 */ in msm_dp_panel_update_tu_timings()
415 tu->lclk_fp = drm_fixp_mul(tu->lclk_fp, temp1_fp); in msm_dp_panel_update_tu_timings()
421 s64 temp1_fp, temp2_fp, temp, temp1, temp2; in _tu_valid_boundary_calc() local
424 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
425 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
437 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _tu_valid_boundary_calc()
439 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
440 temp2_fp = drm_fixp_div(temp1_fp, tu->average_valid2_fp); in _tu_valid_boundary_calc()
445 temp1_fp = drm_fixp_from_fraction(tu->n_tus, 1); in _tu_valid_boundary_calc()
446 temp2_fp = drm_fixp_mul(temp1_fp, tu->average_valid2_fp); in _tu_valid_boundary_calc()
447 temp1_fp = drm_fixp_from_fraction(tu->n_symbols, 1); in _tu_valid_boundary_calc()
448 temp2_fp = temp1_fp - temp2_fp; in _tu_valid_boundary_calc()
449 temp1_fp = drm_fixp_from_fraction(tu->nlanes, 1); in _tu_valid_boundary_calc()
450 temp2_fp = drm_fixp_div(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
453 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
456 temp1_fp); in _tu_valid_boundary_calc()
463 temp1_fp = drm_fixp_from_fraction(tu->n_tus, tu->nlanes); in _tu_valid_boundary_calc()
464 tu->n_tus_per_lane = drm_fixp2int(temp1_fp); in _tu_valid_boundary_calc()
494 temp1_fp = tu->total_valid_fp + in _tu_valid_boundary_calc()
498 temp1_fp = drm_fixp_div(temp1_fp, temp2_fp); in _tu_valid_boundary_calc()
501 temp1_fp = drm_fixp_div(tu->total_valid_fp, temp2_fp); in _tu_valid_boundary_calc()
503 tu->effective_valid_fp = temp1_fp; in _tu_valid_boundary_calc()
505 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
506 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
509 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
510 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
515 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _tu_valid_boundary_calc()
517 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
518 temp2_fp = drm_fixp_div(temp1_fp, tu->average_valid2_fp); in _tu_valid_boundary_calc()
526 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
527 temp2_fp = drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
528 temp1_fp = tu->average_valid2_fp - temp2_fp; in _tu_valid_boundary_calc()
530 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
532 if (temp1_fp) in _tu_valid_boundary_calc()
533 temp1 = drm_fixp2int_ceil(temp1_fp); in _tu_valid_boundary_calc()
536 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
537 temp2_fp = drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
538 temp1_fp = drm_fixp_from_fraction(tu->new_valid_boundary_link, 1); in _tu_valid_boundary_calc()
539 temp2_fp = temp1_fp - temp2_fp; in _tu_valid_boundary_calc()
540 temp1_fp = drm_fixp_from_fraction(temp, 1); in _tu_valid_boundary_calc()
541 temp2_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _tu_valid_boundary_calc()
549 temp1_fp = drm_fixp_from_fraction(8, tu->bpp); in _tu_valid_boundary_calc()
552 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
554 if (temp1_fp) in _tu_valid_boundary_calc()
555 tu->extra_pclk_cycles_tmp = drm_fixp2int_ceil(temp1_fp); in _tu_valid_boundary_calc()
559 temp1_fp = drm_fixp_from_fraction(tu->extra_pclk_cycles_tmp, 1); in _tu_valid_boundary_calc()
561 temp1_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _tu_valid_boundary_calc()
563 if (temp1_fp) in _tu_valid_boundary_calc()
565 drm_fixp2int_ceil(temp1_fp); in _tu_valid_boundary_calc()
577 temp1_fp = drm_fixp_from_fraction(tu->delay_start_link_tmp, 1); in _tu_valid_boundary_calc()
578 tu->delay_start_time_fp = drm_fixp_div(temp1_fp, tu->lclk_fp); in _tu_valid_boundary_calc()
632 s64 temp_fp = 0, temp1_fp = 0, temp2_fp = 0; in _dp_ctrl_calc_tu() local
652 temp1_fp = drm_fixp_from_fraction(4, 1); in _dp_ctrl_calc_tu()
653 temp2_fp = drm_fixp_mul(temp1_fp, tu->lclk_fp); in _dp_ctrl_calc_tu()
657 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
658 temp2_fp = drm_fixp_mul(tu->pclk_fp, temp1_fp); in _dp_ctrl_calc_tu()
659 temp1_fp = drm_fixp_from_fraction(tu->nlanes, 1); in _dp_ctrl_calc_tu()
660 temp2_fp = drm_fixp_div(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
680 temp1_fp = drm_fixp_from_fraction(tu->nlanes, 1); in _dp_ctrl_calc_tu()
681 div64_u64_rem(tu->lwidth_fp, temp1_fp, &temp2_fp); in _dp_ctrl_calc_tu()
716 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _dp_ctrl_calc_tu()
717 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
719 temp1_fp = drm_fixp_from_fraction(temp, 1); in _dp_ctrl_calc_tu()
720 tu->n_err_fp = temp1_fp - temp2_fp; in _dp_ctrl_calc_tu()
730 temp1_fp = drm_fixp_from_fraction(tu->tu_size_desired, 1); in _dp_ctrl_calc_tu()
731 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
734 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
736 temp2_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
738 temp1_fp = drm_fixp_from_fraction(tu->valid_boundary_link, 1); in _dp_ctrl_calc_tu()
739 temp2_fp = drm_fixp_div(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
750 temp1_fp = drm_fixp_from_fraction(tu->tu_size_desired, 1); in _dp_ctrl_calc_tu()
751 temp2_fp = drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
752 temp1_fp = drm_fixp_from_fraction(tu->valid_boundary_link, 1); in _dp_ctrl_calc_tu()
753 temp2_fp = temp1_fp - temp2_fp; in _dp_ctrl_calc_tu()
754 temp1_fp = drm_fixp_from_fraction(tu->n_tus + 1, 1); in _dp_ctrl_calc_tu()
755 temp2_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
763 temp1_fp = drm_fixp_from_fraction(tu->extra_bytes, 1); in _dp_ctrl_calc_tu()
765 temp1_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
767 if (temp && temp1_fp) in _dp_ctrl_calc_tu()
768 tu->extra_pclk_cycles = drm_fixp2int_ceil(temp1_fp); in _dp_ctrl_calc_tu()
770 tu->extra_pclk_cycles = drm_fixp2int(temp1_fp); in _dp_ctrl_calc_tu()
772 temp1_fp = drm_fixp_div(tu->lclk_fp, tu->pclk_fp); in _dp_ctrl_calc_tu()
774 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
776 if (temp1_fp) in _dp_ctrl_calc_tu()
777 tu->extra_pclk_cycles_in_link_clk = drm_fixp2int_ceil(temp1_fp); in _dp_ctrl_calc_tu()
779 tu->extra_pclk_cycles_in_link_clk = drm_fixp2int(temp1_fp); in _dp_ctrl_calc_tu()
783 temp1_fp = drm_fixp_from_fraction(tu->tu_size_desired, 1); in _dp_ctrl_calc_tu()
784 tu->ratio_by_tu_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
792 temp1_fp = drm_fixp_from_fraction(tu->tu_size_desired, 1); in _dp_ctrl_calc_tu()
793 temp2_fp = drm_fixp_div(tu->resulting_valid_fp, temp1_fp); in _dp_ctrl_calc_tu()
796 temp1_fp = drm_fixp_from_fraction(HBLANK_MARGIN, 1); in _dp_ctrl_calc_tu()
797 temp1_fp = tu->hbp_relative_to_pclk_fp - temp1_fp; in _dp_ctrl_calc_tu()
798 tu->hbp_time_fp = drm_fixp_div(temp1_fp, tu->pclk_fp); in _dp_ctrl_calc_tu()
800 temp1_fp = drm_fixp_from_fraction(tu->delay_start_link, 1); in _dp_ctrl_calc_tu()
801 tu->delay_start_time_fp = drm_fixp_div(temp1_fp, tu->lclk_fp); in _dp_ctrl_calc_tu()
839 temp1_fp = drm_fixp_div(tu->lclk_fp, tu->pclk_fp); in _dp_ctrl_calc_tu()
842 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
844 if (temp1_fp) in _dp_ctrl_calc_tu()
846 drm_fixp2int_ceil(temp1_fp); in _dp_ctrl_calc_tu()
850 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
851 temp1_fp = drm_fixp_mul(tu->lwidth_fp, temp1_fp); in _dp_ctrl_calc_tu()
853 if (temp1_fp) in _dp_ctrl_calc_tu()
854 tu->n_symbols = drm_fixp2int_ceil(temp1_fp); in _dp_ctrl_calc_tu()
875 temp1_fp = drm_fixp_from_fraction( in _dp_ctrl_calc_tu()
884 drm_fixp_div(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
886 temp1_fp = drm_fixp_from_fraction( in _dp_ctrl_calc_tu()
889 drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
894 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
895 temp1_fp = drm_fixp_mul(tu->lwidth_fp, temp1_fp); in _dp_ctrl_calc_tu()
896 temp2_fp = drm_fixp_div(temp1_fp, in _dp_ctrl_calc_tu()
903 temp1_fp = in _dp_ctrl_calc_tu()
906 drm_fixp_div(tu->resulting_valid_fp, temp1_fp); in _dp_ctrl_calc_tu()
918 temp1_fp = drm_fixp_from_fraction(tu->nlanes, 1); in _dp_ctrl_calc_tu()
919 temp2_fp = drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
920 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
921 temp2_fp = drm_fixp_div(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
922 temp1_fp = drm_fixp_from_fraction(temp, 1); in _dp_ctrl_calc_tu()
923 temp2_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
929 temp1_fp = drm_fixp_from_fraction(tu->delay_start_link, 1); in _dp_ctrl_calc_tu()
930 tu->delay_start_time_fp = drm_fixp_div(temp1_fp, tu->lclk_fp); in _dp_ctrl_calc_tu()