.. | .. |
---|
694 | 694 | display_data_rq_sizing_params_st *rq_sizing_param, |
---|
695 | 695 | display_data_rq_dlg_params_st *rq_dlg_param, |
---|
696 | 696 | display_data_rq_misc_params_st *rq_misc_param, |
---|
697 | | - const display_pipe_params_st pipe_param, |
---|
| 697 | + const display_pipe_params_st *pipe_param, |
---|
698 | 698 | bool is_chroma) |
---|
699 | 699 | { |
---|
700 | 700 | bool mode_422 = false; |
---|
.. | .. |
---|
706 | 706 | |
---|
707 | 707 | // FIXME check if ppe apply for both luma and chroma in 422 case |
---|
708 | 708 | if (is_chroma) { |
---|
709 | | - vp_width = pipe_param.src.viewport_width_c / ppe; |
---|
710 | | - vp_height = pipe_param.src.viewport_height_c; |
---|
711 | | - data_pitch = pipe_param.src.data_pitch_c; |
---|
712 | | - meta_pitch = pipe_param.src.meta_pitch_c; |
---|
| 709 | + vp_width = pipe_param->src.viewport_width_c / ppe; |
---|
| 710 | + vp_height = pipe_param->src.viewport_height_c; |
---|
| 711 | + data_pitch = pipe_param->src.data_pitch_c; |
---|
| 712 | + meta_pitch = pipe_param->src.meta_pitch_c; |
---|
713 | 713 | } else { |
---|
714 | | - vp_width = pipe_param.src.viewport_width / ppe; |
---|
715 | | - vp_height = pipe_param.src.viewport_height; |
---|
716 | | - data_pitch = pipe_param.src.data_pitch; |
---|
717 | | - meta_pitch = pipe_param.src.meta_pitch; |
---|
| 714 | + vp_width = pipe_param->src.viewport_width / ppe; |
---|
| 715 | + vp_height = pipe_param->src.viewport_height; |
---|
| 716 | + data_pitch = pipe_param->src.data_pitch; |
---|
| 717 | + meta_pitch = pipe_param->src.meta_pitch; |
---|
718 | 718 | } |
---|
719 | 719 | |
---|
720 | | - if (pipe_param.dest.odm_combine) { |
---|
| 720 | + if (pipe_param->dest.odm_combine) { |
---|
721 | 721 | unsigned int access_dir; |
---|
722 | 722 | unsigned int full_src_vp_width; |
---|
723 | 723 | unsigned int hactive_half; |
---|
724 | 724 | unsigned int src_hactive_half; |
---|
725 | | - access_dir = (pipe_param.src.source_scan == dm_vert); // vp access direction: horizontal or vertical accessed |
---|
726 | | - hactive_half = pipe_param.dest.hactive / 2; |
---|
| 725 | + access_dir = (pipe_param->src.source_scan == dm_vert); // vp access direction: horizontal or vertical accessed |
---|
| 726 | + hactive_half = pipe_param->dest.hactive / 2; |
---|
727 | 727 | if (is_chroma) { |
---|
728 | | - full_src_vp_width = pipe_param.scale_ratio_depth.hscl_ratio_c * pipe_param.dest.full_recout_width; |
---|
729 | | - src_hactive_half = pipe_param.scale_ratio_depth.hscl_ratio_c * hactive_half; |
---|
| 728 | + full_src_vp_width = pipe_param->scale_ratio_depth.hscl_ratio_c * pipe_param->dest.full_recout_width; |
---|
| 729 | + src_hactive_half = pipe_param->scale_ratio_depth.hscl_ratio_c * hactive_half; |
---|
730 | 730 | } else { |
---|
731 | | - full_src_vp_width = pipe_param.scale_ratio_depth.hscl_ratio * pipe_param.dest.full_recout_width; |
---|
732 | | - src_hactive_half = pipe_param.scale_ratio_depth.hscl_ratio * hactive_half; |
---|
| 731 | + full_src_vp_width = pipe_param->scale_ratio_depth.hscl_ratio * pipe_param->dest.full_recout_width; |
---|
| 732 | + src_hactive_half = pipe_param->scale_ratio_depth.hscl_ratio * hactive_half; |
---|
733 | 733 | } |
---|
734 | 734 | |
---|
735 | 735 | if (access_dir == 0) { |
---|
.. | .. |
---|
754 | 754 | rq_sizing_param->meta_chunk_bytes = 2048; |
---|
755 | 755 | rq_sizing_param->min_meta_chunk_bytes = 256; |
---|
756 | 756 | |
---|
757 | | - if (pipe_param.src.hostvm) |
---|
| 757 | + if (pipe_param->src.hostvm) |
---|
758 | 758 | rq_sizing_param->mpte_group_bytes = 512; |
---|
759 | 759 | else |
---|
760 | 760 | rq_sizing_param->mpte_group_bytes = 2048; |
---|
.. | .. |
---|
768 | 768 | vp_height, |
---|
769 | 769 | data_pitch, |
---|
770 | 770 | meta_pitch, |
---|
771 | | - pipe_param.src.source_format, |
---|
772 | | - pipe_param.src.sw_mode, |
---|
773 | | - pipe_param.src.macro_tile_size, |
---|
774 | | - pipe_param.src.source_scan, |
---|
775 | | - pipe_param.src.hostvm, |
---|
| 771 | + pipe_param->src.source_format, |
---|
| 772 | + pipe_param->src.sw_mode, |
---|
| 773 | + pipe_param->src.macro_tile_size, |
---|
| 774 | + pipe_param->src.source_scan, |
---|
| 775 | + pipe_param->src.hostvm, |
---|
776 | 776 | is_chroma); |
---|
777 | 777 | } |
---|
778 | 778 | |
---|
779 | 779 | static void dml_rq_dlg_get_rq_params( |
---|
780 | 780 | struct display_mode_lib *mode_lib, |
---|
781 | 781 | display_rq_params_st *rq_param, |
---|
782 | | - const display_pipe_params_st pipe_param) |
---|
| 782 | + const display_pipe_params_st *pipe_param) |
---|
783 | 783 | { |
---|
784 | 784 | // get param for luma surface |
---|
785 | | - rq_param->yuv420 = pipe_param.src.source_format == dm_420_8 |
---|
786 | | - || pipe_param.src.source_format == dm_420_10; |
---|
787 | | - rq_param->yuv420_10bpc = pipe_param.src.source_format == dm_420_10; |
---|
| 785 | + rq_param->yuv420 = pipe_param->src.source_format == dm_420_8 |
---|
| 786 | + || pipe_param->src.source_format == dm_420_10; |
---|
| 787 | + rq_param->yuv420_10bpc = pipe_param->src.source_format == dm_420_10; |
---|
788 | 788 | |
---|
789 | 789 | get_surf_rq_param( |
---|
790 | 790 | mode_lib, |
---|
.. | .. |
---|
794 | 794 | pipe_param, |
---|
795 | 795 | 0); |
---|
796 | 796 | |
---|
797 | | - if (is_dual_plane((enum source_format_class) (pipe_param.src.source_format))) { |
---|
| 797 | + if (is_dual_plane((enum source_format_class) (pipe_param->src.source_format))) { |
---|
798 | 798 | // get param for chroma surface |
---|
799 | 799 | get_surf_rq_param( |
---|
800 | 800 | mode_lib, |
---|
.. | .. |
---|
806 | 806 | } |
---|
807 | 807 | |
---|
808 | 808 | // calculate how to split the det buffer space between luma and chroma |
---|
809 | | - handle_det_buf_split(mode_lib, rq_param, pipe_param.src); |
---|
| 809 | + handle_det_buf_split(mode_lib, rq_param, pipe_param->src); |
---|
810 | 810 | print__rq_params_st(mode_lib, *rq_param); |
---|
811 | 811 | } |
---|
812 | 812 | |
---|
813 | 813 | void dml21_rq_dlg_get_rq_reg( |
---|
814 | 814 | struct display_mode_lib *mode_lib, |
---|
815 | 815 | display_rq_regs_st *rq_regs, |
---|
816 | | - const display_pipe_params_st pipe_param) |
---|
| 816 | + const display_pipe_params_st *pipe_param) |
---|
817 | 817 | { |
---|
818 | 818 | display_rq_params_st rq_param = {0}; |
---|
819 | 819 | |
---|
.. | .. |
---|
1658 | 1658 | struct display_mode_lib *mode_lib, |
---|
1659 | 1659 | display_dlg_regs_st *dlg_regs, |
---|
1660 | 1660 | display_ttu_regs_st *ttu_regs, |
---|
1661 | | - display_e2e_pipe_params_st *e2e_pipe_param, |
---|
| 1661 | + const display_e2e_pipe_params_st *e2e_pipe_param, |
---|
1662 | 1662 | const unsigned int num_pipes, |
---|
1663 | 1663 | const unsigned int pipe_idx, |
---|
1664 | 1664 | const bool cstate_en, |
---|
.. | .. |
---|
1696 | 1696 | // system parameter calculation done |
---|
1697 | 1697 | |
---|
1698 | 1698 | dml_print("DML_DLG: Calculation for pipe[%d] start\n\n", pipe_idx); |
---|
1699 | | - dml_rq_dlg_get_rq_params(mode_lib, &rq_param, e2e_pipe_param[pipe_idx].pipe); |
---|
| 1699 | + dml_rq_dlg_get_rq_params(mode_lib, &rq_param, &e2e_pipe_param[pipe_idx].pipe); |
---|
1700 | 1700 | dml_rq_dlg_get_dlg_params( |
---|
1701 | 1701 | mode_lib, |
---|
1702 | 1702 | e2e_pipe_param, |
---|