summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@jbarnes-t61.(none)>2008-05-23 18:42:47 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-05-23 18:42:47 -0700
commit9fc4ea5c00dfb91ebff893fb5092e768155cc2e2 (patch)
tree7dfdf71aa20e9786f3d50d89ea30614c2a73693f /shared-core
parentb4d8cda8e6d6ea319ab7c471d6d68b8af8693cfe (diff)
i915: do a better job of parsing VBIOS data
Add code to get panel modes from the VBIOS if present and check whether certain outputs exist. Should make our display detection code a little more robust.
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_drv.h26
-rw-r--r--shared-core/i915_init.c4
2 files changed, 17 insertions, 13 deletions
diff --git a/shared-core/i915_drv.h b/shared-core/i915_drv.h
index 84cc60f3..c5e22f7c 100644
--- a/shared-core/i915_drv.h
+++ b/shared-core/i915_drv.h
@@ -174,14 +174,17 @@ struct drm_i915_private {
int backlight_duty_cycle; /* restore backlight to this value */
bool panel_wants_dither;
struct drm_display_mode *panel_fixed_mode;
+ struct drm_display_mode *vbt_mode; /* if any */
/* DRI2 sarea */
struct drm_buffer_object *sarea_bo;
struct drm_bo_kmap_obj sarea_kmap;
- /* BIOS data */
- struct vbt_header *vbt;
- struct bdb_header *bdb;
+ /* Feature bits from the VBIOS */
+ int int_tv_support:1;
+ int lvds_dither:1;
+ int lvds_vbt:1;
+ int int_crt_support:1;
/* Register state */
u8 saveLBB;
@@ -1680,15 +1683,16 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
#define DSPATILEOFF 0x701A4 /* 965+ only */
/* VBIOS flags */
-#define SWF0 0x71410
-#define SWF1 0x71414
-#define SWF2 0x71418
-#define SWF3 0x7141c
-#define SWF4 0x71420
-#define SWF5 0x71424
-#define SWF6 0x71428
-
+#define SWF00 0x71410
+#define SWF01 0x71414
+#define SWF02 0x71418
+#define SWF03 0x7141c
+#define SWF04 0x71420
+#define SWF05 0x71424
+#define SWF06 0x71428
#define SWF10 0x70410
+#define SWF11 0x70414
+#define SWF14 0x71420
#define SWF30 0x72414
#define SWF31 0x72418
#define SWF32 0x7241c
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c
index f5fe5ba4..bda15e01 100644
--- a/shared-core/i915_init.c
+++ b/shared-core/i915_init.c
@@ -224,9 +224,9 @@ int i915_load_modeset_init(struct drm_device *dev)
goto destroy_hws;
}
- ret = intel_find_bios(dev);
+ ret = intel_init_bios(dev);
if (ret) {
- DRM_ERROR("failed to find VBT\n");
+ DRM_ERROR("failed to find VBIOS tables\n");
ret = -ENODEV;
goto destroy_wq;
}