Lines Matching refs:temp1_fp
317 s64 temp1_fp, temp2_fp, temp3_fp; in dp_panel_update_tu_timings() local
332 temp1_fp = drm_fixp_from_fraction(2, 1); in dp_panel_update_tu_timings()
333 tu->pclk_fp = drm_fixp_div(tu->pclk_fp, temp1_fp); in dp_panel_update_tu_timings()
334 tu->lwidth_fp = drm_fixp_div(tu->lwidth_fp, temp1_fp); in dp_panel_update_tu_timings()
361 temp1_fp = drm_fixp_from_fraction(in->compress_ratio, 100); in dp_panel_update_tu_timings()
363 temp3_fp = drm_fixp_div(temp2_fp, temp1_fp); in dp_panel_update_tu_timings()
366 temp1_fp = drm_fixp_from_fraction(8, 1); in dp_panel_update_tu_timings()
367 temp3_fp = drm_fixp_div(temp2_fp, temp1_fp); in dp_panel_update_tu_timings()
387 temp1_fp = drm_fixp_div(temp2_fp, tu->lwidth_fp); in dp_panel_update_tu_timings()
388 pclk_dsc_fp = temp1_fp; in dp_panel_update_tu_timings()
390 temp1_fp = drm_fixp_div(pclk_dsc_fp, tu->pclk_fp); in dp_panel_update_tu_timings()
391 temp2_fp = drm_fixp_mul(tu->hbp_relative_to_pclk_fp, temp1_fp); in dp_panel_update_tu_timings()
401 temp1_fp = drm_fixp_from_fraction(976, 1000); /* 0.976 */ in dp_panel_update_tu_timings()
402 tu->lclk_fp = drm_fixp_mul(tu->lclk_fp, temp1_fp); in dp_panel_update_tu_timings()
408 s64 temp1_fp, temp2_fp, temp, temp1, temp2; in _tu_valid_boundary_calc() local
411 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
412 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
424 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _tu_valid_boundary_calc()
426 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
427 temp2_fp = drm_fixp_div(temp1_fp, tu->average_valid2_fp); in _tu_valid_boundary_calc()
432 temp1_fp = drm_fixp_from_fraction(tu->n_tus, 1); in _tu_valid_boundary_calc()
433 temp2_fp = drm_fixp_mul(temp1_fp, tu->average_valid2_fp); in _tu_valid_boundary_calc()
434 temp1_fp = drm_fixp_from_fraction(tu->n_symbols, 1); in _tu_valid_boundary_calc()
435 temp2_fp = temp1_fp - temp2_fp; in _tu_valid_boundary_calc()
436 temp1_fp = drm_fixp_from_fraction(tu->nlanes, 1); in _tu_valid_boundary_calc()
437 temp2_fp = drm_fixp_div(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
440 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
443 temp1_fp); in _tu_valid_boundary_calc()
450 temp1_fp = drm_fixp_from_fraction(tu->n_tus, tu->nlanes); in _tu_valid_boundary_calc()
451 tu->n_tus_per_lane = drm_fixp2int(temp1_fp); in _tu_valid_boundary_calc()
481 temp1_fp = tu->total_valid_fp + in _tu_valid_boundary_calc()
485 temp1_fp = drm_fixp_div(temp1_fp, temp2_fp); in _tu_valid_boundary_calc()
488 temp1_fp = drm_fixp_div(tu->total_valid_fp, temp2_fp); in _tu_valid_boundary_calc()
490 tu->effective_valid_fp = temp1_fp; in _tu_valid_boundary_calc()
492 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
493 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
496 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
497 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
502 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _tu_valid_boundary_calc()
504 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
505 temp2_fp = drm_fixp_div(temp1_fp, tu->average_valid2_fp); in _tu_valid_boundary_calc()
513 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
514 temp2_fp = drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
515 temp1_fp = tu->average_valid2_fp - temp2_fp; in _tu_valid_boundary_calc()
517 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
519 if (temp1_fp) in _tu_valid_boundary_calc()
520 temp1 = drm_fixp2int_ceil(temp1_fp); in _tu_valid_boundary_calc()
523 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _tu_valid_boundary_calc()
524 temp2_fp = drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _tu_valid_boundary_calc()
525 temp1_fp = drm_fixp_from_fraction(tu->new_valid_boundary_link, 1); in _tu_valid_boundary_calc()
526 temp2_fp = temp1_fp - temp2_fp; in _tu_valid_boundary_calc()
527 temp1_fp = drm_fixp_from_fraction(temp, 1); in _tu_valid_boundary_calc()
528 temp2_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _tu_valid_boundary_calc()
536 temp1_fp = drm_fixp_from_fraction(8, tu->bpp); in _tu_valid_boundary_calc()
539 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _tu_valid_boundary_calc()
541 if (temp1_fp) in _tu_valid_boundary_calc()
542 tu->extra_pclk_cycles_tmp = drm_fixp2int_ceil(temp1_fp); in _tu_valid_boundary_calc()
546 temp1_fp = drm_fixp_from_fraction(tu->extra_pclk_cycles_tmp, 1); in _tu_valid_boundary_calc()
548 temp1_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _tu_valid_boundary_calc()
550 if (temp1_fp) in _tu_valid_boundary_calc()
552 drm_fixp2int_ceil(temp1_fp); in _tu_valid_boundary_calc()
564 temp1_fp = drm_fixp_from_fraction(tu->delay_start_link_tmp, 1); in _tu_valid_boundary_calc()
565 tu->delay_start_time_fp = drm_fixp_div(temp1_fp, tu->lclk_fp); in _tu_valid_boundary_calc()
619 s64 temp_fp = 0, temp1_fp = 0, temp2_fp = 0; in _dp_ctrl_calc_tu() local
639 temp1_fp = drm_fixp_from_fraction(4, 1); in _dp_ctrl_calc_tu()
640 temp2_fp = drm_fixp_mul(temp1_fp, tu->lclk_fp); in _dp_ctrl_calc_tu()
644 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
645 temp2_fp = drm_fixp_mul(tu->pclk_fp, temp1_fp); in _dp_ctrl_calc_tu()
646 temp1_fp = drm_fixp_from_fraction(tu->nlanes, 1); in _dp_ctrl_calc_tu()
647 temp2_fp = drm_fixp_div(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
667 temp1_fp = drm_fixp_from_fraction(tu->nlanes, 1); in _dp_ctrl_calc_tu()
668 div64_u64_rem(tu->lwidth_fp, temp1_fp, &temp2_fp); in _dp_ctrl_calc_tu()
703 temp1_fp = drm_fixp_from_fraction(tu->tu_size, 1); in _dp_ctrl_calc_tu()
704 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
706 temp1_fp = drm_fixp_from_fraction(temp, 1); in _dp_ctrl_calc_tu()
707 tu->n_err_fp = temp1_fp - temp2_fp; in _dp_ctrl_calc_tu()
717 temp1_fp = drm_fixp_from_fraction(tu->tu_size_desired, 1); in _dp_ctrl_calc_tu()
718 temp2_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
721 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
723 temp2_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
725 temp1_fp = drm_fixp_from_fraction(tu->valid_boundary_link, 1); in _dp_ctrl_calc_tu()
726 temp2_fp = drm_fixp_div(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
737 temp1_fp = drm_fixp_from_fraction(tu->tu_size_desired, 1); in _dp_ctrl_calc_tu()
738 temp2_fp = drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
739 temp1_fp = drm_fixp_from_fraction(tu->valid_boundary_link, 1); in _dp_ctrl_calc_tu()
740 temp2_fp = temp1_fp - temp2_fp; in _dp_ctrl_calc_tu()
741 temp1_fp = drm_fixp_from_fraction(tu->n_tus + 1, 1); in _dp_ctrl_calc_tu()
742 temp2_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
750 temp1_fp = drm_fixp_from_fraction(tu->extra_bytes, 1); in _dp_ctrl_calc_tu()
752 temp1_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
754 if (temp && temp1_fp) in _dp_ctrl_calc_tu()
755 tu->extra_pclk_cycles = drm_fixp2int_ceil(temp1_fp); in _dp_ctrl_calc_tu()
757 tu->extra_pclk_cycles = drm_fixp2int(temp1_fp); in _dp_ctrl_calc_tu()
759 temp1_fp = drm_fixp_div(tu->lclk_fp, tu->pclk_fp); in _dp_ctrl_calc_tu()
761 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
763 if (temp1_fp) in _dp_ctrl_calc_tu()
764 tu->extra_pclk_cycles_in_link_clk = drm_fixp2int_ceil(temp1_fp); in _dp_ctrl_calc_tu()
766 tu->extra_pclk_cycles_in_link_clk = drm_fixp2int(temp1_fp); in _dp_ctrl_calc_tu()
770 temp1_fp = drm_fixp_from_fraction(tu->tu_size_desired, 1); in _dp_ctrl_calc_tu()
771 tu->ratio_by_tu_fp = drm_fixp_mul(tu->ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
779 temp1_fp = drm_fixp_from_fraction(tu->tu_size_desired, 1); in _dp_ctrl_calc_tu()
780 temp2_fp = drm_fixp_div(tu->resulting_valid_fp, temp1_fp); in _dp_ctrl_calc_tu()
783 temp1_fp = drm_fixp_from_fraction(HBLANK_MARGIN, 1); in _dp_ctrl_calc_tu()
784 temp1_fp = tu->hbp_relative_to_pclk_fp - temp1_fp; in _dp_ctrl_calc_tu()
785 tu->hbp_time_fp = drm_fixp_div(temp1_fp, tu->pclk_fp); in _dp_ctrl_calc_tu()
787 temp1_fp = drm_fixp_from_fraction(tu->delay_start_link, 1); in _dp_ctrl_calc_tu()
788 tu->delay_start_time_fp = drm_fixp_div(temp1_fp, tu->lclk_fp); in _dp_ctrl_calc_tu()
826 temp1_fp = drm_fixp_div(tu->lclk_fp, tu->pclk_fp); in _dp_ctrl_calc_tu()
829 temp1_fp = drm_fixp_mul(temp2_fp, temp1_fp); in _dp_ctrl_calc_tu()
831 if (temp1_fp) in _dp_ctrl_calc_tu()
833 drm_fixp2int_ceil(temp1_fp); in _dp_ctrl_calc_tu()
837 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
838 temp1_fp = drm_fixp_mul(tu->lwidth_fp, temp1_fp); in _dp_ctrl_calc_tu()
840 if (temp1_fp) in _dp_ctrl_calc_tu()
841 tu->n_symbols = drm_fixp2int_ceil(temp1_fp); in _dp_ctrl_calc_tu()
862 temp1_fp = drm_fixp_from_fraction( in _dp_ctrl_calc_tu()
871 drm_fixp_div(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
873 temp1_fp = drm_fixp_from_fraction( in _dp_ctrl_calc_tu()
876 drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
881 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
882 temp1_fp = drm_fixp_mul(tu->lwidth_fp, temp1_fp); in _dp_ctrl_calc_tu()
883 temp2_fp = drm_fixp_div(temp1_fp, in _dp_ctrl_calc_tu()
890 temp1_fp = in _dp_ctrl_calc_tu()
893 drm_fixp_div(tu->resulting_valid_fp, temp1_fp); in _dp_ctrl_calc_tu()
905 temp1_fp = drm_fixp_from_fraction(tu->nlanes, 1); in _dp_ctrl_calc_tu()
906 temp2_fp = drm_fixp_mul(tu->original_ratio_fp, temp1_fp); in _dp_ctrl_calc_tu()
907 temp1_fp = drm_fixp_from_fraction(tu->bpp, 8); in _dp_ctrl_calc_tu()
908 temp2_fp = drm_fixp_div(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
909 temp1_fp = drm_fixp_from_fraction(temp, 1); in _dp_ctrl_calc_tu()
910 temp2_fp = drm_fixp_mul(temp1_fp, temp2_fp); in _dp_ctrl_calc_tu()
916 temp1_fp = drm_fixp_from_fraction(tu->delay_start_link, 1); in _dp_ctrl_calc_tu()
917 tu->delay_start_time_fp = drm_fixp_div(temp1_fp, tu->lclk_fp); in _dp_ctrl_calc_tu()