~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/drm/bridge/dw_mipi_dsi.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright (C) STMicroelectronics SA 2017
  4  *
  5  * Authors: Philippe Cornu <philippe.cornu@st.com>
  6  *          Yannick Fertre <yannick.fertre@st.com>
  7  */
  8 
  9 #ifndef __DW_MIPI_DSI__
 10 #define __DW_MIPI_DSI__
 11 
 12 #include <linux/types.h>
 13 
 14 #include <drm/drm_atomic.h>
 15 #include <drm/drm_bridge.h>
 16 #include <drm/drm_connector.h>
 17 #include <drm/drm_crtc.h>
 18 #include <drm/drm_modes.h>
 19 
 20 struct drm_display_mode;
 21 struct drm_encoder;
 22 struct dw_mipi_dsi;
 23 struct mipi_dsi_device;
 24 struct platform_device;
 25 
 26 struct dw_mipi_dsi_dphy_timing {
 27         u16 data_hs2lp;
 28         u16 data_lp2hs;
 29         u16 clk_hs2lp;
 30         u16 clk_lp2hs;
 31 };
 32 
 33 struct dw_mipi_dsi_phy_ops {
 34         int (*init)(void *priv_data);
 35         void (*power_on)(void *priv_data);
 36         void (*power_off)(void *priv_data);
 37         int (*get_lane_mbps)(void *priv_data,
 38                              const struct drm_display_mode *mode,
 39                              unsigned long mode_flags, u32 lanes, u32 format,
 40                              unsigned int *lane_mbps);
 41         int (*get_timing)(void *priv_data, unsigned int lane_mbps,
 42                           struct dw_mipi_dsi_dphy_timing *timing);
 43         int (*get_esc_clk_rate)(void *priv_data, unsigned int *esc_clk_rate);
 44 };
 45 
 46 struct dw_mipi_dsi_host_ops {
 47         int (*attach)(void *priv_data,
 48                       struct mipi_dsi_device *dsi);
 49         int (*detach)(void *priv_data,
 50                       struct mipi_dsi_device *dsi);
 51 };
 52 
 53 struct dw_mipi_dsi_plat_data {
 54         void __iomem *base;
 55         unsigned int max_data_lanes;
 56 
 57         enum drm_mode_status (*mode_valid)(void *priv_data,
 58                                            const struct drm_display_mode *mode,
 59                                            unsigned long mode_flags,
 60                                            u32 lanes, u32 format);
 61 
 62         bool (*mode_fixup)(void *priv_data, const struct drm_display_mode *mode,
 63                            struct drm_display_mode *adjusted_mode);
 64 
 65         u32 *(*get_input_bus_fmts)(void *priv_data,
 66                                    struct drm_bridge *bridge,
 67                                    struct drm_bridge_state *bridge_state,
 68                                    struct drm_crtc_state *crtc_state,
 69                                    struct drm_connector_state *conn_state,
 70                                    u32 output_fmt,
 71                                    unsigned int *num_input_fmts);
 72 
 73         const struct dw_mipi_dsi_phy_ops *phy_ops;
 74         const struct dw_mipi_dsi_host_ops *host_ops;
 75 
 76         void *priv_data;
 77 };
 78 
 79 struct dw_mipi_dsi *dw_mipi_dsi_probe(struct platform_device *pdev,
 80                                       const struct dw_mipi_dsi_plat_data
 81                                       *plat_data);
 82 void dw_mipi_dsi_remove(struct dw_mipi_dsi *dsi);
 83 int dw_mipi_dsi_bind(struct dw_mipi_dsi *dsi, struct drm_encoder *encoder);
 84 void dw_mipi_dsi_unbind(struct dw_mipi_dsi *dsi);
 85 void dw_mipi_dsi_set_slave(struct dw_mipi_dsi *dsi, struct dw_mipi_dsi *slave);
 86 struct drm_bridge *dw_mipi_dsi_get_bridge(struct dw_mipi_dsi *dsi);
 87 
 88 #endif /* __DW_MIPI_DSI__ */
 89 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php