.. | .. |
---|
747 | 747 | display_data_rq_sizing_params_st *rq_sizing_param, |
---|
748 | 748 | display_data_rq_dlg_params_st *rq_dlg_param, |
---|
749 | 749 | display_data_rq_misc_params_st *rq_misc_param, |
---|
750 | | - const display_pipe_params_st pipe_param, |
---|
| 750 | + const display_pipe_params_st *pipe_param, |
---|
751 | 751 | bool is_chroma, |
---|
752 | 752 | bool is_alpha) |
---|
753 | 753 | { |
---|
.. | .. |
---|
761 | 761 | |
---|
762 | 762 | // FIXME check if ppe apply for both luma and chroma in 422 case |
---|
763 | 763 | if (is_chroma | is_alpha) { |
---|
764 | | - vp_width = pipe_param.src.viewport_width_c / ppe; |
---|
765 | | - vp_height = pipe_param.src.viewport_height_c; |
---|
766 | | - data_pitch = pipe_param.src.data_pitch_c; |
---|
767 | | - meta_pitch = pipe_param.src.meta_pitch_c; |
---|
768 | | - surface_height = pipe_param.src.surface_height_y / 2.0; |
---|
| 764 | + vp_width = pipe_param->src.viewport_width_c / ppe; |
---|
| 765 | + vp_height = pipe_param->src.viewport_height_c; |
---|
| 766 | + data_pitch = pipe_param->src.data_pitch_c; |
---|
| 767 | + meta_pitch = pipe_param->src.meta_pitch_c; |
---|
| 768 | + surface_height = pipe_param->src.surface_height_y / 2.0; |
---|
769 | 769 | } else { |
---|
770 | | - vp_width = pipe_param.src.viewport_width / ppe; |
---|
771 | | - vp_height = pipe_param.src.viewport_height; |
---|
772 | | - data_pitch = pipe_param.src.data_pitch; |
---|
773 | | - meta_pitch = pipe_param.src.meta_pitch; |
---|
774 | | - surface_height = pipe_param.src.surface_height_y; |
---|
| 770 | + vp_width = pipe_param->src.viewport_width / ppe; |
---|
| 771 | + vp_height = pipe_param->src.viewport_height; |
---|
| 772 | + data_pitch = pipe_param->src.data_pitch; |
---|
| 773 | + meta_pitch = pipe_param->src.meta_pitch; |
---|
| 774 | + surface_height = pipe_param->src.surface_height_y; |
---|
775 | 775 | } |
---|
776 | 776 | |
---|
777 | | - if (pipe_param.dest.odm_combine) { |
---|
| 777 | + if (pipe_param->dest.odm_combine) { |
---|
778 | 778 | unsigned int access_dir = 0; |
---|
779 | 779 | unsigned int full_src_vp_width = 0; |
---|
780 | 780 | unsigned int hactive_odm = 0; |
---|
781 | 781 | unsigned int src_hactive_odm = 0; |
---|
782 | | - access_dir = (pipe_param.src.source_scan == dm_vert); // vp access direction: horizontal or vertical accessed |
---|
783 | | - hactive_odm = pipe_param.dest.hactive / ((unsigned int)pipe_param.dest.odm_combine*2); |
---|
| 782 | + access_dir = (pipe_param->src.source_scan == dm_vert); // vp access direction: horizontal or vertical accessed |
---|
| 783 | + hactive_odm = pipe_param->dest.hactive / ((unsigned int) pipe_param->dest.odm_combine*2); |
---|
784 | 784 | if (is_chroma) { |
---|
785 | | - full_src_vp_width = pipe_param.scale_ratio_depth.hscl_ratio_c * pipe_param.dest.full_recout_width; |
---|
786 | | - src_hactive_odm = pipe_param.scale_ratio_depth.hscl_ratio_c * hactive_odm; |
---|
| 785 | + full_src_vp_width = pipe_param->scale_ratio_depth.hscl_ratio_c * pipe_param->dest.full_recout_width; |
---|
| 786 | + src_hactive_odm = pipe_param->scale_ratio_depth.hscl_ratio_c * hactive_odm; |
---|
787 | 787 | } else { |
---|
788 | | - full_src_vp_width = pipe_param.scale_ratio_depth.hscl_ratio * pipe_param.dest.full_recout_width; |
---|
789 | | - src_hactive_odm = pipe_param.scale_ratio_depth.hscl_ratio * hactive_odm; |
---|
| 788 | + full_src_vp_width = pipe_param->scale_ratio_depth.hscl_ratio * pipe_param->dest.full_recout_width; |
---|
| 789 | + src_hactive_odm = pipe_param->scale_ratio_depth.hscl_ratio * hactive_odm; |
---|
790 | 790 | } |
---|
791 | 791 | |
---|
792 | 792 | if (access_dir == 0) { |
---|
.. | .. |
---|
815 | 815 | rq_sizing_param->meta_chunk_bytes = 2048; |
---|
816 | 816 | rq_sizing_param->min_meta_chunk_bytes = 256; |
---|
817 | 817 | |
---|
818 | | - if (pipe_param.src.hostvm) |
---|
| 818 | + if (pipe_param->src.hostvm) |
---|
819 | 819 | rq_sizing_param->mpte_group_bytes = 512; |
---|
820 | 820 | else |
---|
821 | 821 | rq_sizing_param->mpte_group_bytes = 2048; |
---|
.. | .. |
---|
828 | 828 | vp_height, |
---|
829 | 829 | data_pitch, |
---|
830 | 830 | meta_pitch, |
---|
831 | | - pipe_param.src.source_format, |
---|
832 | | - pipe_param.src.sw_mode, |
---|
833 | | - pipe_param.src.macro_tile_size, |
---|
834 | | - pipe_param.src.source_scan, |
---|
835 | | - pipe_param.src.hostvm, |
---|
| 831 | + pipe_param->src.source_format, |
---|
| 832 | + pipe_param->src.sw_mode, |
---|
| 833 | + pipe_param->src.macro_tile_size, |
---|
| 834 | + pipe_param->src.source_scan, |
---|
| 835 | + pipe_param->src.hostvm, |
---|
836 | 836 | is_chroma, |
---|
837 | 837 | surface_height); |
---|
838 | 838 | } |
---|
839 | 839 | |
---|
840 | 840 | static void dml_rq_dlg_get_rq_params(struct display_mode_lib *mode_lib, |
---|
841 | 841 | display_rq_params_st *rq_param, |
---|
842 | | - const display_pipe_params_st pipe_param) |
---|
| 842 | + const display_pipe_params_st *pipe_param) |
---|
843 | 843 | { |
---|
844 | 844 | // get param for luma surface |
---|
845 | | - rq_param->yuv420 = pipe_param.src.source_format == dm_420_8 |
---|
846 | | - || pipe_param.src.source_format == dm_420_10 |
---|
847 | | - || pipe_param.src.source_format == dm_rgbe_alpha |
---|
848 | | - || pipe_param.src.source_format == dm_420_12; |
---|
| 845 | + rq_param->yuv420 = pipe_param->src.source_format == dm_420_8 |
---|
| 846 | + || pipe_param->src.source_format == dm_420_10 |
---|
| 847 | + || pipe_param->src.source_format == dm_rgbe_alpha |
---|
| 848 | + || pipe_param->src.source_format == dm_420_12; |
---|
849 | 849 | |
---|
850 | | - rq_param->yuv420_10bpc = pipe_param.src.source_format == dm_420_10; |
---|
| 850 | + rq_param->yuv420_10bpc = pipe_param->src.source_format == dm_420_10; |
---|
851 | 851 | |
---|
852 | | - rq_param->rgbe_alpha = (pipe_param.src.source_format == dm_rgbe_alpha)?1:0; |
---|
| 852 | + rq_param->rgbe_alpha = (pipe_param->src.source_format == dm_rgbe_alpha)?1:0; |
---|
853 | 853 | |
---|
854 | 854 | get_surf_rq_param(mode_lib, |
---|
855 | 855 | &(rq_param->sizing.rq_l), |
---|
.. | .. |
---|
859 | 859 | 0, |
---|
860 | 860 | 0); |
---|
861 | 861 | |
---|
862 | | - if (is_dual_plane((enum source_format_class)(pipe_param.src.source_format))) { |
---|
| 862 | + if (is_dual_plane((enum source_format_class)(pipe_param->src.source_format))) { |
---|
863 | 863 | // get param for chroma surface |
---|
864 | 864 | get_surf_rq_param(mode_lib, |
---|
865 | 865 | &(rq_param->sizing.rq_c), |
---|
.. | .. |
---|
871 | 871 | } |
---|
872 | 872 | |
---|
873 | 873 | // calculate how to split the det buffer space between luma and chroma |
---|
874 | | - handle_det_buf_split(mode_lib, rq_param, pipe_param.src); |
---|
| 874 | + handle_det_buf_split(mode_lib, rq_param, pipe_param->src); |
---|
875 | 875 | print__rq_params_st(mode_lib, *rq_param); |
---|
876 | 876 | } |
---|
877 | 877 | |
---|
878 | 878 | void dml30_rq_dlg_get_rq_reg(struct display_mode_lib *mode_lib, |
---|
879 | 879 | display_rq_regs_st *rq_regs, |
---|
880 | | - const display_pipe_params_st pipe_param) |
---|
| 880 | + const display_pipe_params_st *pipe_param) |
---|
881 | 881 | { |
---|
882 | 882 | display_rq_params_st rq_param = { 0 }; |
---|
883 | 883 | |
---|
.. | .. |
---|
1831 | 1831 | void dml30_rq_dlg_get_dlg_reg(struct display_mode_lib *mode_lib, |
---|
1832 | 1832 | display_dlg_regs_st *dlg_regs, |
---|
1833 | 1833 | display_ttu_regs_st *ttu_regs, |
---|
1834 | | - display_e2e_pipe_params_st *e2e_pipe_param, |
---|
| 1834 | + const display_e2e_pipe_params_st *e2e_pipe_param, |
---|
1835 | 1835 | const unsigned int num_pipes, |
---|
1836 | 1836 | const unsigned int pipe_idx, |
---|
1837 | 1837 | const bool cstate_en, |
---|
.. | .. |
---|
1866 | 1866 | // system parameter calculation done |
---|
1867 | 1867 | |
---|
1868 | 1868 | dml_print("DML_DLG: Calculation for pipe[%d] start\n\n", pipe_idx); |
---|
1869 | | - dml_rq_dlg_get_rq_params(mode_lib, &rq_param, e2e_pipe_param[pipe_idx].pipe); |
---|
| 1869 | + dml_rq_dlg_get_rq_params(mode_lib, &rq_param, &e2e_pipe_param[pipe_idx].pipe); |
---|
1870 | 1870 | dml_rq_dlg_get_dlg_params(mode_lib, |
---|
1871 | 1871 | e2e_pipe_param, |
---|
1872 | 1872 | num_pipes, |
---|