Lloyd Atkinson | 8c49c58 | 2016-11-18 14:23:54 -0500 | [diff] [blame] | 1 | /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #ifndef _SDE_CONNECTOR_H_ |
| 14 | #define _SDE_CONNECTOR_H_ |
| 15 | |
Ping Li | 8430ee1 | 2017-02-24 14:14:44 -0800 | [diff] [blame] | 16 | #include <uapi/drm/msm_drm_pp.h> |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 17 | #include <drm/drmP.h> |
| 18 | #include <drm/drm_atomic.h> |
| 19 | #include <drm/drm_panel.h> |
| 20 | |
Clarence Ip | cb3afd4 | 2016-07-15 16:25:34 -0400 | [diff] [blame] | 21 | #include "msm_drv.h" |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 22 | #include "msm_prop.h" |
| 23 | #include "sde_kms.h" |
Clarence Ip | e59fb3f | 2016-07-26 13:39:59 -0400 | [diff] [blame] | 24 | #include "sde_fence.h" |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 25 | |
| 26 | #define SDE_CONNECTOR_NAME_SIZE 16 |
| 27 | |
| 28 | struct sde_connector; |
| 29 | struct sde_connector_state; |
| 30 | |
| 31 | /** |
| 32 | * struct sde_connector_ops - callback functions for generic sde connector |
| 33 | * Individual callbacks documented below. |
| 34 | */ |
| 35 | struct sde_connector_ops { |
| 36 | /** |
| 37 | * post_init - perform additional initialization steps |
| 38 | * @connector: Pointer to drm connector structure |
Alan Kwong | 769fba9 | 2017-11-13 16:50:36 -0500 | [diff] [blame] | 39 | * @display: Pointer to private display handle |
| 40 | * Returns: Zero on success |
| 41 | */ |
| 42 | int (*post_init)(struct drm_connector *connector, |
| 43 | void *display); |
| 44 | |
| 45 | /** |
| 46 | * set_info_blob - initialize given info blob |
| 47 | * @connector: Pointer to drm connector structure |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 48 | * @info: Pointer to sde connector info structure |
| 49 | * @display: Pointer to private display handle |
Jeykumar Sankaran | 736d79d | 2017-10-05 17:44:24 -0700 | [diff] [blame] | 50 | * @mode_info: Pointer to mode info structure |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 51 | * Returns: Zero on success |
| 52 | */ |
Alan Kwong | 769fba9 | 2017-11-13 16:50:36 -0500 | [diff] [blame] | 53 | int (*set_info_blob)(struct drm_connector *connector, |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 54 | void *info, |
Jeykumar Sankaran | 736d79d | 2017-10-05 17:44:24 -0700 | [diff] [blame] | 55 | void *display, |
| 56 | struct msm_mode_info *mode_info); |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 57 | |
| 58 | /** |
| 59 | * detect - determine if connector is connected |
| 60 | * @connector: Pointer to drm connector structure |
| 61 | * @force: Force detect setting from drm framework |
| 62 | * @display: Pointer to private display handle |
| 63 | * Returns: Connector 'is connected' status |
| 64 | */ |
| 65 | enum drm_connector_status (*detect)(struct drm_connector *connector, |
| 66 | bool force, |
| 67 | void *display); |
| 68 | |
| 69 | /** |
| 70 | * get_modes - add drm modes via drm_mode_probed_add() |
| 71 | * @connector: Pointer to drm connector structure |
| 72 | * @display: Pointer to private display handle |
| 73 | * Returns: Number of modes added |
| 74 | */ |
| 75 | int (*get_modes)(struct drm_connector *connector, |
| 76 | void *display); |
| 77 | |
| 78 | /** |
Jeykumar Sankaran | 446a5f1 | 2017-05-09 20:30:39 -0700 | [diff] [blame] | 79 | * put_modes - free up drm modes of the connector |
| 80 | * @connector: Pointer to drm connector structure |
| 81 | * @display: Pointer to private display handle |
| 82 | */ |
| 83 | void (*put_modes)(struct drm_connector *connector, |
| 84 | void *display); |
| 85 | |
| 86 | /** |
Jeykumar Sankaran | 5c2f070 | 2017-03-09 18:03:15 -0800 | [diff] [blame] | 87 | * update_pps - update pps command for the display panel |
| 88 | * @pps_cmd: Pointer to pps command |
| 89 | * @display: Pointer to private display handle |
| 90 | * Returns: Zero on success |
| 91 | */ |
| 92 | int (*update_pps)(char *pps_cmd, void *display); |
| 93 | |
| 94 | /** |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 95 | * mode_valid - determine if specified mode is valid |
| 96 | * @connector: Pointer to drm connector structure |
| 97 | * @mode: Pointer to drm mode structure |
| 98 | * @display: Pointer to private display handle |
| 99 | * Returns: Validity status for specified mode |
| 100 | */ |
| 101 | enum drm_mode_status (*mode_valid)(struct drm_connector *connector, |
| 102 | struct drm_display_mode *mode, |
| 103 | void *display); |
| 104 | |
| 105 | /** |
| 106 | * set_property - set property value |
| 107 | * @connector: Pointer to drm connector structure |
| 108 | * @state: Pointer to drm connector state structure |
| 109 | * @property_index: DRM property index |
| 110 | * @value: Incoming property value |
| 111 | * @display: Pointer to private display structure |
| 112 | * Returns: Zero on success |
| 113 | */ |
| 114 | int (*set_property)(struct drm_connector *connector, |
| 115 | struct drm_connector_state *state, |
| 116 | int property_index, |
| 117 | uint64_t value, |
| 118 | void *display); |
| 119 | |
| 120 | /** |
| 121 | * get_property - get property value |
| 122 | * @connector: Pointer to drm connector structure |
| 123 | * @state: Pointer to drm connector state structure |
| 124 | * @property_index: DRM property index |
| 125 | * @value: Pointer to variable for accepting property value |
| 126 | * @display: Pointer to private display structure |
| 127 | * Returns: Zero on success |
| 128 | */ |
| 129 | int (*get_property)(struct drm_connector *connector, |
| 130 | struct drm_connector_state *state, |
| 131 | int property_index, |
| 132 | uint64_t *value, |
| 133 | void *display); |
Clarence Ip | cb3afd4 | 2016-07-15 16:25:34 -0400 | [diff] [blame] | 134 | |
| 135 | /** |
| 136 | * get_info - get display information |
| 137 | * @info: Pointer to msm display info structure |
| 138 | * @display: Pointer to private display structure |
| 139 | * Returns: Zero on success |
| 140 | */ |
| 141 | int (*get_info)(struct msm_display_info *info, void *display); |
Vishnuvardhan Prodduturi | 75b9680 | 2016-10-17 18:45:55 +0530 | [diff] [blame] | 142 | |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 143 | /** |
Jeykumar Sankaran | 446a5f1 | 2017-05-09 20:30:39 -0700 | [diff] [blame] | 144 | * get_mode_info - retrieve mode information |
Jeykumar Sankaran | 6b345ac | 2017-03-15 19:17:19 -0700 | [diff] [blame] | 145 | * @drm_mode: Display mode set for the display |
Jeykumar Sankaran | 446a5f1 | 2017-05-09 20:30:39 -0700 | [diff] [blame] | 146 | * @mode_info: Out parameter. information of the display mode |
Jeykumar Sankaran | 6b345ac | 2017-03-15 19:17:19 -0700 | [diff] [blame] | 147 | * @max_mixer_width: max width supported by HW layer mixer |
Alan Kwong | b1bca60 | 2017-09-18 17:28:45 -0400 | [diff] [blame] | 148 | * @display: Pointer to private display structure |
Jeykumar Sankaran | 6b345ac | 2017-03-15 19:17:19 -0700 | [diff] [blame] | 149 | * Returns: Zero on success |
| 150 | */ |
Jeykumar Sankaran | 446a5f1 | 2017-05-09 20:30:39 -0700 | [diff] [blame] | 151 | int (*get_mode_info)(const struct drm_display_mode *drm_mode, |
| 152 | struct msm_mode_info *mode_info, |
Alan Kwong | b1bca60 | 2017-09-18 17:28:45 -0400 | [diff] [blame] | 153 | u32 max_mixer_width, void *display); |
Jeykumar Sankaran | 6b345ac | 2017-03-15 19:17:19 -0700 | [diff] [blame] | 154 | |
| 155 | /** |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 156 | * enable_event - notify display of event registration/unregistration |
| 157 | * @connector: Pointer to drm connector structure |
| 158 | * @event_idx: SDE connector event index |
| 159 | * @enable: Whether the event is being enabled/disabled |
| 160 | * @display: Pointer to private display structure |
| 161 | */ |
| 162 | void (*enable_event)(struct drm_connector *connector, |
| 163 | uint32_t event_idx, bool enable, void *display); |
| 164 | |
Vishnuvardhan Prodduturi | 75b9680 | 2016-10-17 18:45:55 +0530 | [diff] [blame] | 165 | int (*set_backlight)(void *display, u32 bl_lvl); |
Lloyd Atkinson | 8c49c58 | 2016-11-18 14:23:54 -0500 | [diff] [blame] | 166 | |
| 167 | /** |
| 168 | * soft_reset - perform a soft reset on the connector |
| 169 | * @display: Pointer to private display structure |
| 170 | * Return: Zero on success, -ERROR otherwise |
| 171 | */ |
| 172 | int (*soft_reset)(void *display); |
Lloyd Atkinson | 05d7551 | 2017-01-17 14:45:51 -0500 | [diff] [blame] | 173 | |
| 174 | /** |
| 175 | * pre_kickoff - trigger display to program kickoff-time features |
| 176 | * @connector: Pointer to drm connector structure |
| 177 | * @display: Pointer to private display structure |
| 178 | * @params: Parameter bundle of connector-stored information for |
| 179 | * kickoff-time programming into the display |
| 180 | * Returns: Zero on success |
| 181 | */ |
| 182 | int (*pre_kickoff)(struct drm_connector *connector, |
| 183 | void *display, |
| 184 | struct msm_display_kickoff_params *params); |
Veera Sundaram Sankaran | bb2bf9a | 2017-03-29 18:56:47 -0700 | [diff] [blame] | 185 | |
| 186 | /** |
| 187 | * clk_ctrl - perform clk enable/disable on the connector |
| 188 | * @handle: Pointer to clk handle |
| 189 | * @type: Type of clks |
| 190 | * @enable: State of clks |
| 191 | */ |
| 192 | int (*clk_ctrl)(void *handle, u32 type, u32 state); |
Clarence Ip | 90b282d | 2017-05-04 10:00:32 -0700 | [diff] [blame] | 193 | |
| 194 | /** |
| 195 | * set_power - update dpms setting |
| 196 | * @connector: Pointer to drm connector structure |
| 197 | * @power_mode: One of the following, |
| 198 | * SDE_MODE_DPMS_ON |
| 199 | * SDE_MODE_DPMS_LP1 |
| 200 | * SDE_MODE_DPMS_LP2 |
| 201 | * SDE_MODE_DPMS_OFF |
| 202 | * @display: Pointer to private display structure |
| 203 | * Returns: Zero on success |
| 204 | */ |
| 205 | int (*set_power)(struct drm_connector *connector, |
| 206 | int power_mode, void *display); |
Ping Li | 8430ee1 | 2017-02-24 14:14:44 -0800 | [diff] [blame] | 207 | |
| 208 | /** |
| 209 | * get_dst_format - get dst_format from display |
| 210 | * @display: Pointer to private display handle |
| 211 | * Returns: dst_format of display |
| 212 | */ |
| 213 | enum dsi_pixel_format (*get_dst_format)(void *display); |
Raviteja Tamatam | 68892de | 2017-06-20 04:47:19 +0530 | [diff] [blame] | 214 | |
| 215 | /** |
| 216 | * post_kickoff - display to program post kickoff-time features |
| 217 | * @connector: Pointer to drm connector structure |
| 218 | * Returns: Zero on success |
| 219 | */ |
| 220 | int (*post_kickoff)(struct drm_connector *connector); |
| 221 | |
Padmanabhan Komanduru | 71aec2d | 2017-08-30 20:07:59 +0530 | [diff] [blame] | 222 | /** |
Ajay Singh Parmar | 315e585 | 2017-11-23 21:47:32 -0800 | [diff] [blame] | 223 | * post_open - calls connector to process post open functionalities |
Padmanabhan Komanduru | 71aec2d | 2017-08-30 20:07:59 +0530 | [diff] [blame] | 224 | * @display: Pointer to private display structure |
| 225 | */ |
Ajay Singh Parmar | 315e585 | 2017-11-23 21:47:32 -0800 | [diff] [blame] | 226 | void (*post_open)(void *display); |
Sandeep Panda | 98d6ab2 | 2017-09-05 08:03:16 +0530 | [diff] [blame] | 227 | |
| 228 | /** |
| 229 | * check_status - check status of connected display panel |
| 230 | * @display: Pointer to private display handle |
| 231 | * Returns: positive value for success, negetive or zero for failure |
| 232 | */ |
| 233 | int (*check_status)(void *display); |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 234 | }; |
| 235 | |
| 236 | /** |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 237 | * enum sde_connector_events - list of recognized connector events |
| 238 | */ |
| 239 | enum sde_connector_events { |
| 240 | SDE_CONN_EVENT_VID_DONE, /* video mode frame done */ |
| 241 | SDE_CONN_EVENT_CMD_DONE, /* command mode frame done */ |
Sandeep Panda | 11b20d8 | 2017-06-19 12:57:27 +0530 | [diff] [blame] | 242 | SDE_CONN_EVENT_VID_FIFO_OVERFLOW, /* dsi fifo overflow error */ |
| 243 | SDE_CONN_EVENT_CMD_FIFO_UNDERFLOW, /* dsi fifo underflow error */ |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 244 | SDE_CONN_EVENT_COUNT, |
| 245 | }; |
| 246 | |
| 247 | /** |
| 248 | * struct sde_connector_evt - local event registration entry structure |
| 249 | * @cb_func: Pointer to desired callback function |
| 250 | * @usr: User pointer to pass to callback on event trigger |
Sandeep Panda | 11b20d8 | 2017-06-19 12:57:27 +0530 | [diff] [blame] | 251 | * Returns: Zero success, negetive for failure |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 252 | */ |
| 253 | struct sde_connector_evt { |
Sandeep Panda | 11b20d8 | 2017-06-19 12:57:27 +0530 | [diff] [blame] | 254 | int (*cb_func)(uint32_t event_idx, |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 255 | uint32_t instance_idx, void *usr, |
| 256 | uint32_t data0, uint32_t data1, |
| 257 | uint32_t data2, uint32_t data3); |
| 258 | void *usr; |
| 259 | }; |
| 260 | |
| 261 | /** |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 262 | * struct sde_connector - local sde connector structure |
| 263 | * @base: Base drm connector structure |
| 264 | * @connector_type: Set to one of DRM_MODE_CONNECTOR_ types |
| 265 | * @encoder: Pointer to preferred drm encoder |
| 266 | * @panel: Pointer to drm panel, if present |
| 267 | * @display: Pointer to private display data structure |
Alan Kwong | dfa8c08 | 2016-07-29 04:10:00 -0400 | [diff] [blame] | 268 | * @mmu_secure: MMU id for secure buffers |
| 269 | * @mmu_unsecure: MMU id for unsecure buffers |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 270 | * @name: ASCII name of connector |
Clarence Ip | 90b282d | 2017-05-04 10:00:32 -0700 | [diff] [blame] | 271 | * @lock: Mutex lock object for this structure |
Dhaval Patel | 39323d4 | 2017-03-01 23:48:24 -0800 | [diff] [blame] | 272 | * @retire_fence: Retire fence context reference |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 273 | * @ops: Local callback function pointer table |
Clarence Ip | 90b282d | 2017-05-04 10:00:32 -0700 | [diff] [blame] | 274 | * @dpms_mode: DPMS property setting from user space |
| 275 | * @lp_mode: LP property setting from user space |
| 276 | * @last_panel_power_mode: Last consolidated dpms/lp mode setting |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 277 | * @property_info: Private structure for generic property handling |
| 278 | * @property_data: Array of private data for generic property handling |
Dhaval Patel | 4e57484 | 2016-08-23 15:11:37 -0700 | [diff] [blame] | 279 | * @blob_caps: Pointer to blob structure for 'capabilities' property |
Ping Li | 898b1bf | 2017-02-09 18:03:28 -0800 | [diff] [blame] | 280 | * @blob_hdr: Pointer to blob structure for 'hdr_properties' property |
Ajay Singh Parmar | e927aa4 | 2017-11-01 00:33:20 -0700 | [diff] [blame] | 281 | * @blob_ext_hdr: Pointer to blob structure for 'ext_hdr_properties' property |
Ping Li | 8430ee1 | 2017-02-24 14:14:44 -0800 | [diff] [blame] | 282 | * @blob_dither: Pointer to blob structure for default dither config |
Jeykumar Sankaran | 83ddcb0 | 2017-10-27 11:34:50 -0700 | [diff] [blame] | 283 | * @blob_mode_info: Pointer to blob structure for mode info |
Alan Kwong | 578cdaf | 2017-01-28 17:25:43 -0800 | [diff] [blame] | 284 | * @fb_kmap: true if kernel mapping of framebuffer is requested |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 285 | * @event_table: Array of registered events |
| 286 | * @event_lock: Lock object for event_table |
Dhaval Patel | 959fdab | 2017-08-25 15:15:39 -0700 | [diff] [blame] | 287 | * @bl_device: backlight device node |
Sandeep Panda | 98d6ab2 | 2017-09-05 08:03:16 +0530 | [diff] [blame] | 288 | * @status_work: work object to perform status checks |
Sandeep Panda | f2274d1 | 2017-09-08 19:52:33 +0530 | [diff] [blame] | 289 | * @force_panel_dead: variable to trigger forced ESD recovery |
Xu Yang | 9237731 | 2017-11-23 13:48:08 +0800 | [diff] [blame] | 290 | * @bl_scale_dirty: Flag to indicate PP BL scale value(s) is changed |
| 291 | * @bl_scale: BL scale value for ABA feature |
| 292 | * @bl_scale_ad: BL scale value for AD feature |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 293 | */ |
| 294 | struct sde_connector { |
| 295 | struct drm_connector base; |
| 296 | |
| 297 | int connector_type; |
| 298 | |
| 299 | struct drm_encoder *encoder; |
| 300 | struct drm_panel *panel; |
| 301 | void *display; |
| 302 | |
Jordan Crouse | d8e9652 | 2017-02-13 10:14:16 -0700 | [diff] [blame] | 303 | struct msm_gem_address_space *aspace[SDE_IOMMU_DOMAIN_MAX]; |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 304 | |
| 305 | char name[SDE_CONNECTOR_NAME_SIZE]; |
| 306 | |
Clarence Ip | 90b282d | 2017-05-04 10:00:32 -0700 | [diff] [blame] | 307 | struct mutex lock; |
Dhaval Patel | 39323d4 | 2017-03-01 23:48:24 -0800 | [diff] [blame] | 308 | struct sde_fence_context retire_fence; |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 309 | struct sde_connector_ops ops; |
Clarence Ip | 90b282d | 2017-05-04 10:00:32 -0700 | [diff] [blame] | 310 | int dpms_mode; |
| 311 | int lp_mode; |
| 312 | int last_panel_power_mode; |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 313 | |
| 314 | struct msm_property_info property_info; |
| 315 | struct msm_property_data property_data[CONNECTOR_PROP_COUNT]; |
Dhaval Patel | 4e57484 | 2016-08-23 15:11:37 -0700 | [diff] [blame] | 316 | struct drm_property_blob *blob_caps; |
Ping Li | 898b1bf | 2017-02-09 18:03:28 -0800 | [diff] [blame] | 317 | struct drm_property_blob *blob_hdr; |
Srikanth Rajagopalan | 30384d1 | 2017-06-08 15:23:31 -0700 | [diff] [blame] | 318 | struct drm_property_blob *blob_ext_hdr; |
Ping Li | 8430ee1 | 2017-02-24 14:14:44 -0800 | [diff] [blame] | 319 | struct drm_property_blob *blob_dither; |
Jeykumar Sankaran | 83ddcb0 | 2017-10-27 11:34:50 -0700 | [diff] [blame] | 320 | struct drm_property_blob *blob_mode_info; |
Alan Kwong | 578cdaf | 2017-01-28 17:25:43 -0800 | [diff] [blame] | 321 | |
| 322 | bool fb_kmap; |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 323 | struct sde_connector_evt event_table[SDE_CONN_EVENT_COUNT]; |
| 324 | spinlock_t event_lock; |
Dhaval Patel | 959fdab | 2017-08-25 15:15:39 -0700 | [diff] [blame] | 325 | |
| 326 | struct backlight_device *bl_device; |
Sandeep Panda | 98d6ab2 | 2017-09-05 08:03:16 +0530 | [diff] [blame] | 327 | struct delayed_work status_work; |
Sandeep Panda | f2274d1 | 2017-09-08 19:52:33 +0530 | [diff] [blame] | 328 | u32 force_panel_dead; |
Xu Yang | 9237731 | 2017-11-23 13:48:08 +0800 | [diff] [blame] | 329 | |
| 330 | bool bl_scale_dirty; |
| 331 | u32 bl_scale; |
| 332 | u32 bl_scale_ad; |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 333 | }; |
| 334 | |
| 335 | /** |
| 336 | * to_sde_connector - convert drm_connector pointer to sde connector pointer |
| 337 | * @X: Pointer to drm_connector structure |
| 338 | * Returns: Pointer to sde_connector structure |
| 339 | */ |
| 340 | #define to_sde_connector(x) container_of((x), struct sde_connector, base) |
| 341 | |
| 342 | /** |
| 343 | * sde_connector_get_display - get sde connector's private display pointer |
| 344 | * @C: Pointer to drm connector structure |
| 345 | * Returns: Pointer to associated private display structure |
| 346 | */ |
| 347 | #define sde_connector_get_display(C) \ |
Jeykumar Sankaran | 586d092 | 2017-09-18 15:01:33 -0700 | [diff] [blame] | 348 | ((C) ? to_sde_connector((C))->display : NULL) |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 349 | |
| 350 | /** |
| 351 | * sde_connector_get_panel - get sde connector's private panel pointer |
| 352 | * @C: Pointer to drm connector structure |
| 353 | * Returns: Pointer to associated private display structure |
| 354 | */ |
| 355 | #define sde_connector_get_panel(C) \ |
Ajay Singh Parmar | 0d6250b | 2017-04-02 14:08:51 -0700 | [diff] [blame] | 356 | ((C) ? to_sde_connector((C))->panel : NULL) |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 357 | |
| 358 | /** |
| 359 | * sde_connector_get_encoder - get sde connector's private encoder pointer |
| 360 | * @C: Pointer to drm connector structure |
| 361 | * Returns: Pointer to associated private encoder structure |
| 362 | */ |
| 363 | #define sde_connector_get_encoder(C) \ |
Jeykumar Sankaran | 586d092 | 2017-09-18 15:01:33 -0700 | [diff] [blame] | 364 | ((C) ? to_sde_connector((C))->encoder : NULL) |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 365 | |
| 366 | /** |
| 367 | * sde_connector_get_propinfo - get sde connector's property info pointer |
| 368 | * @C: Pointer to drm connector structure |
| 369 | * Returns: Pointer to associated private property info structure |
| 370 | */ |
| 371 | #define sde_connector_get_propinfo(C) \ |
Jeykumar Sankaran | 586d092 | 2017-09-18 15:01:33 -0700 | [diff] [blame] | 372 | ((C) ? &to_sde_connector((C))->property_info : NULL) |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 373 | |
| 374 | /** |
| 375 | * struct sde_connector_state - private connector status structure |
| 376 | * @base: Base drm connector structure |
| 377 | * @out_fb: Pointer to output frame buffer, if applicable |
Clarence Ip | 4a2955d | 2017-07-04 18:04:33 -0400 | [diff] [blame] | 378 | * @property_state: Local storage for msm_prop properties |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 379 | * @property_values: Local cache of current connector property values |
Lloyd Atkinson | 05d7551 | 2017-01-17 14:45:51 -0500 | [diff] [blame] | 380 | * @rois: Regions of interest structure for mapping CRTC to Connector output |
Ping Li | 8430ee1 | 2017-02-24 14:14:44 -0800 | [diff] [blame] | 381 | * @property_blobs: blob properties |
Jeykumar Sankaran | 905ba33 | 2017-10-19 10:45:02 -0700 | [diff] [blame] | 382 | * @mode_info: local copy of msm_mode_info struct |
Ajay Singh Parmar | e927aa4 | 2017-11-01 00:33:20 -0700 | [diff] [blame] | 383 | * @hdr_meta: HDR metadata info passed from userspace |
Lloyd Atkinson | 4ced69e | 2017-11-03 12:16:09 -0400 | [diff] [blame] | 384 | * @old_topology_name: topology of previous atomic state. remove this in later |
| 385 | * kernel versions which provide drm_atomic_state old_state pointers |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 386 | */ |
| 387 | struct sde_connector_state { |
| 388 | struct drm_connector_state base; |
| 389 | struct drm_framebuffer *out_fb; |
Clarence Ip | 4a2955d | 2017-07-04 18:04:33 -0400 | [diff] [blame] | 390 | struct msm_property_state property_state; |
| 391 | struct msm_property_value property_values[CONNECTOR_PROP_COUNT]; |
Lloyd Atkinson | 05d7551 | 2017-01-17 14:45:51 -0500 | [diff] [blame] | 392 | |
Lloyd Atkinson | 8ba4703 | 2017-03-22 17:13:32 -0400 | [diff] [blame] | 393 | struct msm_roi_list rois; |
Ping Li | 8430ee1 | 2017-02-24 14:14:44 -0800 | [diff] [blame] | 394 | struct drm_property_blob *property_blobs[CONNECTOR_PROP_BLOBCOUNT]; |
Jeykumar Sankaran | 905ba33 | 2017-10-19 10:45:02 -0700 | [diff] [blame] | 395 | struct msm_mode_info mode_info; |
Ajay Singh Parmar | e927aa4 | 2017-11-01 00:33:20 -0700 | [diff] [blame] | 396 | struct drm_msm_ext_hdr_metadata hdr_meta; |
Lloyd Atkinson | 4ced69e | 2017-11-03 12:16:09 -0400 | [diff] [blame] | 397 | enum sde_rm_topology_name old_topology_name; |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 398 | }; |
| 399 | |
| 400 | /** |
| 401 | * to_sde_connector_state - convert drm_connector_state pointer to |
| 402 | * sde connector state pointer |
| 403 | * @X: Pointer to drm_connector_state structure |
| 404 | * Returns: Pointer to sde_connector_state structure |
| 405 | */ |
| 406 | #define to_sde_connector_state(x) \ |
| 407 | container_of((x), struct sde_connector_state, base) |
| 408 | |
| 409 | /** |
| 410 | * sde_connector_get_property - query integer value of connector property |
| 411 | * @S: Pointer to drm connector state |
| 412 | * @X: Property index, from enum msm_mdp_connector_property |
| 413 | * Returns: Integer value of requested property |
| 414 | */ |
| 415 | #define sde_connector_get_property(S, X) \ |
| 416 | ((S) && ((X) < CONNECTOR_PROP_COUNT) ? \ |
Clarence Ip | 4a2955d | 2017-07-04 18:04:33 -0400 | [diff] [blame] | 417 | (to_sde_connector_state((S))->property_values[(X)].value) : 0) |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 418 | |
| 419 | /** |
Clarence Ip | 4a2955d | 2017-07-04 18:04:33 -0400 | [diff] [blame] | 420 | * sde_connector_get_property_state - retrieve property state cache |
Lloyd Atkinson | 13cee81 | 2016-08-16 16:10:31 -0400 | [diff] [blame] | 421 | * @S: Pointer to drm connector state |
Clarence Ip | 4a2955d | 2017-07-04 18:04:33 -0400 | [diff] [blame] | 422 | * Returns: Pointer to local property state structure |
Lloyd Atkinson | 13cee81 | 2016-08-16 16:10:31 -0400 | [diff] [blame] | 423 | */ |
Clarence Ip | 4a2955d | 2017-07-04 18:04:33 -0400 | [diff] [blame] | 424 | #define sde_connector_get_property_state(S) \ |
| 425 | ((S) ? (&to_sde_connector_state((S))->property_state) : NULL) |
Lloyd Atkinson | 13cee81 | 2016-08-16 16:10:31 -0400 | [diff] [blame] | 426 | |
| 427 | /** |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 428 | * sde_connector_get_out_fb - query out_fb value from sde connector state |
| 429 | * @S: Pointer to drm connector state |
| 430 | * Returns: Output fb associated with specified connector state |
| 431 | */ |
| 432 | #define sde_connector_get_out_fb(S) \ |
| 433 | ((S) ? to_sde_connector_state((S))->out_fb : 0) |
| 434 | |
| 435 | /** |
Lloyd Atkinson | 55987b0 | 2016-08-16 16:57:46 -0400 | [diff] [blame] | 436 | * sde_connector_get_topology_name - helper accessor to retrieve topology_name |
| 437 | * @connector: pointer to drm connector |
| 438 | * Returns: value of the CONNECTOR_PROP_TOPOLOGY_NAME property or 0 |
| 439 | */ |
| 440 | static inline uint64_t sde_connector_get_topology_name( |
| 441 | struct drm_connector *connector) |
| 442 | { |
| 443 | if (!connector || !connector->state) |
| 444 | return 0; |
| 445 | return sde_connector_get_property(connector->state, |
| 446 | CONNECTOR_PROP_TOPOLOGY_NAME); |
| 447 | } |
| 448 | |
| 449 | /** |
Lloyd Atkinson | 4ced69e | 2017-11-03 12:16:09 -0400 | [diff] [blame] | 450 | * sde_connector_get_old_topology_name - helper accessor to retrieve |
| 451 | * topology_name for the previous mode |
| 452 | * @connector: pointer to drm connector state |
| 453 | * Returns: cached value of the previous topology, or SDE_RM_TOPOLOGY_NONE |
| 454 | */ |
| 455 | static inline enum sde_rm_topology_name sde_connector_get_old_topology_name( |
| 456 | struct drm_connector_state *state) |
| 457 | { |
| 458 | struct sde_connector_state *c_state = to_sde_connector_state(state); |
| 459 | |
| 460 | if (!state) |
| 461 | return SDE_RM_TOPOLOGY_NONE; |
| 462 | |
| 463 | return c_state->old_topology_name; |
| 464 | } |
| 465 | |
| 466 | /** |
| 467 | * sde_connector_set_old_topology_name - helper to cache value of previous |
| 468 | * mode's topology |
| 469 | * @connector: pointer to drm connector state |
| 470 | * Returns: 0 on success, negative errno on failure |
| 471 | */ |
| 472 | static inline int sde_connector_set_old_topology_name( |
| 473 | struct drm_connector_state *state, |
| 474 | enum sde_rm_topology_name top) |
| 475 | { |
| 476 | struct sde_connector_state *c_state = to_sde_connector_state(state); |
| 477 | |
| 478 | if (!state) |
| 479 | return -EINVAL; |
| 480 | |
| 481 | c_state->old_topology_name = top; |
| 482 | |
| 483 | return 0; |
| 484 | } |
| 485 | |
| 486 | /** |
Clarence Ip | 8962813 | 2017-07-27 13:33:51 -0400 | [diff] [blame] | 487 | * sde_connector_get_lp - helper accessor to retrieve LP state |
| 488 | * @connector: pointer to drm connector |
| 489 | * Returns: value of the CONNECTOR_PROP_LP property or 0 |
| 490 | */ |
| 491 | static inline uint64_t sde_connector_get_lp( |
| 492 | struct drm_connector *connector) |
| 493 | { |
| 494 | if (!connector || !connector->state) |
| 495 | return 0; |
| 496 | return sde_connector_get_property(connector->state, |
| 497 | CONNECTOR_PROP_LP); |
| 498 | } |
| 499 | |
| 500 | /** |
Clarence Ip | d86f6e4 | 2017-08-08 18:31:00 -0400 | [diff] [blame] | 501 | * sde_connector_set_property_for_commit - add property set to atomic state |
| 502 | * Add a connector state property update for the specified property index |
| 503 | * to the atomic state in preparation for a drm_atomic_commit. |
| 504 | * @connector: Pointer to drm connector |
| 505 | * @atomic_state: Pointer to DRM atomic state structure for commit |
| 506 | * @property_idx: Connector property index |
| 507 | * @value: Updated property value |
| 508 | * Returns: Zero on success |
| 509 | */ |
| 510 | int sde_connector_set_property_for_commit(struct drm_connector *connector, |
| 511 | struct drm_atomic_state *atomic_state, |
| 512 | uint32_t property_idx, uint64_t value); |
| 513 | |
| 514 | /** |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 515 | * sde_connector_init - create drm connector object for a given display |
| 516 | * @dev: Pointer to drm device struct |
| 517 | * @encoder: Pointer to associated encoder |
| 518 | * @panel: Pointer to associated panel, can be NULL |
| 519 | * @display: Pointer to associated display object |
| 520 | * @ops: Pointer to callback operations function table |
| 521 | * @connector_poll: Set to appropriate DRM_CONNECTOR_POLL_ setting |
| 522 | * @connector_type: Set to appropriate DRM_MODE_CONNECTOR_ type |
| 523 | * Returns: Pointer to newly created drm connector struct |
| 524 | */ |
| 525 | struct drm_connector *sde_connector_init(struct drm_device *dev, |
| 526 | struct drm_encoder *encoder, |
| 527 | struct drm_panel *panel, |
| 528 | void *display, |
| 529 | const struct sde_connector_ops *ops, |
| 530 | int connector_poll, |
| 531 | int connector_type); |
| 532 | |
Clarence Ip | e59fb3f | 2016-07-26 13:39:59 -0400 | [diff] [blame] | 533 | /** |
| 534 | * sde_connector_prepare_fence - prepare fence support for current commit |
| 535 | * @connector: Pointer to drm connector object |
| 536 | */ |
| 537 | void sde_connector_prepare_fence(struct drm_connector *connector); |
| 538 | |
| 539 | /** |
| 540 | * sde_connector_complete_commit - signal completion of current commit |
| 541 | * @connector: Pointer to drm connector object |
Veera Sundaram Sankaran | 675ff62 | 2017-06-21 21:44:46 -0700 | [diff] [blame] | 542 | * @ts: timestamp to be updated in the fence signalling |
Clarence Ip | e59fb3f | 2016-07-26 13:39:59 -0400 | [diff] [blame] | 543 | */ |
Veera Sundaram Sankaran | 675ff62 | 2017-06-21 21:44:46 -0700 | [diff] [blame] | 544 | void sde_connector_complete_commit(struct drm_connector *connector, ktime_t ts); |
Clarence Ip | e59fb3f | 2016-07-26 13:39:59 -0400 | [diff] [blame] | 545 | |
Clarence Ip | cb3afd4 | 2016-07-15 16:25:34 -0400 | [diff] [blame] | 546 | /** |
Dhaval Patel | fd8f774 | 2017-08-10 13:11:22 -0700 | [diff] [blame] | 547 | * sde_connector_commit_reset - reset the completion signal |
| 548 | * @connector: Pointer to drm connector object |
| 549 | * @ts: timestamp to be updated in the fence signalling |
| 550 | */ |
| 551 | void sde_connector_commit_reset(struct drm_connector *connector, ktime_t ts); |
| 552 | |
| 553 | /** |
Clarence Ip | cb3afd4 | 2016-07-15 16:25:34 -0400 | [diff] [blame] | 554 | * sde_connector_get_info - query display specific information |
| 555 | * @connector: Pointer to drm connector object |
| 556 | * @info: Pointer to msm display information structure |
| 557 | * Returns: Zero on success |
| 558 | */ |
| 559 | int sde_connector_get_info(struct drm_connector *connector, |
| 560 | struct msm_display_info *info); |
| 561 | |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 562 | /** |
Veera Sundaram Sankaran | bb2bf9a | 2017-03-29 18:56:47 -0700 | [diff] [blame] | 563 | * sde_connector_clk_ctrl - enables/disables the connector clks |
| 564 | * @connector: Pointer to drm connector object |
| 565 | * @enable: true/false to enable/disable |
Alan Kwong | 1124f1f | 2017-11-10 18:14:39 -0500 | [diff] [blame] | 566 | * Returns: Zero on success |
Veera Sundaram Sankaran | bb2bf9a | 2017-03-29 18:56:47 -0700 | [diff] [blame] | 567 | */ |
Alan Kwong | 1124f1f | 2017-11-10 18:14:39 -0500 | [diff] [blame] | 568 | int sde_connector_clk_ctrl(struct drm_connector *connector, bool enable); |
Veera Sundaram Sankaran | bb2bf9a | 2017-03-29 18:56:47 -0700 | [diff] [blame] | 569 | |
| 570 | /** |
Clarence Ip | 90b282d | 2017-05-04 10:00:32 -0700 | [diff] [blame] | 571 | * sde_connector_get_dpms - query dpms setting |
| 572 | * @connector: Pointer to drm connector structure |
| 573 | * Returns: Current DPMS setting for connector |
| 574 | */ |
| 575 | int sde_connector_get_dpms(struct drm_connector *connector); |
| 576 | |
| 577 | /** |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 578 | * sde_connector_trigger_event - indicate that an event has occurred |
| 579 | * Any callbacks that have been registered against this event will |
| 580 | * be called from the same thread context. |
| 581 | * @connector: Pointer to drm connector structure |
| 582 | * @event_idx: Index of event to trigger |
| 583 | * @instance_idx: Event-specific "instance index" to pass to callback |
| 584 | * @data0: Event-specific "data" to pass to callback |
| 585 | * @data1: Event-specific "data" to pass to callback |
| 586 | * @data2: Event-specific "data" to pass to callback |
| 587 | * @data3: Event-specific "data" to pass to callback |
| 588 | * Returns: Zero on success |
| 589 | */ |
| 590 | int sde_connector_trigger_event(void *drm_connector, |
| 591 | uint32_t event_idx, uint32_t instance_idx, |
| 592 | uint32_t data0, uint32_t data1, |
| 593 | uint32_t data2, uint32_t data3); |
| 594 | |
| 595 | /** |
| 596 | * sde_connector_register_event - register a callback function for an event |
| 597 | * @connector: Pointer to drm connector structure |
| 598 | * @event_idx: Index of event to register |
| 599 | * @cb_func: Pointer to desired callback function |
| 600 | * @usr: User pointer to pass to callback on event trigger |
| 601 | * Returns: Zero on success |
| 602 | */ |
| 603 | int sde_connector_register_event(struct drm_connector *connector, |
| 604 | uint32_t event_idx, |
Sandeep Panda | 11b20d8 | 2017-06-19 12:57:27 +0530 | [diff] [blame] | 605 | int (*cb_func)(uint32_t event_idx, |
Clarence Ip | a18d483 | 2017-03-13 12:35:44 -0700 | [diff] [blame] | 606 | uint32_t instance_idx, void *usr, |
| 607 | uint32_t data0, uint32_t data1, |
| 608 | uint32_t data2, uint32_t data3), |
| 609 | void *usr); |
| 610 | |
| 611 | /** |
| 612 | * sde_connector_unregister_event - unregister all callbacks for an event |
| 613 | * @connector: Pointer to drm connector structure |
| 614 | * @event_idx: Index of event to register |
| 615 | */ |
| 616 | void sde_connector_unregister_event(struct drm_connector *connector, |
| 617 | uint32_t event_idx); |
| 618 | |
Gopikrishnaiah Anandan | de2c81b | 2017-03-15 12:41:29 -0700 | [diff] [blame] | 619 | /** |
| 620 | * sde_connector_register_custom_event - register for async events |
| 621 | * @kms: Pointer to sde_kms |
| 622 | * @conn_drm: Pointer to drm connector object |
| 623 | * @event: Event for which request is being sent |
| 624 | * @en: Flag to enable/disable the event |
| 625 | * Returns: Zero on success |
| 626 | */ |
| 627 | int sde_connector_register_custom_event(struct sde_kms *kms, |
| 628 | struct drm_connector *conn_drm, u32 event, bool en); |
| 629 | |
Lloyd Atkinson | 05d7551 | 2017-01-17 14:45:51 -0500 | [diff] [blame] | 630 | /** |
| 631 | * sde_connector_pre_kickoff - trigger kickoff time feature programming |
| 632 | * @connector: Pointer to drm connector object |
| 633 | * Returns: Zero on success |
| 634 | */ |
| 635 | int sde_connector_pre_kickoff(struct drm_connector *connector); |
| 636 | |
Dhaval Patel | 5cb59be | 2017-04-20 20:00:56 -0700 | [diff] [blame] | 637 | /** |
| 638 | * sde_connector_needs_offset - adjust the output fence offset based on |
| 639 | * display type |
| 640 | * @connector: Pointer to drm connector object |
| 641 | * Returns: true if offset is required, false for all other cases. |
| 642 | */ |
| 643 | static inline bool sde_connector_needs_offset(struct drm_connector *connector) |
| 644 | { |
| 645 | struct sde_connector *c_conn; |
| 646 | |
| 647 | if (!connector) |
| 648 | return false; |
| 649 | |
| 650 | c_conn = to_sde_connector(connector); |
| 651 | return (c_conn->connector_type != DRM_MODE_CONNECTOR_VIRTUAL); |
| 652 | } |
| 653 | |
Ping Li | 8430ee1 | 2017-02-24 14:14:44 -0800 | [diff] [blame] | 654 | /** |
| 655 | * sde_connector_get_dither_cfg - get dither property data |
| 656 | * @conn: Pointer to drm_connector struct |
| 657 | * @state: Pointer to drm_connector_state struct |
| 658 | * @cfg: Pointer to pointer to dither cfg |
| 659 | * @len: length of the dither data |
| 660 | * Returns: Zero on success |
| 661 | */ |
| 662 | int sde_connector_get_dither_cfg(struct drm_connector *conn, |
| 663 | struct drm_connector_state *state, void **cfg, size_t *len); |
Clarence Ip | dd8021c | 2016-07-20 16:39:47 -0400 | [diff] [blame] | 664 | |
Sandeep Panda | 98d6ab2 | 2017-09-05 08:03:16 +0530 | [diff] [blame] | 665 | /** |
Jeykumar Sankaran | 83ddcb0 | 2017-10-27 11:34:50 -0700 | [diff] [blame] | 666 | * sde_connector_set_blob_data - set connector blob property data |
Jeykumar Sankaran | 736d79d | 2017-10-05 17:44:24 -0700 | [diff] [blame] | 667 | * @conn: Pointer to drm_connector struct |
Jeykumar Sankaran | 905ba33 | 2017-10-19 10:45:02 -0700 | [diff] [blame] | 668 | * @state: Pointer to the drm_connector_state struct |
Jeykumar Sankaran | 83ddcb0 | 2017-10-27 11:34:50 -0700 | [diff] [blame] | 669 | * @prop_id: property id to be populated |
Jeykumar Sankaran | 736d79d | 2017-10-05 17:44:24 -0700 | [diff] [blame] | 670 | * Returns: Zero on success |
| 671 | */ |
Jeykumar Sankaran | 83ddcb0 | 2017-10-27 11:34:50 -0700 | [diff] [blame] | 672 | int sde_connector_set_blob_data(struct drm_connector *conn, |
| 673 | struct drm_connector_state *state, |
| 674 | enum msm_mdp_conn_property prop_id); |
Jeykumar Sankaran | 736d79d | 2017-10-05 17:44:24 -0700 | [diff] [blame] | 675 | |
| 676 | /** |
| 677 | * sde_connector_roi_v1_check_roi - validate connector ROI |
| 678 | * @conn_state: Pointer to drm_connector_state struct |
| 679 | * Returns: Zero on success |
| 680 | */ |
| 681 | int sde_connector_roi_v1_check_roi(struct drm_connector_state *conn_state); |
| 682 | |
| 683 | /** |
Sandeep Panda | 98d6ab2 | 2017-09-05 08:03:16 +0530 | [diff] [blame] | 684 | * sde_connector_schedule_status_work - manage ESD thread |
| 685 | * conn: Pointer to drm_connector struct |
| 686 | * @en: flag to start/stop ESD thread |
| 687 | */ |
| 688 | void sde_connector_schedule_status_work(struct drm_connector *conn, bool en); |
| 689 | |
Lloyd Atkinson | e08229c | 2017-10-02 17:53:30 -0400 | [diff] [blame] | 690 | /** |
| 691 | * sde_connector_helper_reset_properties - reset properties to default values in |
| 692 | * the given DRM connector state object |
| 693 | * @connector: Pointer to DRM connector object |
| 694 | * @connector_state: Pointer to DRM connector state object |
| 695 | * Returns: 0 on success, negative errno on failure |
| 696 | */ |
| 697 | int sde_connector_helper_reset_custom_properties( |
| 698 | struct drm_connector *connector, |
| 699 | struct drm_connector_state *connector_state); |
| 700 | |
Jeykumar Sankaran | 905ba33 | 2017-10-19 10:45:02 -0700 | [diff] [blame] | 701 | /** |
| 702 | * sde_connector_get_mode_info - get information of the current mode in the |
| 703 | * given connector state. |
| 704 | * conn_state: Pointer to the DRM connector state object |
| 705 | * mode_info: Pointer to the mode info structure |
| 706 | */ |
| 707 | int sde_connector_get_mode_info(struct drm_connector_state *conn_state, |
| 708 | struct msm_mode_info *mode_info); |
| 709 | |
Dhaval Patel | 2a3c37a | 2017-10-25 12:30:36 -0700 | [diff] [blame] | 710 | /** |
| 711 | * sde_conn_timeline_status - current buffer timeline status |
| 712 | * conn: Pointer to drm_connector struct |
| 713 | */ |
| 714 | void sde_conn_timeline_status(struct drm_connector *conn); |
Clarence Ip | 458a5d0 | 2017-11-27 18:15:16 -0500 | [diff] [blame] | 715 | |
| 716 | /** |
| 717 | * sde_connector_helper_bridge_disable - helper function for drm bridge disable |
| 718 | * @connector: Pointer to DRM connector object |
| 719 | */ |
| 720 | void sde_connector_helper_bridge_disable(struct drm_connector *connector); |
| 721 | |
Ping Li | 8430ee1 | 2017-02-24 14:14:44 -0800 | [diff] [blame] | 722 | #endif /* _SDE_CONNECTOR_H_ */ |