diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_mode.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_mode.h | 49 |
1 files changed, 32 insertions, 17 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h index 5413fcd63086..67358baf28b2 100644 --- a/drivers/gpu/drm/radeon/radeon_mode.h +++ b/drivers/gpu/drm/radeon/radeon_mode.h | |||
@@ -34,11 +34,12 @@ | |||
34 | #include <drm_mode.h> | 34 | #include <drm_mode.h> |
35 | #include <drm_edid.h> | 35 | #include <drm_edid.h> |
36 | #include <drm_dp_helper.h> | 36 | #include <drm_dp_helper.h> |
37 | #include <drm_fixed.h> | ||
37 | #include <linux/i2c.h> | 38 | #include <linux/i2c.h> |
38 | #include <linux/i2c-id.h> | 39 | #include <linux/i2c-id.h> |
39 | #include <linux/i2c-algo-bit.h> | 40 | #include <linux/i2c-algo-bit.h> |
40 | #include "radeon_fixed.h" | ||
41 | 41 | ||
42 | struct radeon_bo; | ||
42 | struct radeon_device; | 43 | struct radeon_device; |
43 | 44 | ||
44 | #define to_radeon_crtc(x) container_of(x, struct radeon_crtc, base) | 45 | #define to_radeon_crtc(x) container_of(x, struct radeon_crtc, base) |
@@ -65,6 +66,16 @@ enum radeon_tv_std { | |||
65 | TV_STD_PAL_N, | 66 | TV_STD_PAL_N, |
66 | }; | 67 | }; |
67 | 68 | ||
69 | enum radeon_hpd_id { | ||
70 | RADEON_HPD_1 = 0, | ||
71 | RADEON_HPD_2, | ||
72 | RADEON_HPD_3, | ||
73 | RADEON_HPD_4, | ||
74 | RADEON_HPD_5, | ||
75 | RADEON_HPD_6, | ||
76 | RADEON_HPD_NONE = 0xff, | ||
77 | }; | ||
78 | |||
68 | /* radeon gpio-based i2c | 79 | /* radeon gpio-based i2c |
69 | * 1. "mask" reg and bits | 80 | * 1. "mask" reg and bits |
70 | * grabs the gpio pins for software use | 81 | * grabs the gpio pins for software use |
@@ -84,7 +95,7 @@ struct radeon_i2c_bus_rec { | |||
84 | /* id used by atom */ | 95 | /* id used by atom */ |
85 | uint8_t i2c_id; | 96 | uint8_t i2c_id; |
86 | /* id used by atom */ | 97 | /* id used by atom */ |
87 | uint8_t hpd_id; | 98 | enum radeon_hpd_id hpd; |
88 | /* can be used with hw i2c engine */ | 99 | /* can be used with hw i2c engine */ |
89 | bool hw_capable; | 100 | bool hw_capable; |
90 | /* uses multi-media i2c engine */ | 101 | /* uses multi-media i2c engine */ |
@@ -202,6 +213,8 @@ enum radeon_dvo_chip { | |||
202 | DVO_SIL1178, | 213 | DVO_SIL1178, |
203 | }; | 214 | }; |
204 | 215 | ||
216 | struct radeon_fbdev; | ||
217 | |||
205 | struct radeon_mode_info { | 218 | struct radeon_mode_info { |
206 | struct atom_context *atom_context; | 219 | struct atom_context *atom_context; |
207 | struct card_info *atom_card_info; | 220 | struct card_info *atom_card_info; |
@@ -218,6 +231,9 @@ struct radeon_mode_info { | |||
218 | struct drm_property *tmds_pll_property; | 231 | struct drm_property *tmds_pll_property; |
219 | /* hardcoded DFP edid from BIOS */ | 232 | /* hardcoded DFP edid from BIOS */ |
220 | struct edid *bios_hardcoded_edid; | 233 | struct edid *bios_hardcoded_edid; |
234 | |||
235 | /* pointer to fbdev info structure */ | ||
236 | struct radeon_fbdev *rfbdev; | ||
221 | }; | 237 | }; |
222 | 238 | ||
223 | #define MAX_H_CODE_TIMING_LEN 32 | 239 | #define MAX_H_CODE_TIMING_LEN 32 |
@@ -339,6 +355,7 @@ struct radeon_encoder { | |||
339 | enum radeon_rmx_type rmx_type; | 355 | enum radeon_rmx_type rmx_type; |
340 | struct drm_display_mode native_mode; | 356 | struct drm_display_mode native_mode; |
341 | void *enc_priv; | 357 | void *enc_priv; |
358 | int audio_polling_active; | ||
342 | int hdmi_offset; | 359 | int hdmi_offset; |
343 | int hdmi_config_offset; | 360 | int hdmi_config_offset; |
344 | int hdmi_audio_workaround; | 361 | int hdmi_audio_workaround; |
@@ -363,16 +380,6 @@ struct radeon_gpio_rec { | |||
363 | u32 mask; | 380 | u32 mask; |
364 | }; | 381 | }; |
365 | 382 | ||
366 | enum radeon_hpd_id { | ||
367 | RADEON_HPD_NONE = 0, | ||
368 | RADEON_HPD_1, | ||
369 | RADEON_HPD_2, | ||
370 | RADEON_HPD_3, | ||
371 | RADEON_HPD_4, | ||
372 | RADEON_HPD_5, | ||
373 | RADEON_HPD_6, | ||
374 | }; | ||
375 | |||
376 | struct radeon_hpd { | 383 | struct radeon_hpd { |
377 | enum radeon_hpd_id hpd; | 384 | enum radeon_hpd_id hpd; |
378 | u8 plugged_state; | 385 | u8 plugged_state; |
@@ -532,11 +539,10 @@ extern void radeon_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green, | |||
532 | u16 blue, int regno); | 539 | u16 blue, int regno); |
533 | extern void radeon_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, | 540 | extern void radeon_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, |
534 | u16 *blue, int regno); | 541 | u16 *blue, int regno); |
535 | struct drm_framebuffer *radeon_framebuffer_create(struct drm_device *dev, | 542 | void radeon_framebuffer_init(struct drm_device *dev, |
536 | struct drm_mode_fb_cmd *mode_cmd, | 543 | struct radeon_framebuffer *rfb, |
537 | struct drm_gem_object *obj); | 544 | struct drm_mode_fb_cmd *mode_cmd, |
538 | 545 | struct drm_gem_object *obj); | |
539 | int radeonfb_probe(struct drm_device *dev); | ||
540 | 546 | ||
541 | int radeonfb_remove(struct drm_device *dev, struct drm_framebuffer *fb); | 547 | int radeonfb_remove(struct drm_device *dev, struct drm_framebuffer *fb); |
542 | bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev); | 548 | bool radeon_get_legacy_connector_info_from_bios(struct drm_device *dev); |
@@ -575,4 +581,13 @@ void radeon_legacy_tv_adjust_pll2(struct drm_encoder *encoder, | |||
575 | void radeon_legacy_tv_mode_set(struct drm_encoder *encoder, | 581 | void radeon_legacy_tv_mode_set(struct drm_encoder *encoder, |
576 | struct drm_display_mode *mode, | 582 | struct drm_display_mode *mode, |
577 | struct drm_display_mode *adjusted_mode); | 583 | struct drm_display_mode *adjusted_mode); |
584 | |||
585 | /* fbdev layer */ | ||
586 | int radeon_fbdev_init(struct radeon_device *rdev); | ||
587 | void radeon_fbdev_fini(struct radeon_device *rdev); | ||
588 | void radeon_fbdev_set_suspend(struct radeon_device *rdev, int state); | ||
589 | int radeon_fbdev_total_size(struct radeon_device *rdev); | ||
590 | bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj); | ||
591 | |||
592 | void radeon_fb_output_poll_changed(struct radeon_device *rdev); | ||
578 | #endif | 593 | #endif |