Lines Matching refs:catalog
88 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_snapshot() local
90 struct dss_io_data *dss = &catalog->io; in dp_catalog_snapshot()
98 static inline u32 dp_read_aux(struct dp_catalog_private *catalog, u32 offset) in dp_read_aux() argument
100 return readl_relaxed(catalog->io.aux.base + offset); in dp_read_aux()
103 static inline void dp_write_aux(struct dp_catalog_private *catalog, in dp_write_aux() argument
110 writel(data, catalog->io.aux.base + offset); in dp_write_aux()
113 static inline u32 dp_read_ahb(const struct dp_catalog_private *catalog, u32 offset) in dp_read_ahb() argument
115 return readl_relaxed(catalog->io.ahb.base + offset); in dp_read_ahb()
118 static inline void dp_write_ahb(struct dp_catalog_private *catalog, in dp_write_ahb() argument
125 writel(data, catalog->io.ahb.base + offset); in dp_write_ahb()
128 static inline void dp_write_p0(struct dp_catalog_private *catalog, in dp_write_p0() argument
135 writel(data, catalog->io.p0.base + offset); in dp_write_p0()
138 static inline u32 dp_read_p0(struct dp_catalog_private *catalog, in dp_read_p0() argument
145 return readl_relaxed(catalog->io.p0.base + offset); in dp_read_p0()
148 static inline u32 dp_read_link(struct dp_catalog_private *catalog, u32 offset) in dp_read_link() argument
150 return readl_relaxed(catalog->io.link.base + offset); in dp_read_link()
153 static inline void dp_write_link(struct dp_catalog_private *catalog, in dp_write_link() argument
160 writel(data, catalog->io.link.base + offset); in dp_write_link()
166 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_aux_read_data() local
169 return dp_read_aux(catalog, REG_DP_AUX_DATA); in dp_catalog_aux_read_data()
174 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_aux_write_data() local
177 dp_write_aux(catalog, REG_DP_AUX_DATA, data); in dp_catalog_aux_write_data()
183 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_aux_write_trans() local
186 dp_write_aux(catalog, REG_DP_AUX_TRANS_CTRL, data); in dp_catalog_aux_write_trans()
193 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_aux_clear_trans() local
197 data = dp_read_aux(catalog, REG_DP_AUX_TRANS_CTRL); in dp_catalog_aux_clear_trans()
199 dp_write_aux(catalog, REG_DP_AUX_TRANS_CTRL, data); in dp_catalog_aux_clear_trans()
201 dp_write_aux(catalog, REG_DP_AUX_TRANS_CTRL, 0); in dp_catalog_aux_clear_trans()
208 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_aux_clear_hw_interrupts() local
211 dp_read_aux(catalog, REG_DP_PHY_AUX_INTERRUPT_STATUS); in dp_catalog_aux_clear_hw_interrupts()
212 dp_write_aux(catalog, REG_DP_PHY_AUX_INTERRUPT_CLEAR, 0x1f); in dp_catalog_aux_clear_hw_interrupts()
213 dp_write_aux(catalog, REG_DP_PHY_AUX_INTERRUPT_CLEAR, 0x9f); in dp_catalog_aux_clear_hw_interrupts()
214 dp_write_aux(catalog, REG_DP_PHY_AUX_INTERRUPT_CLEAR, 0); in dp_catalog_aux_clear_hw_interrupts()
233 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_aux_reset() local
236 aux_ctrl = dp_read_aux(catalog, REG_DP_AUX_CTRL); in dp_catalog_aux_reset()
239 dp_write_aux(catalog, REG_DP_AUX_CTRL, aux_ctrl); in dp_catalog_aux_reset()
243 dp_write_aux(catalog, REG_DP_AUX_CTRL, aux_ctrl); in dp_catalog_aux_reset()
249 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_aux_enable() local
252 aux_ctrl = dp_read_aux(catalog, REG_DP_AUX_CTRL); in dp_catalog_aux_enable()
255 dp_write_aux(catalog, REG_DP_TIMEOUT_COUNT, 0xffff); in dp_catalog_aux_enable()
256 dp_write_aux(catalog, REG_DP_AUX_LIMITS, 0xffff); in dp_catalog_aux_enable()
262 dp_write_aux(catalog, REG_DP_AUX_CTRL, aux_ctrl); in dp_catalog_aux_enable()
269 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_aux_wait_for_hpd_connect_state() local
273 return readl_poll_timeout(catalog->io.aux.base + in dp_catalog_aux_wait_for_hpd_connect_state()
299 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_dump_regs() local
301 struct dss_io_data *io = &catalog->io; in dp_catalog_dump_regs()
318 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_aux_get_irq() local
322 intr = dp_read_ahb(catalog, REG_DP_INTR_STATUS); in dp_catalog_aux_get_irq()
326 dp_write_ahb(catalog, REG_DP_INTR_STATUS, intr_ack | in dp_catalog_aux_get_irq()
338 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_update_transfer_unit() local
341 dp_write_link(catalog, REG_DP_VALID_BOUNDARY, valid_boundary); in dp_catalog_ctrl_update_transfer_unit()
342 dp_write_link(catalog, REG_DP_TU, dp_tu); in dp_catalog_ctrl_update_transfer_unit()
343 dp_write_link(catalog, REG_DP_VALID_BOUNDARY_2, valid_boundary2); in dp_catalog_ctrl_update_transfer_unit()
348 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_state_ctrl() local
351 dp_write_link(catalog, REG_DP_STATE_CTRL, state); in dp_catalog_ctrl_state_ctrl()
356 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_config_ctrl() local
359 drm_dbg_dp(catalog->drm_dev, "DP_CONFIGURATION_CTRL=0x%x\n", cfg); in dp_catalog_ctrl_config_ctrl()
361 dp_write_link(catalog, REG_DP_CONFIGURATION_CTRL, cfg); in dp_catalog_ctrl_config_ctrl()
366 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_lane_mapping() local
376 dp_write_link(catalog, REG_DP_LOGICAL2PHYSICAL_LANE_MAPPING, in dp_catalog_ctrl_lane_mapping()
384 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_psr_mainlink_enable() local
387 val = dp_read_link(catalog, REG_DP_MAINLINK_CTRL); in dp_catalog_ctrl_psr_mainlink_enable()
394 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, val); in dp_catalog_ctrl_psr_mainlink_enable()
401 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_mainlink_ctrl() local
404 drm_dbg_dp(catalog->drm_dev, "enable=%d\n", enable); in dp_catalog_ctrl_mainlink_ctrl()
410 mainlink_ctrl = dp_read_link(catalog, REG_DP_MAINLINK_CTRL); in dp_catalog_ctrl_mainlink_ctrl()
414 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, mainlink_ctrl); in dp_catalog_ctrl_mainlink_ctrl()
417 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, mainlink_ctrl); in dp_catalog_ctrl_mainlink_ctrl()
420 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, mainlink_ctrl); in dp_catalog_ctrl_mainlink_ctrl()
424 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, mainlink_ctrl); in dp_catalog_ctrl_mainlink_ctrl()
426 mainlink_ctrl = dp_read_link(catalog, REG_DP_MAINLINK_CTRL); in dp_catalog_ctrl_mainlink_ctrl()
428 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, mainlink_ctrl); in dp_catalog_ctrl_mainlink_ctrl()
437 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_config_misc() local
440 misc_val = dp_read_link(catalog, REG_DP_MISC1_MISC0); in dp_catalog_ctrl_config_misc()
449 drm_dbg_dp(catalog->drm_dev, "misc settings = 0x%x\n", misc_val); in dp_catalog_ctrl_config_misc()
450 dp_write_link(catalog, REG_DP_MISC1_MISC0, misc_val); in dp_catalog_ctrl_config_misc()
456 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_setup_peripheral_flush() local
459 mainlink_ctrl = dp_read_link(catalog, REG_DP_MAINLINK_CTRL); in dp_catalog_setup_peripheral_flush()
467 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, mainlink_ctrl); in dp_catalog_setup_peripheral_flush()
481 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_config_msa() local
524 drm_dbg_dp(catalog->drm_dev, "mvid=0x%x, nvid=0x%x\n", mvid, nvid); in dp_catalog_ctrl_config_msa()
525 dp_write_link(catalog, REG_DP_SOFTWARE_MVID, mvid); in dp_catalog_ctrl_config_msa()
526 dp_write_link(catalog, REG_DP_SOFTWARE_NVID, nvid); in dp_catalog_ctrl_config_msa()
527 dp_write_p0(catalog, MMSS_DP_DSC_DTO, 0x0); in dp_catalog_ctrl_config_msa()
535 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_set_pattern_state_bit() local
539 drm_dbg_dp(catalog->drm_dev, "hw: bit=%d train=%d\n", bit, state_bit); in dp_catalog_ctrl_set_pattern_state_bit()
545 ret = readx_poll_timeout(readl, catalog->io.link.base + in dp_catalog_ctrl_set_pattern_state_bit()
566 const struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_hw_revision() local
569 return dp_read_ahb(catalog, REG_DP_HW_VERSION); in dp_catalog_hw_revision()
587 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_reset() local
590 sw_reset = dp_read_ahb(catalog, REG_DP_SW_RESET); in dp_catalog_ctrl_reset()
593 dp_write_ahb(catalog, REG_DP_SW_RESET, sw_reset); in dp_catalog_ctrl_reset()
597 dp_write_ahb(catalog, REG_DP_SW_RESET, sw_reset); in dp_catalog_ctrl_reset()
604 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_mainlink_ready() local
608 ret = readl_poll_timeout(catalog->io.link.base + in dp_catalog_ctrl_mainlink_ready()
623 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_enable_irq() local
627 dp_write_ahb(catalog, REG_DP_INTR_STATUS, in dp_catalog_ctrl_enable_irq()
629 dp_write_ahb(catalog, REG_DP_INTR_STATUS2, in dp_catalog_ctrl_enable_irq()
632 dp_write_ahb(catalog, REG_DP_INTR_STATUS, 0x00); in dp_catalog_ctrl_enable_irq()
633 dp_write_ahb(catalog, REG_DP_INTR_STATUS2, 0x00); in dp_catalog_ctrl_enable_irq()
640 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_hpd_config_intr() local
643 u32 config = dp_read_aux(catalog, REG_DP_DP_HPD_INT_MASK); in dp_catalog_hpd_config_intr()
647 drm_dbg_dp(catalog->drm_dev, "intr_mask=%#x config=%#x\n", in dp_catalog_hpd_config_intr()
649 dp_write_aux(catalog, REG_DP_DP_HPD_INT_MASK, in dp_catalog_hpd_config_intr()
655 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_hpd_enable() local
658 u32 reftimer = dp_read_aux(catalog, REG_DP_DP_HPD_REFTIMER); in dp_catalog_ctrl_hpd_enable()
662 dp_write_aux(catalog, REG_DP_DP_HPD_REFTIMER, reftimer); in dp_catalog_ctrl_hpd_enable()
665 dp_write_aux(catalog, REG_DP_DP_HPD_CTRL, DP_DP_HPD_CTRL_HPD_EN); in dp_catalog_ctrl_hpd_enable()
670 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_hpd_disable() local
673 u32 reftimer = dp_read_aux(catalog, REG_DP_DP_HPD_REFTIMER); in dp_catalog_ctrl_hpd_disable()
676 dp_write_aux(catalog, REG_DP_DP_HPD_REFTIMER, reftimer); in dp_catalog_ctrl_hpd_disable()
678 dp_write_aux(catalog, REG_DP_DP_HPD_CTRL, 0); in dp_catalog_ctrl_hpd_disable()
681 static void dp_catalog_enable_sdp(struct dp_catalog_private *catalog) in dp_catalog_enable_sdp() argument
684 dp_write_link(catalog, MMSS_DP_SDP_CFG3, UPDATE_SDP); in dp_catalog_enable_sdp()
685 dp_write_link(catalog, MMSS_DP_SDP_CFG3, 0x0); in dp_catalog_enable_sdp()
690 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_config_psr() local
695 config = dp_read_link(catalog, REG_PSR_CONFIG); in dp_catalog_ctrl_config_psr()
697 dp_write_link(catalog, REG_PSR_CONFIG, config); in dp_catalog_ctrl_config_psr()
699 dp_write_ahb(catalog, REG_DP_INTR_MASK4, DP_INTERRUPT_MASK4); in dp_catalog_ctrl_config_psr()
700 dp_catalog_enable_sdp(catalog); in dp_catalog_ctrl_config_psr()
705 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_set_psr() local
709 cmd = dp_read_link(catalog, REG_PSR_CMD); in dp_catalog_ctrl_set_psr()
718 dp_catalog_enable_sdp(catalog); in dp_catalog_ctrl_set_psr()
719 dp_write_link(catalog, REG_PSR_CMD, cmd); in dp_catalog_ctrl_set_psr()
724 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_link_is_connected() local
728 status = dp_read_aux(catalog, REG_DP_DP_HPD_INT_STATUS); in dp_catalog_link_is_connected()
729 drm_dbg_dp(catalog->drm_dev, "aux status: %#x\n", status); in dp_catalog_link_is_connected()
738 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_hpd_get_intr_status() local
742 isr = dp_read_aux(catalog, REG_DP_DP_HPD_INT_STATUS); in dp_catalog_hpd_get_intr_status()
743 dp_write_aux(catalog, REG_DP_DP_HPD_INT_ACK, in dp_catalog_hpd_get_intr_status()
745 mask = dp_read_aux(catalog, REG_DP_DP_HPD_INT_MASK); in dp_catalog_hpd_get_intr_status()
759 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_read_psr_interrupt_status() local
763 intr = dp_read_ahb(catalog, REG_DP_INTR_STATUS4); in dp_catalog_ctrl_read_psr_interrupt_status()
766 dp_write_ahb(catalog, REG_DP_INTR_STATUS4, intr_ack); in dp_catalog_ctrl_read_psr_interrupt_status()
773 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_get_interrupt() local
777 intr = dp_read_ahb(catalog, REG_DP_INTR_STATUS2); in dp_catalog_ctrl_get_interrupt()
781 dp_write_ahb(catalog, REG_DP_INTR_STATUS2, in dp_catalog_ctrl_get_interrupt()
789 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_phy_reset() local
792 dp_write_ahb(catalog, REG_DP_PHY_CTRL, in dp_catalog_ctrl_phy_reset()
795 dp_write_ahb(catalog, REG_DP_PHY_CTRL, 0x0); in dp_catalog_ctrl_phy_reset()
801 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_send_phy_pattern() local
806 dp_write_link(catalog, REG_DP_STATE_CTRL, 0x0); in dp_catalog_ctrl_send_phy_pattern()
808 drm_dbg_dp(catalog->drm_dev, "pattern: %#x\n", pattern); in dp_catalog_ctrl_send_phy_pattern()
811 dp_write_link(catalog, REG_DP_STATE_CTRL, in dp_catalog_ctrl_send_phy_pattern()
816 dp_write_link(catalog, REG_DP_HBR2_COMPLIANCE_SCRAMBLER_RESET, in dp_catalog_ctrl_send_phy_pattern()
819 dp_write_link(catalog, REG_DP_HBR2_COMPLIANCE_SCRAMBLER_RESET, in dp_catalog_ctrl_send_phy_pattern()
821 dp_write_link(catalog, REG_DP_MAINLINK_LEVELS, in dp_catalog_ctrl_send_phy_pattern()
823 dp_write_link(catalog, REG_DP_STATE_CTRL, in dp_catalog_ctrl_send_phy_pattern()
827 dp_write_link(catalog, REG_DP_STATE_CTRL, in dp_catalog_ctrl_send_phy_pattern()
831 dp_write_link(catalog, REG_DP_STATE_CTRL, in dp_catalog_ctrl_send_phy_pattern()
834 dp_write_link(catalog, REG_DP_TEST_80BIT_CUSTOM_PATTERN_REG0, in dp_catalog_ctrl_send_phy_pattern()
837 dp_write_link(catalog, REG_DP_TEST_80BIT_CUSTOM_PATTERN_REG1, in dp_catalog_ctrl_send_phy_pattern()
840 dp_write_link(catalog, REG_DP_TEST_80BIT_CUSTOM_PATTERN_REG2, in dp_catalog_ctrl_send_phy_pattern()
844 value = dp_read_link(catalog, REG_DP_MAINLINK_CTRL); in dp_catalog_ctrl_send_phy_pattern()
846 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, value); in dp_catalog_ctrl_send_phy_pattern()
849 dp_write_link(catalog, REG_DP_HBR2_COMPLIANCE_SCRAMBLER_RESET, in dp_catalog_ctrl_send_phy_pattern()
852 dp_write_link(catalog, REG_DP_HBR2_COMPLIANCE_SCRAMBLER_RESET, in dp_catalog_ctrl_send_phy_pattern()
854 dp_write_link(catalog, REG_DP_MAINLINK_LEVELS, in dp_catalog_ctrl_send_phy_pattern()
856 dp_write_link(catalog, REG_DP_STATE_CTRL, in dp_catalog_ctrl_send_phy_pattern()
858 value = dp_read_link(catalog, REG_DP_MAINLINK_CTRL); in dp_catalog_ctrl_send_phy_pattern()
860 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, value); in dp_catalog_ctrl_send_phy_pattern()
863 dp_write_link(catalog, REG_DP_MAINLINK_CTRL, in dp_catalog_ctrl_send_phy_pattern()
865 dp_write_link(catalog, REG_DP_STATE_CTRL, in dp_catalog_ctrl_send_phy_pattern()
869 drm_dbg_dp(catalog->drm_dev, in dp_catalog_ctrl_send_phy_pattern()
877 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_ctrl_read_phy_pattern() local
880 return dp_read_link(catalog, REG_DP_MAINLINK_READY); in dp_catalog_ctrl_read_phy_pattern()
887 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_panel_timing_cfg() local
891 dp_write_link(catalog, REG_DP_TOTAL_HOR_VER, total); in dp_catalog_panel_timing_cfg()
892 dp_write_link(catalog, REG_DP_START_HOR_VER_FROM_SYNC, sync_start); in dp_catalog_panel_timing_cfg()
893 dp_write_link(catalog, REG_DP_HSYNC_VSYNC_WIDTH_POLARITY, width_blanking); in dp_catalog_panel_timing_cfg()
894 dp_write_link(catalog, REG_DP_ACTIVE_HOR_VER, dp_active); in dp_catalog_panel_timing_cfg()
896 reg = dp_read_p0(catalog, MMSS_DP_INTF_CONFIG); in dp_catalog_panel_timing_cfg()
906 dp_write_p0(catalog, MMSS_DP_INTF_CONFIG, reg); in dp_catalog_panel_timing_cfg()
912 struct dp_catalog_private *catalog; in dp_catalog_panel_send_vsc_sdp() local
917 catalog = container_of(dp_catalog, struct dp_catalog_private, dp_catalog); in dp_catalog_panel_send_vsc_sdp()
921 dp_write_link(catalog, MMSS_DP_GENERIC0_0, header[0]); in dp_catalog_panel_send_vsc_sdp()
922 dp_write_link(catalog, MMSS_DP_GENERIC0_1, header[1]); in dp_catalog_panel_send_vsc_sdp()
927 dp_write_link(catalog, MMSS_DP_GENERIC0_2 + i, val); in dp_catalog_panel_send_vsc_sdp()
933 struct dp_catalog_private *catalog; in dp_catalog_panel_update_sdp() local
936 catalog = container_of(dp_catalog, struct dp_catalog_private, dp_catalog); in dp_catalog_panel_update_sdp()
940 dp_write_link(catalog, MMSS_DP_SDP_CFG3, 0x01); in dp_catalog_panel_update_sdp()
941 dp_write_link(catalog, MMSS_DP_SDP_CFG3, 0x00); in dp_catalog_panel_update_sdp()
947 struct dp_catalog_private *catalog; in dp_catalog_panel_enable_vsc_sdp() local
950 catalog = container_of(dp_catalog, struct dp_catalog_private, dp_catalog); in dp_catalog_panel_enable_vsc_sdp()
952 cfg = dp_read_link(catalog, MMSS_DP_SDP_CFG); in dp_catalog_panel_enable_vsc_sdp()
953 cfg2 = dp_read_link(catalog, MMSS_DP_SDP_CFG2); in dp_catalog_panel_enable_vsc_sdp()
954 misc = dp_read_link(catalog, REG_DP_MISC1_MISC0); in dp_catalog_panel_enable_vsc_sdp()
957 dp_write_link(catalog, MMSS_DP_SDP_CFG, cfg); in dp_catalog_panel_enable_vsc_sdp()
960 dp_write_link(catalog, MMSS_DP_SDP_CFG2, cfg2); in dp_catalog_panel_enable_vsc_sdp()
967 drm_dbg_dp(catalog->drm_dev, "vsc sdp enable=1\n"); in dp_catalog_panel_enable_vsc_sdp()
970 dp_write_link(catalog, REG_DP_MISC1_MISC0, misc); in dp_catalog_panel_enable_vsc_sdp()
977 struct dp_catalog_private *catalog; in dp_catalog_panel_disable_vsc_sdp() local
980 catalog = container_of(dp_catalog, struct dp_catalog_private, dp_catalog); in dp_catalog_panel_disable_vsc_sdp()
982 cfg = dp_read_link(catalog, MMSS_DP_SDP_CFG); in dp_catalog_panel_disable_vsc_sdp()
983 cfg2 = dp_read_link(catalog, MMSS_DP_SDP_CFG2); in dp_catalog_panel_disable_vsc_sdp()
984 misc = dp_read_link(catalog, REG_DP_MISC1_MISC0); in dp_catalog_panel_disable_vsc_sdp()
987 dp_write_link(catalog, MMSS_DP_SDP_CFG, cfg); in dp_catalog_panel_disable_vsc_sdp()
990 dp_write_link(catalog, MMSS_DP_SDP_CFG2, cfg2); in dp_catalog_panel_disable_vsc_sdp()
995 drm_dbg_dp(catalog->drm_dev, "vsc sdp enable=0\n"); in dp_catalog_panel_disable_vsc_sdp()
998 dp_write_link(catalog, REG_DP_MISC1_MISC0, misc); in dp_catalog_panel_disable_vsc_sdp()
1006 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_panel_tpg_enable() local
1039 dp_write_p0(catalog, MMSS_DP_INTF_CONFIG, 0x0); in dp_catalog_panel_tpg_enable()
1040 dp_write_p0(catalog, MMSS_DP_INTF_HSYNC_CTL, hsync_ctl); in dp_catalog_panel_tpg_enable()
1041 dp_write_p0(catalog, MMSS_DP_INTF_VSYNC_PERIOD_F0, vsync_period * in dp_catalog_panel_tpg_enable()
1043 dp_write_p0(catalog, MMSS_DP_INTF_VSYNC_PULSE_WIDTH_F0, v_sync_width * in dp_catalog_panel_tpg_enable()
1045 dp_write_p0(catalog, MMSS_DP_INTF_VSYNC_PERIOD_F1, 0); in dp_catalog_panel_tpg_enable()
1046 dp_write_p0(catalog, MMSS_DP_INTF_VSYNC_PULSE_WIDTH_F1, 0); in dp_catalog_panel_tpg_enable()
1047 dp_write_p0(catalog, MMSS_DP_INTF_DISPLAY_HCTL, display_hctl); in dp_catalog_panel_tpg_enable()
1048 dp_write_p0(catalog, MMSS_DP_INTF_ACTIVE_HCTL, 0); in dp_catalog_panel_tpg_enable()
1049 dp_write_p0(catalog, MMSS_INTF_DISPLAY_V_START_F0, display_v_start); in dp_catalog_panel_tpg_enable()
1050 dp_write_p0(catalog, MMSS_DP_INTF_DISPLAY_V_END_F0, display_v_end); in dp_catalog_panel_tpg_enable()
1051 dp_write_p0(catalog, MMSS_INTF_DISPLAY_V_START_F1, 0); in dp_catalog_panel_tpg_enable()
1052 dp_write_p0(catalog, MMSS_DP_INTF_DISPLAY_V_END_F1, 0); in dp_catalog_panel_tpg_enable()
1053 dp_write_p0(catalog, MMSS_DP_INTF_ACTIVE_V_START_F0, 0); in dp_catalog_panel_tpg_enable()
1054 dp_write_p0(catalog, MMSS_DP_INTF_ACTIVE_V_END_F0, 0); in dp_catalog_panel_tpg_enable()
1055 dp_write_p0(catalog, MMSS_DP_INTF_ACTIVE_V_START_F1, 0); in dp_catalog_panel_tpg_enable()
1056 dp_write_p0(catalog, MMSS_DP_INTF_ACTIVE_V_END_F1, 0); in dp_catalog_panel_tpg_enable()
1057 dp_write_p0(catalog, MMSS_DP_INTF_POLARITY_CTL, 0); in dp_catalog_panel_tpg_enable()
1059 dp_write_p0(catalog, MMSS_DP_TPG_MAIN_CONTROL, in dp_catalog_panel_tpg_enable()
1061 dp_write_p0(catalog, MMSS_DP_TPG_VIDEO_CONFIG, in dp_catalog_panel_tpg_enable()
1064 dp_write_p0(catalog, MMSS_DP_BIST_ENABLE, in dp_catalog_panel_tpg_enable()
1066 dp_write_p0(catalog, MMSS_DP_TIMING_ENGINE_EN, in dp_catalog_panel_tpg_enable()
1068 drm_dbg_dp(catalog->drm_dev, "%s: enabled tpg\n", __func__); in dp_catalog_panel_tpg_enable()
1073 struct dp_catalog_private *catalog = container_of(dp_catalog, in dp_catalog_panel_tpg_disable() local
1076 dp_write_p0(catalog, MMSS_DP_TPG_MAIN_CONTROL, 0x0); in dp_catalog_panel_tpg_disable()
1077 dp_write_p0(catalog, MMSS_DP_BIST_ENABLE, 0x0); in dp_catalog_panel_tpg_disable()
1078 dp_write_p0(catalog, MMSS_DP_TIMING_ENGINE_EN, 0x0); in dp_catalog_panel_tpg_disable()
1093 static int dp_catalog_get_io(struct dp_catalog_private *catalog) in dp_catalog_get_io() argument
1095 struct platform_device *pdev = to_platform_device(catalog->dev); in dp_catalog_get_io()
1096 struct dss_io_data *dss = &catalog->io; in dp_catalog_get_io()
1147 struct dp_catalog_private *catalog; in dp_catalog_get() local
1150 catalog = devm_kzalloc(dev, sizeof(*catalog), GFP_KERNEL); in dp_catalog_get()
1151 if (!catalog) in dp_catalog_get()
1154 catalog->dev = dev; in dp_catalog_get()
1156 ret = dp_catalog_get_io(catalog); in dp_catalog_get()
1160 return &catalog->dp_catalog; in dp_catalog_get()
1167 struct dp_catalog_private *catalog; in dp_catalog_audio_get_header() local
1170 catalog = container_of(dp_catalog, in dp_catalog_audio_get_header()
1173 sdp_map = catalog->audio_map; in dp_catalog_audio_get_header()
1175 return dp_read_link(catalog, sdp_map[sdp][header]); in dp_catalog_audio_get_header()
1183 struct dp_catalog_private *catalog; in dp_catalog_audio_set_header() local
1189 catalog = container_of(dp_catalog, in dp_catalog_audio_set_header()
1192 sdp_map = catalog->audio_map; in dp_catalog_audio_set_header()
1194 dp_write_link(catalog, sdp_map[sdp][header], data); in dp_catalog_audio_set_header()
1199 struct dp_catalog_private *catalog; in dp_catalog_audio_config_acr() local
1205 catalog = container_of(dp_catalog, in dp_catalog_audio_config_acr()
1210 drm_dbg_dp(catalog->drm_dev, "select: %#x, acr_ctrl: %#x\n", in dp_catalog_audio_config_acr()
1213 dp_write_link(catalog, MMSS_DP_AUDIO_ACR_CTRL, acr_ctrl); in dp_catalog_audio_config_acr()
1218 struct dp_catalog_private *catalog; in dp_catalog_audio_enable() local
1224 catalog = container_of(dp_catalog, in dp_catalog_audio_enable()
1227 audio_ctrl = dp_read_link(catalog, MMSS_DP_AUDIO_CFG); in dp_catalog_audio_enable()
1234 drm_dbg_dp(catalog->drm_dev, "dp_audio_cfg = 0x%x\n", audio_ctrl); in dp_catalog_audio_enable()
1236 dp_write_link(catalog, MMSS_DP_AUDIO_CFG, audio_ctrl); in dp_catalog_audio_enable()
1243 struct dp_catalog_private *catalog; in dp_catalog_audio_config_sdp() local
1250 catalog = container_of(dp_catalog, in dp_catalog_audio_config_sdp()
1253 sdp_cfg = dp_read_link(catalog, MMSS_DP_SDP_CFG); in dp_catalog_audio_config_sdp()
1265 drm_dbg_dp(catalog->drm_dev, "sdp_cfg = 0x%x\n", sdp_cfg); in dp_catalog_audio_config_sdp()
1267 dp_write_link(catalog, MMSS_DP_SDP_CFG, sdp_cfg); in dp_catalog_audio_config_sdp()
1269 sdp_cfg2 = dp_read_link(catalog, MMSS_DP_SDP_CFG2); in dp_catalog_audio_config_sdp()
1275 drm_dbg_dp(catalog->drm_dev, "sdp_cfg2 = 0x%x\n", sdp_cfg2); in dp_catalog_audio_config_sdp()
1277 dp_write_link(catalog, MMSS_DP_SDP_CFG2, sdp_cfg2); in dp_catalog_audio_config_sdp()
1282 struct dp_catalog_private *catalog; in dp_catalog_audio_init() local
1315 catalog = container_of(dp_catalog, in dp_catalog_audio_init()
1318 catalog->audio_map = sdp_map; in dp_catalog_audio_init()
1323 struct dp_catalog_private *catalog; in dp_catalog_audio_sfe_level() local
1329 catalog = container_of(dp_catalog, in dp_catalog_audio_sfe_level()
1332 mainlink_levels = dp_read_link(catalog, REG_DP_MAINLINK_LEVELS); in dp_catalog_audio_sfe_level()
1336 drm_dbg_dp(catalog->drm_dev, in dp_catalog_audio_sfe_level()
1340 dp_write_link(catalog, REG_DP_MAINLINK_LEVELS, mainlink_levels); in dp_catalog_audio_sfe_level()