aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra/drm.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/tegra/drm.h')
-rw-r--r--drivers/gpu/drm/tegra/drm.h58
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
83extern int tegra_drm_register_client(struct tegra_drm *tegra, 83int tegra_drm_register_client(struct tegra_drm *tegra,
84 struct tegra_drm_client *client); 84 struct tegra_drm_client *client);
85extern int tegra_drm_unregister_client(struct tegra_drm *tegra, 85int tegra_drm_unregister_client(struct tegra_drm *tegra,
86 struct tegra_drm_client *client); 86 struct tegra_drm_client *client);
87 87
88extern int tegra_drm_init(struct tegra_drm *tegra, struct drm_device *drm); 88int tegra_drm_init(struct tegra_drm *tegra, struct drm_device *drm);
89extern int tegra_drm_exit(struct tegra_drm *tegra); 89int tegra_drm_exit(struct tegra_drm *tegra);
90 90
91struct tegra_dc_soc_info; 91struct tegra_dc_soc_info;
92struct tegra_output; 92struct 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 */
166extern unsigned int tegra_dc_format(uint32_t format); 167void tegra_dc_enable_vblank(struct tegra_dc *dc);
167extern int tegra_dc_setup_window(struct tegra_dc *dc, unsigned int index, 168void tegra_dc_disable_vblank(struct tegra_dc *dc);
168 const struct tegra_dc_window *window); 169void tegra_dc_cancel_page_flip(struct drm_crtc *crtc, struct drm_file *file);
169extern void tegra_dc_enable_vblank(struct tegra_dc *dc);
170extern void tegra_dc_disable_vblank(struct tegra_dc *dc);
171extern void tegra_dc_cancel_page_flip(struct drm_crtc *crtc,
172 struct drm_file *file);
173 170
174struct tegra_output_ops { 171struct 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
235static inline int tegra_output_setup_clock(struct tegra_output *output, 232static 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 */
255int drm_host1x_init(struct drm_driver *driver, struct host1x_device *device);
256void drm_host1x_exit(struct drm_driver *driver, struct host1x_device *device);
257
258/* from rgb.c */ 252/* from rgb.c */
259extern int tegra_dc_rgb_probe(struct tegra_dc *dc); 253int tegra_dc_rgb_probe(struct tegra_dc *dc);
260extern int tegra_dc_rgb_remove(struct tegra_dc *dc); 254int tegra_dc_rgb_remove(struct tegra_dc *dc);
261extern int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc); 255int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc);
262extern int tegra_dc_rgb_exit(struct tegra_dc *dc); 256int tegra_dc_rgb_exit(struct tegra_dc *dc);
263 257
264/* from output.c */ 258/* from output.c */
265extern int tegra_output_probe(struct tegra_output *output); 259int tegra_output_probe(struct tegra_output *output);
266extern int tegra_output_remove(struct tegra_output *output); 260int tegra_output_remove(struct tegra_output *output);
267extern int tegra_output_init(struct drm_device *drm, struct tegra_output *output); 261int tegra_output_init(struct drm_device *drm, struct tegra_output *output);
268extern int tegra_output_exit(struct tegra_output *output); 262int tegra_output_exit(struct tegra_output *output);
269 263
270/* from dpaux.c */ 264/* from dpaux.c */
271
272struct tegra_dpaux; 265struct tegra_dpaux;
273struct drm_dp_link; 266struct drm_dp_link;
274struct drm_dp_aux;
275 267
276struct tegra_dpaux *tegra_dpaux_find_by_of_node(struct device_node *np); 268struct tegra_dpaux *tegra_dpaux_find_by_of_node(struct device_node *np);
277enum drm_connector_status tegra_dpaux_detect(struct tegra_dpaux *dpaux); 269enum 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);
289bool tegra_fb_is_bottom_up(struct drm_framebuffer *framebuffer); 281bool tegra_fb_is_bottom_up(struct drm_framebuffer *framebuffer);
290bool tegra_fb_is_tiled(struct drm_framebuffer *framebuffer); 282bool tegra_fb_is_tiled(struct drm_framebuffer *framebuffer);
291extern int tegra_drm_fb_init(struct drm_device *drm); 283int tegra_drm_fb_init(struct drm_device *drm);
292extern void tegra_drm_fb_exit(struct drm_device *drm); 284void tegra_drm_fb_exit(struct drm_device *drm);
293#ifdef CONFIG_DRM_TEGRA_FBDEV 285#ifdef CONFIG_DRM_TEGRA_FBDEV
294extern void tegra_fbdev_restore_mode(struct tegra_fbdev *fbdev); 286void tegra_fbdev_restore_mode(struct tegra_fbdev *fbdev);
295#endif 287#endif
296 288
297extern struct platform_driver tegra_dc_driver; 289extern struct platform_driver tegra_dc_driver;