diff options
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.h')
-rw-r--r-- | drivers/gpu/drm/tegra/drm.h | 58 |
1 files changed, 25 insertions, 33 deletions
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h index 126332c3ecbb..6b8fe9d86ed4 100644 --- a/drivers/gpu/drm/tegra/drm.h +++ b/drivers/gpu/drm/tegra/drm.h | |||
@@ -80,13 +80,13 @@ host1x_to_drm_client(struct host1x_client *client) | |||
80 | return container_of(client, struct tegra_drm_client, base); | 80 | return container_of(client, struct tegra_drm_client, base); |
81 | } | 81 | } |
82 | 82 | ||
83 | extern int tegra_drm_register_client(struct tegra_drm *tegra, | 83 | int tegra_drm_register_client(struct tegra_drm *tegra, |
84 | struct tegra_drm_client *client); | 84 | struct tegra_drm_client *client); |
85 | extern int tegra_drm_unregister_client(struct tegra_drm *tegra, | 85 | int tegra_drm_unregister_client(struct tegra_drm *tegra, |
86 | struct tegra_drm_client *client); | 86 | struct tegra_drm_client *client); |
87 | 87 | ||
88 | extern int tegra_drm_init(struct tegra_drm *tegra, struct drm_device *drm); | 88 | int tegra_drm_init(struct tegra_drm *tegra, struct drm_device *drm); |
89 | extern int tegra_drm_exit(struct tegra_drm *tegra); | 89 | int tegra_drm_exit(struct tegra_drm *tegra); |
90 | 90 | ||
91 | struct tegra_dc_soc_info; | 91 | struct tegra_dc_soc_info; |
92 | struct tegra_output; | 92 | struct tegra_output; |
@@ -156,6 +156,7 @@ struct tegra_dc_window { | |||
156 | } dst; | 156 | } dst; |
157 | unsigned int bits_per_pixel; | 157 | unsigned int bits_per_pixel; |
158 | unsigned int format; | 158 | unsigned int format; |
159 | unsigned int swap; | ||
159 | unsigned int stride[2]; | 160 | unsigned int stride[2]; |
160 | unsigned long base[3]; | 161 | unsigned long base[3]; |
161 | bool bottom_up; | 162 | bool bottom_up; |
@@ -163,19 +164,15 @@ struct tegra_dc_window { | |||
163 | }; | 164 | }; |
164 | 165 | ||
165 | /* from dc.c */ | 166 | /* from dc.c */ |
166 | extern unsigned int tegra_dc_format(uint32_t format); | 167 | void tegra_dc_enable_vblank(struct tegra_dc *dc); |
167 | extern int tegra_dc_setup_window(struct tegra_dc *dc, unsigned int index, | 168 | void tegra_dc_disable_vblank(struct tegra_dc *dc); |
168 | const struct tegra_dc_window *window); | 169 | void tegra_dc_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file); |
169 | extern void tegra_dc_enable_vblank(struct tegra_dc *dc); | ||
170 | extern void tegra_dc_disable_vblank(struct tegra_dc *dc); | ||
171 | extern void tegra_dc_cancel_page_flip(struct drm_crtc *crtc, | ||
172 | struct drm_file *file); | ||
173 | 170 | ||
174 | struct tegra_output_ops { | 171 | struct tegra_output_ops { |
175 | int (*enable)(struct tegra_output *output); | 172 | int (*enable)(struct tegra_output *output); |
176 | int (*disable)(struct tegra_output *output); | 173 | int (*disable)(struct tegra_output *output); |
177 | int (*setup_clock)(struct tegra_output *output, struct clk *clk, | 174 | int (*setup_clock)(struct tegra_output *output, struct clk *clk, |
178 | unsigned long pclk); | 175 | unsigned long pclk, unsigned int *div); |
179 | int (*check_mode)(struct tegra_output *output, | 176 | int (*check_mode)(struct tegra_output *output, |
180 | struct drm_display_mode *mode, | 177 | struct drm_display_mode *mode, |
181 | enum drm_mode_status *status); | 178 | enum drm_mode_status *status); |
@@ -233,10 +230,11 @@ static inline int tegra_output_disable(struct tegra_output *output) | |||
233 | } | 230 | } |
234 | 231 | ||
235 | static inline int tegra_output_setup_clock(struct tegra_output *output, | 232 | static inline int tegra_output_setup_clock(struct tegra_output *output, |
236 | struct clk *clk, unsigned long pclk) | 233 | struct clk *clk, unsigned long pclk, |
234 | unsigned int *div) | ||
237 | { | 235 | { |
238 | if (output && output->ops && output->ops->setup_clock) | 236 | if (output && output->ops && output->ops->setup_clock) |
239 | return output->ops->setup_clock(output, clk, pclk); | 237 | return output->ops->setup_clock(output, clk, pclk, div); |
240 | 238 | ||
241 | return output ? -ENOSYS : -EINVAL; | 239 | return output ? -ENOSYS : -EINVAL; |
242 | } | 240 | } |
@@ -251,27 +249,21 @@ static inline int tegra_output_check_mode(struct tegra_output *output, | |||
251 | return output ? -ENOSYS : -EINVAL; | 249 | return output ? -ENOSYS : -EINVAL; |
252 | } | 250 | } |
253 | 251 | ||
254 | /* from bus.c */ | ||
255 | int drm_host1x_init(struct drm_driver *driver, struct host1x_device *device); | ||
256 | void drm_host1x_exit(struct drm_driver *driver, struct host1x_device *device); | ||
257 | |||
258 | /* from rgb.c */ | 252 | /* from rgb.c */ |
259 | extern int tegra_dc_rgb_probe(struct tegra_dc *dc); | 253 | int tegra_dc_rgb_probe(struct tegra_dc *dc); |
260 | extern int tegra_dc_rgb_remove(struct tegra_dc *dc); | 254 | int tegra_dc_rgb_remove(struct tegra_dc *dc); |
261 | extern int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc); | 255 | int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc); |
262 | extern int tegra_dc_rgb_exit(struct tegra_dc *dc); | 256 | int tegra_dc_rgb_exit(struct tegra_dc *dc); |
263 | 257 | ||
264 | /* from output.c */ | 258 | /* from output.c */ |
265 | extern int tegra_output_probe(struct tegra_output *output); | 259 | int tegra_output_probe(struct tegra_output *output); |
266 | extern int tegra_output_remove(struct tegra_output *output); | 260 | int tegra_output_remove(struct tegra_output *output); |
267 | extern int tegra_output_init(struct drm_device *drm, struct tegra_output *output); | 261 | int tegra_output_init(struct drm_device *drm, struct tegra_output *output); |
268 | extern int tegra_output_exit(struct tegra_output *output); | 262 | int tegra_output_exit(struct tegra_output *output); |
269 | 263 | ||
270 | /* from dpaux.c */ | 264 | /* from dpaux.c */ |
271 | |||
272 | struct tegra_dpaux; | 265 | struct tegra_dpaux; |
273 | struct drm_dp_link; | 266 | struct drm_dp_link; |
274 | struct drm_dp_aux; | ||
275 | 267 | ||
276 | struct tegra_dpaux *tegra_dpaux_find_by_of_node(struct device_node *np); | 268 | struct tegra_dpaux *tegra_dpaux_find_by_of_node(struct device_node *np); |
277 | enum drm_connector_status tegra_dpaux_detect(struct tegra_dpaux *dpaux); | 269 | enum drm_connector_status tegra_dpaux_detect(struct tegra_dpaux *dpaux); |
@@ -288,10 +280,10 @@ struct tegra_bo *tegra_fb_get_plane(struct drm_framebuffer *framebuffer, | |||
288 | unsigned int index); | 280 | unsigned int index); |
289 | bool tegra_fb_is_bottom_up(struct drm_framebuffer *framebuffer); | 281 | bool tegra_fb_is_bottom_up(struct drm_framebuffer *framebuffer); |
290 | bool tegra_fb_is_tiled(struct drm_framebuffer *framebuffer); | 282 | bool tegra_fb_is_tiled(struct drm_framebuffer *framebuffer); |
291 | extern int tegra_drm_fb_init(struct drm_device *drm); | 283 | int tegra_drm_fb_init(struct drm_device *drm); |
292 | extern void tegra_drm_fb_exit(struct drm_device *drm); | 284 | void tegra_drm_fb_exit(struct drm_device *drm); |
293 | #ifdef CONFIG_DRM_TEGRA_FBDEV | 285 | #ifdef CONFIG_DRM_TEGRA_FBDEV |
294 | extern void tegra_fbdev_restore_mode(struct tegra_fbdev *fbdev); | 286 | void tegra_fbdev_restore_mode(struct tegra_fbdev *fbdev); |
295 | #endif | 287 | #endif |
296 | 288 | ||
297 | extern struct platform_driver tegra_dc_driver; | 289 | extern struct platform_driver tegra_dc_driver; |