diff options
author | Alan Cox <alan@linux.intel.com> | 2012-04-25 09:36:34 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-04-27 04:23:10 -0400 |
commit | 642c52fcc98aa441bda8c7d8252e8b9b563b370b (patch) | |
tree | ae82b0608f97abf08bbbe9a2a72574be8640cea6 | |
parent | 1896344b181549cea0ab38a810f4f8efcd6ecafb (diff) |
gma500: read the PLL bits
We need to pull more stuff from the VBT in order to configure the clocking
correctly in all cases. Add the relevant bits from the other CDV driver work.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/gma500/intel_bios.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/intel_bios.h | 39 | ||||
-rw-r--r-- | drivers/gpu/drm/gma500/psb_drv.h | 2 |
3 files changed, 59 insertions, 0 deletions
diff --git a/drivers/gpu/drm/gma500/intel_bios.c b/drivers/gpu/drm/gma500/intel_bios.c index d4d0c5b8bf91..51ea6df125f2 100644 --- a/drivers/gpu/drm/gma500/intel_bios.c +++ b/drivers/gpu/drm/gma500/intel_bios.c | |||
@@ -217,6 +217,23 @@ static void parse_general_features(struct drm_psb_private *dev_priv, | |||
217 | } | 217 | } |
218 | } | 218 | } |
219 | 219 | ||
220 | static void | ||
221 | parse_driver_features(struct drm_psb_private *dev_priv, | ||
222 | struct bdb_header *bdb) | ||
223 | { | ||
224 | struct bdb_driver_features *driver; | ||
225 | |||
226 | driver = find_section(bdb, BDB_DRIVER_FEATURES); | ||
227 | if (!driver) | ||
228 | return; | ||
229 | |||
230 | /* This bit means to use 96Mhz for DPLL_A or not */ | ||
231 | if (driver->primary_lfp_id) | ||
232 | dev_priv->dplla_96mhz = true; | ||
233 | else | ||
234 | dev_priv->dplla_96mhz = false; | ||
235 | } | ||
236 | |||
220 | /** | 237 | /** |
221 | * psb_intel_init_bios - initialize VBIOS settings & find VBT | 238 | * psb_intel_init_bios - initialize VBIOS settings & find VBT |
222 | * @dev: DRM device | 239 | * @dev: DRM device |
@@ -263,6 +280,7 @@ bool psb_intel_init_bios(struct drm_device *dev) | |||
263 | 280 | ||
264 | /* Grab useful general definitions */ | 281 | /* Grab useful general definitions */ |
265 | parse_general_features(dev_priv, bdb); | 282 | parse_general_features(dev_priv, bdb); |
283 | parse_driver_features(dev_priv, bdb); | ||
266 | parse_lfp_panel_data(dev_priv, bdb); | 284 | parse_lfp_panel_data(dev_priv, bdb); |
267 | parse_sdvo_panel_data(dev_priv, bdb); | 285 | parse_sdvo_panel_data(dev_priv, bdb); |
268 | parse_backlight_data(dev_priv, bdb); | 286 | parse_backlight_data(dev_priv, bdb); |
diff --git a/drivers/gpu/drm/gma500/intel_bios.h b/drivers/gpu/drm/gma500/intel_bios.h index 70f1bf018183..c67979ef6f0a 100644 --- a/drivers/gpu/drm/gma500/intel_bios.h +++ b/drivers/gpu/drm/gma500/intel_bios.h | |||
@@ -302,6 +302,45 @@ struct bdb_sdvo_lvds_options { | |||
302 | u8 panel_misc_bits_4; | 302 | u8 panel_misc_bits_4; |
303 | } __attribute__((packed)); | 303 | } __attribute__((packed)); |
304 | 304 | ||
305 | struct bdb_driver_features { | ||
306 | u8 boot_dev_algorithm:1; | ||
307 | u8 block_display_switch:1; | ||
308 | u8 allow_display_switch:1; | ||
309 | u8 hotplug_dvo:1; | ||
310 | u8 dual_view_zoom:1; | ||
311 | u8 int15h_hook:1; | ||
312 | u8 sprite_in_clone:1; | ||
313 | u8 primary_lfp_id:1; | ||
314 | |||
315 | u16 boot_mode_x; | ||
316 | u16 boot_mode_y; | ||
317 | u8 boot_mode_bpp; | ||
318 | u8 boot_mode_refresh; | ||
319 | |||
320 | u16 enable_lfp_primary:1; | ||
321 | u16 selective_mode_pruning:1; | ||
322 | u16 dual_frequency:1; | ||
323 | u16 render_clock_freq:1; /* 0: high freq; 1: low freq */ | ||
324 | u16 nt_clone_support:1; | ||
325 | u16 power_scheme_ui:1; /* 0: CUI; 1: 3rd party */ | ||
326 | u16 sprite_display_assign:1; /* 0: secondary; 1: primary */ | ||
327 | u16 cui_aspect_scaling:1; | ||
328 | u16 preserve_aspect_ratio:1; | ||
329 | u16 sdvo_device_power_down:1; | ||
330 | u16 crt_hotplug:1; | ||
331 | u16 lvds_config:2; | ||
332 | u16 tv_hotplug:1; | ||
333 | u16 hdmi_config:2; | ||
334 | |||
335 | u8 static_display:1; | ||
336 | u8 reserved2:7; | ||
337 | u16 legacy_crt_max_x; | ||
338 | u16 legacy_crt_max_y; | ||
339 | u8 legacy_crt_max_refresh; | ||
340 | |||
341 | u8 hdmi_termination; | ||
342 | u8 custom_vbt_version; | ||
343 | } __attribute__((packed)); | ||
305 | 344 | ||
306 | extern bool psb_intel_init_bios(struct drm_device *dev); | 345 | extern bool psb_intel_init_bios(struct drm_device *dev); |
307 | extern void psb_intel_destroy_bios(struct drm_device *dev); | 346 | extern void psb_intel_destroy_bios(struct drm_device *dev); |
diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h index 40ce2c9bc2e4..4c50969fd193 100644 --- a/drivers/gpu/drm/gma500/psb_drv.h +++ b/drivers/gpu/drm/gma500/psb_drv.h | |||
@@ -669,6 +669,8 @@ struct drm_psb_private { | |||
669 | u32 dspcntr[3]; | 669 | u32 dspcntr[3]; |
670 | 670 | ||
671 | int mdfld_panel_id; | 671 | int mdfld_panel_id; |
672 | |||
673 | bool dplla_96mhz; /* DPLL data from the VBT */ | ||
672 | }; | 674 | }; |
673 | 675 | ||
674 | 676 | ||