diff options
author | Dave Airlie <airlied@redhat.com> | 2016-03-16 18:09:44 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-03-16 18:09:44 -0400 |
commit | 5e2368a3bbb36d24c038d87d61ebf291e4be5197 (patch) | |
tree | b25c386642693a2d86bb61e567933c591dde6d8e /include/drm | |
parent | 0e5dc9a8ee2f10b5d6c793675e9942c526e52411 (diff) | |
parent | c8a3b2ae07130042682bc8e031bcfbae3754463d (diff) |
Merge tag 'drm/panel/for-4.6-rc1' of http://anongit.freedesktop.org/git/tegra/linux into drm-next
drm/panel: Changes for v4.6-rc1
This contains a refactoring of parts of the DSI core to allow creating
DSI devices from non-DSI control busses (i.e. I2C, SPI, ...).
Other than that there's support for a couple of new panels as well as
a few cleanup patches.
* tag 'drm/panel/for-4.6-rc1' of http://anongit.freedesktop.org/git/tegra/linux:
drm/bridge: Make (pre/post) enable/disable callbacks optional
drm/panel: simple: Add URT UMSH-8596MD-xT panels support
dt-bindings: Add URT UMSH-8596MD-xT panel bindings
of: Add United Radiant Technology Corporation vendor prefix
drm/panel: simple: Support for LG lp120up1 panel
dt-bindings: Add LG lp120up1 panel bindings
drm/panel: simple: Fix g121x1_l03 hsync/vsync polarity
drm/dsi: Get DSI host by DT device node
drm/dsi: Add routine to unregister a DSI device
drm/dsi: Try to match non-DT DSI devices
drm/dsi: Use mipi_dsi_device_register_full() for DSI device creation
drm/dsi: Check for CONFIG_OF when defining of_mipi_dsi_device_add()
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_crtc.h | 8 | ||||
-rw-r--r-- | include/drm/drm_mipi_dsi.h | 26 |
2 files changed, 34 insertions, 0 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index fb9672783fa7..e0170bf80bb0 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -1597,6 +1597,8 @@ struct drm_bridge_funcs { | |||
1597 | * | 1597 | * |
1598 | * The bridge can assume that the display pipe (i.e. clocks and timing | 1598 | * The bridge can assume that the display pipe (i.e. clocks and timing |
1599 | * signals) feeding it is still running when this callback is called. | 1599 | * signals) feeding it is still running when this callback is called. |
1600 | * | ||
1601 | * The disable callback is optional. | ||
1600 | */ | 1602 | */ |
1601 | void (*disable)(struct drm_bridge *bridge); | 1603 | void (*disable)(struct drm_bridge *bridge); |
1602 | 1604 | ||
@@ -1613,6 +1615,8 @@ struct drm_bridge_funcs { | |||
1613 | * The bridge must assume that the display pipe (i.e. clocks and timing | 1615 | * The bridge must assume that the display pipe (i.e. clocks and timing |
1614 | * singals) feeding it is no longer running when this callback is | 1616 | * singals) feeding it is no longer running when this callback is |
1615 | * called. | 1617 | * called. |
1618 | * | ||
1619 | * The post_disable callback is optional. | ||
1616 | */ | 1620 | */ |
1617 | void (*post_disable)(struct drm_bridge *bridge); | 1621 | void (*post_disable)(struct drm_bridge *bridge); |
1618 | 1622 | ||
@@ -1641,6 +1645,8 @@ struct drm_bridge_funcs { | |||
1641 | * will not yet be running when this callback is called. The bridge must | 1645 | * will not yet be running when this callback is called. The bridge must |
1642 | * not enable the display link feeding the next bridge in the chain (if | 1646 | * not enable the display link feeding the next bridge in the chain (if |
1643 | * there is one) when this callback is called. | 1647 | * there is one) when this callback is called. |
1648 | * | ||
1649 | * The pre_enable callback is optional. | ||
1644 | */ | 1650 | */ |
1645 | void (*pre_enable)(struct drm_bridge *bridge); | 1651 | void (*pre_enable)(struct drm_bridge *bridge); |
1646 | 1652 | ||
@@ -1658,6 +1664,8 @@ struct drm_bridge_funcs { | |||
1658 | * signals) feeding it is running when this callback is called. This | 1664 | * signals) feeding it is running when this callback is called. This |
1659 | * callback must enable the display link feeding the next bridge in the | 1665 | * callback must enable the display link feeding the next bridge in the |
1660 | * chain if there is one. | 1666 | * chain if there is one. |
1667 | * | ||
1668 | * The enable callback is optional. | ||
1661 | */ | 1669 | */ |
1662 | void (*enable)(struct drm_bridge *bridge); | 1670 | void (*enable)(struct drm_bridge *bridge); |
1663 | }; | 1671 | }; |
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 1b3b1f8c8cdf..7a9840f8b38e 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h | |||
@@ -96,14 +96,17 @@ struct mipi_dsi_host_ops { | |||
96 | * struct mipi_dsi_host - DSI host device | 96 | * struct mipi_dsi_host - DSI host device |
97 | * @dev: driver model device node for this DSI host | 97 | * @dev: driver model device node for this DSI host |
98 | * @ops: DSI host operations | 98 | * @ops: DSI host operations |
99 | * @list: list management | ||
99 | */ | 100 | */ |
100 | struct mipi_dsi_host { | 101 | struct mipi_dsi_host { |
101 | struct device *dev; | 102 | struct device *dev; |
102 | const struct mipi_dsi_host_ops *ops; | 103 | const struct mipi_dsi_host_ops *ops; |
104 | struct list_head list; | ||
103 | }; | 105 | }; |
104 | 106 | ||
105 | int mipi_dsi_host_register(struct mipi_dsi_host *host); | 107 | int mipi_dsi_host_register(struct mipi_dsi_host *host); |
106 | void mipi_dsi_host_unregister(struct mipi_dsi_host *host); | 108 | void mipi_dsi_host_unregister(struct mipi_dsi_host *host); |
109 | struct mipi_dsi_host *of_find_mipi_dsi_host_by_node(struct device_node *node); | ||
107 | 110 | ||
108 | /* DSI mode flags */ | 111 | /* DSI mode flags */ |
109 | 112 | ||
@@ -139,10 +142,28 @@ enum mipi_dsi_pixel_format { | |||
139 | MIPI_DSI_FMT_RGB565, | 142 | MIPI_DSI_FMT_RGB565, |
140 | }; | 143 | }; |
141 | 144 | ||
145 | #define DSI_DEV_NAME_SIZE 20 | ||
146 | |||
147 | /** | ||
148 | * struct mipi_dsi_device_info - template for creating a mipi_dsi_device | ||
149 | * @type: DSI peripheral chip type | ||
150 | * @channel: DSI virtual channel assigned to peripheral | ||
151 | * @node: pointer to OF device node or NULL | ||
152 | * | ||
153 | * This is populated and passed to mipi_dsi_device_new to create a new | ||
154 | * DSI device | ||
155 | */ | ||
156 | struct mipi_dsi_device_info { | ||
157 | char type[DSI_DEV_NAME_SIZE]; | ||
158 | u32 channel; | ||
159 | struct device_node *node; | ||
160 | }; | ||
161 | |||
142 | /** | 162 | /** |
143 | * struct mipi_dsi_device - DSI peripheral device | 163 | * struct mipi_dsi_device - DSI peripheral device |
144 | * @host: DSI host for this peripheral | 164 | * @host: DSI host for this peripheral |
145 | * @dev: driver model device node for this peripheral | 165 | * @dev: driver model device node for this peripheral |
166 | * @name: DSI peripheral chip type | ||
146 | * @channel: virtual channel assigned to the peripheral | 167 | * @channel: virtual channel assigned to the peripheral |
147 | * @format: pixel format for video mode | 168 | * @format: pixel format for video mode |
148 | * @lanes: number of active data lanes | 169 | * @lanes: number of active data lanes |
@@ -152,6 +173,7 @@ struct mipi_dsi_device { | |||
152 | struct mipi_dsi_host *host; | 173 | struct mipi_dsi_host *host; |
153 | struct device dev; | 174 | struct device dev; |
154 | 175 | ||
176 | char name[DSI_DEV_NAME_SIZE]; | ||
155 | unsigned int channel; | 177 | unsigned int channel; |
156 | unsigned int lanes; | 178 | unsigned int lanes; |
157 | enum mipi_dsi_pixel_format format; | 179 | enum mipi_dsi_pixel_format format; |
@@ -188,6 +210,10 @@ static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt) | |||
188 | return -EINVAL; | 210 | return -EINVAL; |
189 | } | 211 | } |
190 | 212 | ||
213 | struct mipi_dsi_device * | ||
214 | mipi_dsi_device_register_full(struct mipi_dsi_host *host, | ||
215 | const struct mipi_dsi_device_info *info); | ||
216 | void mipi_dsi_device_unregister(struct mipi_dsi_device *dsi); | ||
191 | struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np); | 217 | struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np); |
192 | int mipi_dsi_attach(struct mipi_dsi_device *dsi); | 218 | int mipi_dsi_attach(struct mipi_dsi_device *dsi); |
193 | int mipi_dsi_detach(struct mipi_dsi_device *dsi); | 219 | int mipi_dsi_detach(struct mipi_dsi_device *dsi); |