xf86-video-intel: Branch 'modesetting' - 3 commits - src/i830_modes.c src/i830_video.c
Keith Packard
keithp at kemper.freedesktop.org
Wed Oct 25 20:07:54 EEST 2006
src/i830_modes.c | 18 +++++++++++++++++-
src/i830_video.c | 26 +++++++++++++-------------
2 files changed, 30 insertions(+), 14 deletions(-)
New commits:
diff-tree cd9c6e29146e1debaba4b0b9ad0d241f07bdbc14 (from parents)
Merge: c5cca4c20ae6b519e3b021a9d90809c1b3d1facb eec5580cefffc293bf547372ab63b2fedaef4a83
Author: Keith Packard <keithp at neko.keithp.com>
Date: Tue Oct 24 16:53:46 2006 -0700
Merge branch 'modesetting-origin' into modesetting
diff-tree c5cca4c20ae6b519e3b021a9d90809c1b3d1facb (from bf3820f1f505649ac0730add23d97d6de3f6d22c)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Fri Oct 13 15:31:43 2006 -0700
Advertise textured video adapter first
diff --git a/src/i830_video.c b/src/i830_video.c
index 6a18f93..47f4a03 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -454,19 +454,6 @@ I830InitVideo(ScreenPtr pScreen)
xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
xvContrast = MAKE_ATOM("XV_CONTRAST");
- /* Set up overlay video if we can do it at this depth. */
- if (!IS_I965G(pI830) && pScrn->bitsPerPixel != 8) {
- overlayAdaptor = I830SetupImageVideoOverlay(pScreen);
- if (overlayAdaptor != NULL) {
- adaptors[num_adaptors++] = overlayAdaptor;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up overlay video\n");
- } else {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "Failed to set up overlay video\n");
- }
- I830InitOffscreenImages(pScreen);
- }
-
/* Set up textured video if we can do it at this depth and we are on
* supported hardware.
*/
@@ -481,6 +468,19 @@ I830InitVideo(ScreenPtr pScreen)
}
}
+ /* Set up overlay video if we can do it at this depth. */
+ if (!IS_I965G(pI830) && pScrn->bitsPerPixel != 8) {
+ overlayAdaptor = I830SetupImageVideoOverlay(pScreen);
+ if (overlayAdaptor != NULL) {
+ adaptors[num_adaptors++] = overlayAdaptor;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up overlay video\n");
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Failed to set up overlay video\n");
+ }
+ I830InitOffscreenImages(pScreen);
+ }
+
if (num_adaptors)
xf86XVScreenInit(pScreen, adaptors, num_adaptors);
diff-tree bf3820f1f505649ac0730add23d97d6de3f6d22c (from d649fb0d964a9b40b8e04314b5fc14bbbfd41bc3)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Fri Oct 6 21:57:26 2006 -0700
Compute LVDS resolution from server DPI and native panel size.
I was unable to find the native LVDS panel physical size in the BDB
information. I would prefer to report accurate information through RandR if
possible though.
diff --git a/src/i830_modes.c b/src/i830_modes.c
index ac7c4c5..9301dda 100644
--- a/src/i830_modes.c
+++ b/src/i830_modes.c
@@ -651,11 +651,27 @@ static MonPtr
i830GetLVDSMonitor(ScrnInfoPtr pScrn)
{
MonPtr mon;
+ DisplayModePtr mode;
mon = xnfcalloc(1, sizeof(*mon));
mon->Modes = i830GetLVDSModes(pScrn, pScrn->display->modes);
mon->Last = i830GetModeListTail(mon->Modes);
-
+ /*
+ * Find the preferred mode, use the display resolution to compute
+ * the effective monitor size
+ */
+ for (mode = mon->Modes; mode; mode = mode->next)
+ if (mode->type & M_T_PREFERRED)
+ break;
+ if (!mode)
+ mode = mon->Modes;
+ if (mode)
+ {
+#define MMPERINCH 25.4
+ mon->widthmm = (double) mode->HDisplay / pScrn->xDpi * MMPERINCH;
+ mon->heightmm = (double) mode->VDisplay / pScrn->yDpi * MMPERINCH;
+ }
+
return mon;
}
More information about the xorg-commit
mailing list