summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-05-17 23:26:14 -0700
committerKeith Packard <keithp@keithp.com>2008-05-17 23:26:14 -0700
commitc81050c0058e32098259b5078515807038beb7d6 (patch)
tree3cfdef0013b7d826f59e3747bd55d43b638336fe
parent9c9a5d0e48c6e911574695fc417d2dc1a0fd1c20 (diff)
parente9532f3abf1e0b62b2569d4aae60a5a63add571f (diff)
Merge commit 'origin/master' into drm-gem
-rw-r--r--configure.ac10
-rw-r--r--man/intel.man87
-rw-r--r--src/i810_reg.h31
-rw-r--r--src/i830.h19
-rw-r--r--src/i830_debug.c4
-rw-r--r--src/i830_driver.c34
-rw-r--r--src/i830_exa.c5
-rw-r--r--src/i830_lvds.c12
-rw-r--r--src/i830_quirks.c28
-rw-r--r--src/i830_render.c5
-rw-r--r--src/i915_render.c5
-rw-r--r--src/i965_render.c6
-rw-r--r--src/reg_dumper/idle.c60
-rw-r--r--src/reg_dumper/reg_dumper.h2
-rw-r--r--src/xvmc/Makefile.am2
15 files changed, 290 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac
index f814ade2..898c70b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ XORG_DRIVER_CHECK_EXT(XF86DRI, xextproto x11)
XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server xproto xvmc fontsproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for libraries.
@@ -198,7 +198,7 @@ fi
AM_CONDITIONAL(DRI, test x$DRI = xyes)
if test "$DRI" = yes; then
- PKG_CHECK_MODULES(DRI, [libdrm xf86driproto])
+ PKG_CHECK_MODULES(DRI, [libdrm xf86driproto glproto])
AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
PKG_CHECK_MODULES(DRI_MM, [libdrm >= 2.3.1],[DRI_MM=yes], [DRI_MM=no])
@@ -233,17 +233,21 @@ if test "$VIDEO_DEBUG" = yes; then
AC_DEFINE(VIDEO_DEBUG,1,[Enable debug support])
fi
-AC_MSG_CHECKING([whether to include XvMC support])
if test "$XVMC" = auto; then
XVMC="$DRI"
fi
if test "$XVMC" = yes && test "$DRI" = no; then
AC_MSG_ERROR([XvMC can't be enabled without DRI])
fi
+if test "$XVMC" = yes; then
+ PKG_CHECK_MODULES(XVMCLIB, [xvmc], [XVMC=yes], [XVMC=no])
+fi
+AC_MSG_CHECKING([whether to include XvMC support])
AC_MSG_RESULT([$XVMC])
AM_CONDITIONAL(XVMC, test x$XVMC = xyes)
if test "$XVMC" = yes; then
AC_DEFINE(ENABLE_XVMC,1,[Enable XvMC support])
+ AC_SUBST([XVMCLIB_CFLAGS])
fi
diff --git a/man/intel.man b/man/intel.man
index 8a8b7a09..aac0efa6 100644
--- a/man/intel.man
+++ b/man/intel.man
@@ -200,6 +200,15 @@ LVDS-connected display on the other hand is extremely washed out
(e.g. white on a lighter white), trying this option might clear the
problem.
.TP
+.BI "Option \*qLVDSFixedMode\*q \*q" boolean \*q
+Use a fixed set of timings for the LVDS output, independent of normal
+xorg specified timings. The default value if left unspecified is
+true, which is what you want for a normal LVDS-connected LCD type of
+panel. If you are not sure about this, leave it at its default, which
+allows the driver to automatically figure out the correct fixed panel
+timings. See further in the section about LVDS fixed timing for more
+information.
+.TP
.BI "Option \*qXvMC\*q \*q" boolean \*q
Enable XvMC driver. Current support MPEG2 MC on 915/945 and G33 series.
User should provide absolute path to libIntelXvMC.so in XvMCConfig file.
@@ -295,6 +304,84 @@ sections with these outputs for configuration. Associating Monitor sections
with each output can be helpful if you need to ignore a specific output, for
example, or statically configure an extended desktop monitor layout.
+.SH HARDWARE LVDS FIXED TIMINGS AND SCALING
+
+Following here is a discussion that should shed some light on the
+nature and reasoning behind the LVDSFixedMode option.
+
+Unlike a CRT display, an LCD has a "native" resolution corresponding
+to the actual pixel geometry. A graphics controller under all normal
+circumstances should always output that resolution (and timings) to
+the display. Anything else and the image might not fill the display,
+it might not be centered, or it might have information missing - any
+manner of strange effects can happen if an LCD panel is not fed with
+the expected resolution and timings.
+
+However there are cases where one might want to run an LCD panel at an
+effective resolution other than the native one. And for this reason,
+GPUs which drive LCD panels typically include a hardware scaler to
+match the user-configured frame buffer size to the actual size of the
+panel. Thus when one "sets" his/her 1280x1024 panel to only 1024x768,
+the GPU happily configures a 1024x768 frame buffer, but it scans the
+buffer out in such a way that the image is scaled to 1280x1024 and in
+fact sends 1280x1024 to the panel. This is normally invisible to the
+user; when a "fuzzy" LCD image is seen, scaling like this is why this
+happens.
+
+In order to make this magic work, this driver logically has to be
+configured with two sets of monitor timings - the set specified (or
+otherwise determined) as the normal xorg "mode", and the "fixed"
+timings that are actually sent to the monitor. But with xorg, it's
+only possible to specify the first user-driven set, and not the second
+fixed set. So how does the driver figure out the correct fixed panel
+timings? Normally it will attempt to detect the fixed timings, and it
+uses a number of strategies to figure this out. First it attempts to
+read EDID data from whatever is connected to the LVDS port. Failing
+that, it will check if the LVDS output is already configured (perhaps
+previously by the video BIOS) and will adopt those settings if found.
+Failing that, it will scan the video BIOS ROM, looking for an embedded
+mode table from which it can infer the proper timings. If even that
+fails, then the driver gives up, prints the message "Couldn't detect
+panel mode. Disabling panel" to the X server log, and shuts down the
+LVDS output.
+
+Under most circumstances, the detection scheme works. However there
+are cases when it can go awry. For example, if you have a panel
+without EDID support and it isn't integral to the motherboard
+(i.e. not a laptop), then odds are the driver is either not going to
+find something suitable to use or it is going to find something
+flat-out wrong, leaving a messed up display. Remember that this is
+about the fixed timings being discussed here and not the
+user-specified timings which can always be set in xorg.conf in the
+worst case. So when this process goes awry there seems to be little
+recourse. This sort of scenario can happen in some embedded
+applications.
+
+The LVDSFixedMode option is present to deal with this. This option
+normally enables the above-described detection strategy. And since it
+defaults to true, this is in fact what normally happens. However if
+the detection fails to do the right thing, the LVDSFixedMode option
+can instead be set to false, which disables all the magic. With
+LVDSFixedMode set to false, the detection steps are skipped and the
+driver proceeds without a specified fixed mode timing. This then
+causes the hardware scaler to be disabled, and the actual timings then
+used fall back to those normally configured via the usual xorg
+mechanisms.
+
+Having LVDSFixedMode set to false means that whatever is used for the
+monitor's mode (e.g. a modeline setting) is precisely what is sent to
+the device connected to the LVDS port. This also means that the user
+now has to determine the correct mode to use - but it's really no
+different than the work for correctly configuring an old-school CRT
+anyway, and the alternative if detection fails will be a useless
+display.
+
+In short, leave LVDSFixedMode alone (thus set to true) and normal
+fixed mode detection will take place, which in most cases is exactly
+what is needed. Set LVDSFixedMode to false and then the user has full
+control over the resolution and timings sent to the LVDS-connected
+device, through the usual means in xorg.
+
.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
.SH AUTHORS
diff --git a/src/i810_reg.h b/src/i810_reg.h
index 837865da..f60656ea 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -353,7 +353,37 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#define IPEIR 0x2088
#define IPEHR 0x208C
+
#define INST_DONE 0x2090
+# define IDCT_DONE (1 << 30)
+# define IQ_DONE (1 << 29)
+# define PR_DONE (1 << 28)
+# define VLD_DONE (1 << 27)
+# define IP_DONE (1 << 26)
+# define FBC_DONE (1 << 25)
+# define BINNER_DONE (1 << 24)
+# define SF_DONE (1 << 23)
+# define SE_DONE (1 << 22)
+# define WM_DONE (1 << 21)
+# define IZ_DONE (1 << 20)
+# define PERSPECTIVE_INTERP_DONE (1 << 19)
+# define DISPATCHER_DONE (1 << 18)
+# define PROJECTION_DONE (1 << 17)
+# define DEPENDENT_ADDRESS_DONE (1 << 16)
+# define QUAD_CACHE_DONE (1 << 15)
+# define TEXTURE_FETCH_DONE (1 << 14)
+# define TEXTURE_DECOMPRESS_DONE (1 << 13)
+# define SAMPLER_CACHE_DONE (1 << 12)
+# define FILTER_DONE (1 << 11)
+# define BYPASS_FIFO_DONE (1 << 10)
+# define PS_DONE (1 << 9)
+# define CC_DONE (1 << 8)
+# define MAP_FILTER_DONE (1 << 7)
+# define MAP_L2_IDLE (1 << 6)
+# define RING_2_ENABLE (1 << 2)
+# define RING_1_ENABLE (1 << 1)
+# define RING_0_ENABLE (1 << 0)
+
#define SCPD0 0x209c /* debug */
#define INST_PS 0x20c4
#define IPEIR_I965 0x2064 /* i965 */
@@ -498,6 +528,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#define FWATER_BLC 0x20d8
#define FWATER_BLC2 0x20dc
+#define FWATER_BLC_SELF 0x20e0
#define MM_BURST_LENGTH 0x00700000
#define MM_FIFO_WATERMARK 0x0001F000
#define LM_BURST_LENGTH 0x00000700
diff --git a/src/i830.h b/src/i830.h
index f694d606..c363a5f7 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -626,6 +626,12 @@ typedef struct _I830Rec {
uint32_t saveVCLK_DIVISOR_VGA1;
uint32_t saveVCLK_POST_DIV;
uint32_t saveVGACNTRL;
+ uint32_t saveCURSOR_A_CONTROL;
+ uint32_t saveCURSOR_A_BASE;
+ uint32_t saveCURSOR_A_POSITION;
+ uint32_t saveCURSOR_B_CONTROL;
+ uint32_t saveCURSOR_B_BASE;
+ uint32_t saveCURSOR_B_POSITION;
uint32_t saveADPA;
uint32_t saveLVDS;
uint32_t saveDVOA;
@@ -651,6 +657,7 @@ typedef struct _I830Rec {
/** Enables logging of debug output related to mode switching. */
Bool debug_modes;
+ Bool lvds_fixed_mode;
unsigned int quirk_flag;
} I830Rec;
@@ -867,6 +874,17 @@ static inline int i830_fb_compression_supported(I830Ptr pI830)
Bool i830_pixmap_tiled(PixmapPtr p);
+#define i830_exa_check_pitch_2d(p) do {\
+ uint32_t pitch = intel_get_pixmap_pitch(p);\
+ if (pitch > KB(32)) I830FALLBACK("pitch exceeds 2d limit 32K\n");\
+} while(0)
+
+/* For pre-965 chip only, as they have 8KB limit for 3D */
+#define i830_exa_check_pitch_3d(p) do {\
+ uint32_t pitch = intel_get_pixmap_pitch(p);\
+ if (pitch > KB(8)) I830FALLBACK("pitch exceeds 3d limit 8K\n");\
+} while(0)
+
/* Batchbuffer compatibility handling */
#define BEGIN_BATCH(n) BEGIN_LP_RING(n)
#define ENSURE_BATCH(n)
@@ -895,6 +913,7 @@ extern const int I830CopyROP[16];
#define QUIRK_IGNORE_MACMINI_LVDS 0x00000004
#define QUIRK_PIPEA_FORCE 0x00000008
#define QUIRK_IVCH_NEED_DVOB 0x00000010
+#define QUIRK_RESET_MODES 0x00000020
extern void i830_fixup_devices(ScrnInfoPtr);
#endif /* _I830_H_ */
diff --git a/src/i830_debug.c b/src/i830_debug.c
index e90ea22a..eff2b740 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -546,6 +546,10 @@ static struct i830SnapshotRec {
DEFINEREG(FBC_FENCE_OFF),
DEFINEREG(FBC_MOD_NUM),
+ DEFINEREG(FWATER_BLC),
+ DEFINEREG(FWATER_BLC2),
+ DEFINEREG(FWATER_BLC_SELF),
+
DEFINEREG2(FPA0, i830_debug_fp),
DEFINEREG2(FPA1, i830_debug_fp),
DEFINEREG2(DPLL_A, i830_debug_dpll),
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6e5e92c4..9809e4b8 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -305,6 +305,7 @@ typedef enum {
#ifdef XF86DRI_MM
OPTION_INTELTEXPOOL,
#endif
+ OPTION_LVDSFIXEDMODE,
OPTION_TRIPLEBUFFER,
OPTION_FORCEENABLEPIPEA,
#ifdef INTEL_XVMC
@@ -332,6 +333,7 @@ static OptionInfoRec I830Options[] = {
#ifdef XF86DRI_MM
{OPTION_INTELTEXPOOL,"Legacy3D", OPTV_BOOLEAN, {0}, FALSE},
#endif
+ {OPTION_LVDSFIXEDMODE, "LVDSFixedMode", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_TRIPLEBUFFER, "TripleBuffer", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_FORCEENABLEPIPEA, "ForceEnablePipeA", OPTV_BOOLEAN, {0}, FALSE},
#ifdef INTEL_XVMC
@@ -1416,6 +1418,12 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
pI830->lvds_24_bit_mode = FALSE;
}
+ if (xf86ReturnOptValBool(pI830->Options, OPTION_LVDSFIXEDMODE, TRUE)) {
+ pI830->lvds_fixed_mode = TRUE;
+ } else {
+ pI830->lvds_fixed_mode = FALSE;
+ }
+
if (xf86ReturnOptValBool(pI830->Options, OPTION_FORCEENABLEPIPEA, FALSE))
pI830->quirk_flag |= QUIRK_PIPEA_FORCE;
@@ -2037,6 +2045,13 @@ SaveHWState(ScrnInfoPtr pScrn)
pI830->saveVCLK_POST_DIV = INREG(VCLK_POST_DIV);
pI830->saveVGACNTRL = INREG(VGACNTRL);
+ pI830->saveCURSOR_A_CONTROL = INREG(CURSOR_A_CONTROL);
+ pI830->saveCURSOR_A_POSITION = INREG(CURSOR_A_POSITION);
+ pI830->saveCURSOR_A_BASE = INREG(CURSOR_A_BASE);
+ pI830->saveCURSOR_B_CONTROL = INREG(CURSOR_B_CONTROL);
+ pI830->saveCURSOR_B_POSITION = INREG(CURSOR_B_POSITION);
+ pI830->saveCURSOR_B_BASE = INREG(CURSOR_B_BASE);
+
for(i = 0; i < 7; i++) {
pI830->saveSWF[i] = INREG(SWF0 + (i << 2));
pI830->saveSWF[i+7] = INREG(SWF00 + (i << 2));
@@ -2238,6 +2253,20 @@ RestoreHWState(ScrnInfoPtr pScrn)
OUTREG(VGACNTRL, pI830->saveVGACNTRL);
+ /*
+ * Restore cursors
+ * Even though the X cursor is hidden before we restore the hw state,
+ * we probably only disabled one cursor plane. If we're going from
+ * e.g. plane b to plane a here in RestoreHWState, we need to restore
+ * both cursor plane settings.
+ */
+ OUTREG(CURSOR_A_POSITION, pI830->saveCURSOR_A_POSITION);
+ OUTREG(CURSOR_A_BASE, pI830->saveCURSOR_A_BASE);
+ OUTREG(CURSOR_A_CONTROL, pI830->saveCURSOR_A_CONTROL);
+ OUTREG(CURSOR_B_POSITION, pI830->saveCURSOR_B_POSITION);
+ OUTREG(CURSOR_B_BASE, pI830->saveCURSOR_B_BASE);
+ OUTREG(CURSOR_B_CONTROL, pI830->saveCURSOR_B_CONTROL);
+
/* Restore outputs */
for (i = 0; i < xf86_config->num_output; i++) {
xf86OutputPtr output = xf86_config->output[i];
@@ -2411,7 +2440,7 @@ I830BlockHandler(int i,
* after the page flipping updates, so there's no need to duplicate
* the effort here.
*/
- if (!pI830->noAccel && !pI830->directRenderingEnabled)
+ if (pScrn->vtSema && !pI830->noAccel && !pI830->directRenderingEnabled)
I830EmitFlush(pScrn);
I830VideoBlockHandler(i, blockData, pTimeout, pReadmask);
@@ -3523,6 +3552,9 @@ I830PMEvent(int scrnIndex, pmEvent event, Bool undo)
I830CheckDevicesTimer(NULL, 0, pScrn);
SaveScreens(SCREEN_SAVER_FORCER, ScreenSaverReset);
+ if (pI830->quirk_flag & QUIRK_RESET_MODES)
+ xf86SetDesiredModes(pScrn);
+
break;
default:
ErrorF("I830PMEvent: received APM event %d\n", event);
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 9b5bb936..2c807c51 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -170,6 +170,8 @@ I830EXAPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg)
if (pPixmap->drawable.bitsPerPixel == 24)
I830FALLBACK("solid 24bpp unsupported!\n");
+ i830_exa_check_pitch_2d(pPixmap);
+
offset = exaGetPixmapOffset(pPixmap);
pitch = exaGetPixmapPitch(pPixmap);
@@ -255,6 +257,9 @@ I830EXAPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
if (!EXA_PM_IS_SOLID(&pSrcPixmap->drawable, planemask))
I830FALLBACK("planemask is not solid");
+ i830_exa_check_pitch_2d(pSrcPixmap);
+ i830_exa_check_pitch_2d(pDstPixmap);
+
pI830->pSrcPixmap = pSrcPixmap;
pI830->BR[13] = I830CopyROP[alu] << 16;
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 1562c217..899c6cbf 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -671,7 +671,7 @@ i830_lvds_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
/* Letterbox will have top/bottom borders */
top_border = (dev_priv->panel_fixed_mode->VDisplay -
- mode->VDisplay) / 2;
+ scaled_height) / 2;
bottom_border = top_border;
if (mode->VDisplay & 1)
bottom_border++;
@@ -1228,6 +1228,14 @@ i830_lvds_init(ScrnInfoPtr pScrn)
*/
I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOC, "LVDSDDC_C");
+ if (!pI830->lvds_fixed_mode) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Skipping any attempt to determine panel fixed mode.\n");
+ goto skip_panel_fixed_mode_setup;
+ }
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Attempting to determine panel fixed mode.\n");
+
/* Attempt to get the fixed panel mode from DDC. Assume that the preferred
* mode is the right one.
*/
@@ -1311,6 +1319,8 @@ i830_lvds_init(ScrnInfoPtr pScrn)
goto disable_exit;
}
+ skip_panel_fixed_mode_setup:
+
/* Blacklist machines with BIOSes that list an LVDS panel without actually
* having one.
*/
diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 24c96587..b1c14238 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -161,6 +161,15 @@ static void i830_dmi_dump(void)
DMIID_DUMP(chassis_asset_tag);
}
+/*
+ * Some machines hose the display regs regardless of the ACPI DOS
+ * setting, so we need to reset modes at ACPI event time.
+ */
+static void quirk_reset_modes (I830Ptr pI830)
+{
+ pI830->quirk_flag |= QUIRK_RESET_MODES;
+}
+
static void quirk_pipea_force (I830Ptr pI830)
{
pI830->quirk_flag |= QUIRK_PIPEA_FORCE;
@@ -226,6 +235,8 @@ static i830_quirk i830_quirk_list[] = {
{ PCI_CHIP_I965_GM, 0x1028, 0x0254, quirk_ignore_tv },
/* Dell Inspiron 1735 */
{ PCI_CHIP_I965_GM, 0x1028, 0x0256, quirk_ignore_tv },
+ /* Dell Inspiron 1318 */
+ { PCI_CHIP_I965_GM, 0x1028, 0x0286, quirk_ignore_tv },
/* Lenovo Napa TV (use dmi)*/
{ PCI_CHIP_I945_GM, 0x17aa, SUBSYS_ANY, quirk_lenovo_tv_dmi },
@@ -255,11 +266,10 @@ static i830_quirk i830_quirk_list[] = {
/* HP Compaq 6730s has no TV output */
{ PCI_CHIP_IGD_GM, 0x103c, 0x30e8, quirk_ignore_tv },
- /* Dell Inspiron 510m needs pipe A force quirk */
- { PCI_CHIP_I855_GM, 0x1028, 0x0164, quirk_pipea_force },
-
/* Thinkpad R31 needs pipe A force quirk */
{ PCI_CHIP_I830_M, 0x1014, 0x0505, quirk_pipea_force },
+ /* Dell Latitude D400 needs pipe A force quirk (LP: #228519) */
+ { PCI_CHIP_I855_GM, 0x1028, 0x0139, quirk_pipea_force },
/* Dell Latitude D500 needs pipe A force quirk */
{ PCI_CHIP_I855_GM, 0x1028, 0x0152, quirk_pipea_force },
/* Dell Latitude X300 needs pipe A force quirk */
@@ -268,16 +278,26 @@ static i830_quirk i830_quirk_list[] = {
{ PCI_CHIP_I855_GM, 0x1028, 0x0164, quirk_pipea_force },
/* Toshiba Protege R-205, S-209 needs pipe A force quirk */
{ PCI_CHIP_I915_GM, 0x1179, 0x0001, quirk_pipea_force },
+ /* Intel 855GM hardware (See LP: #216490) */
+ { PCI_CHIP_I855_GM, 0x1028, 0x00c8, quirk_pipea_force },
/* ThinkPad X40 needs pipe A force quirk */
{ PCI_CHIP_I855_GM, 0x1014, 0x0557, quirk_pipea_force },
/* Sony vaio PCG-r600HFP (fix bug 13722) */
{ PCI_CHIP_I830_M, 0x104d, 0x8100, quirk_ivch_dvob },
+ /* Sony vaio VGN-SZ4MN (See LP: #212163) */
+ { PCI_CHIP_I830_M, 0x104d, 0x81e6, quirk_pipea_force },
- /* Intel 945GM hardware (See LP: #152416) */
+ /* Ordi Enduro UW31 (See LP: #152416) */
{ PCI_CHIP_I945_GM, 0x1584, 0x9900, quirk_ignore_tv },
+ /* Dell Latitude D500 needs reset modes quirk */
+ { PCI_CHIP_I855_GM, 0x1028, 0x0152, quirk_reset_modes },
+
+ /* Littlebit Sepia X35 (rebranded Asus Z37E) (See LP: #201257) */
+ { PCI_CHIP_I965_GM, 0x1043, 0x8265, quirk_ignore_tv },
+
{ 0, 0, 0, NULL },
};
diff --git a/src/i830_render.c b/src/i830_render.c
index 195e9a8c..3a959e82 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -398,6 +398,11 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture,
Bool is_affine_src, is_affine_mask;
Bool is_nearest = FALSE;
+ i830_exa_check_pitch_3d(pSrc);
+ if (pMask)
+ i830_exa_check_pitch_3d(pMask);
+ i830_exa_check_pitch_3d(pDst);
+
IntelEmitInvarientState(pScrn);
*pI830->last_3d = LAST_3D_RENDER;
diff --git a/src/i915_render.c b/src/i915_render.c
index 2b9ed04e..4a02cf54 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -323,6 +323,11 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
Bool is_affine_src, is_affine_mask;
Bool is_nearest = FALSE;
+ i830_exa_check_pitch_3d(pSrc);
+ if (pMask)
+ i830_exa_check_pitch_3d(pMask);
+ i830_exa_check_pitch_3d(pDst);
+
IntelEmitInvarientState(pScrn);
*pI830->last_3d = LAST_3D_RENDER;
diff --git a/src/i965_render.c b/src/i965_render.c
index 3c553de1..4a8f9b86 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -858,8 +858,10 @@ i965_set_picture_surface_state(ScrnInfoPtr pScrn, struct brw_surface_state *ss,
local_ss.ss0.surface_type = BRW_SURFACE_2D;
if (is_dst) {
uint32_t dst_format;
+ Bool ret = TRUE;
- assert(i965_get_dest_format(pPicture, &dst_format) == TRUE);
+ ret = i965_get_dest_format(pPicture, &dst_format);
+ assert(ret == TRUE);
local_ss.ss0.surface_format = dst_format;
} else {
local_ss.ss0.surface_format = i965_get_card_format(pPicture);
@@ -883,7 +885,7 @@ i965_set_picture_surface_state(ScrnInfoPtr pScrn, struct brw_surface_state *ss,
local_ss.ss2.width = pPixmap->drawable.width - 1;
local_ss.ss3.pitch = intel_get_pixmap_pitch(pPixmap) - 1;
local_ss.ss3.tile_walk = 0; /* Tiled X */
- local_ss.ss3.tiled_surface = i830_pixmap_tiled(pPixmap);
+ local_ss.ss3.tiled_surface = i830_pixmap_tiled(pPixmap) ? 1 : 0;
memcpy(ss, &local_ss, sizeof(local_ss));
diff --git a/src/reg_dumper/idle.c b/src/reg_dumper/idle.c
index bc9dbb71..46a2fd5c 100644
--- a/src/reg_dumper/idle.c
+++ b/src/reg_dumper/idle.c
@@ -42,6 +42,36 @@ struct idle_flags {
unsigned int count;
};
+struct idle_flags i915_idle_flags[] = {
+ {IDCT_DONE, "IDCT"},
+ {IQ_DONE, "IQ"},
+ {PR_DONE, "PR"},
+ {VLD_DONE, "VLD"},
+ {IP_DONE, "IP"},
+ {FBC_DONE, "FBC"},
+ {BINNER_DONE, "BINNER"},
+ {SF_DONE, "SF"},
+ {SE_DONE, "SE"},
+ {WM_DONE, "WM"},
+ {IZ_DONE, "IZ"},
+ {PERSPECTIVE_INTERP_DONE, "perspective interpolation"},
+ {DISPATCHER_DONE, "dispatcher"},
+ {PROJECTION_DONE, "projection and LOD"},
+ {DEPENDENT_ADDRESS_DONE, "dependent address calc"},
+ {TEXTURE_FETCH_DONE, "texture fetch"},
+ {TEXTURE_DECOMPRESS_DONE, "texture decompress"},
+ {SAMPLER_CACHE_DONE, "sampler cache"},
+ {FILTER_DONE, "filter"},
+ {BYPASS_FIFO_DONE, "bypass FIFO"},
+ {PS_DONE, "PS"},
+ {CC_DONE, "CC"},
+ {MAP_FILTER_DONE, "map filter"},
+ {MAP_L2_IDLE, "map L2"},
+
+ {0, "total"},
+ {0, "other"},
+};
+
struct idle_flags i965_idle_flags[] = {
{I965_SF_DONE, "SF"},
{I965_SE_DONE, "SE"},
@@ -60,12 +90,17 @@ struct idle_flags i965_idle_flags[] = {
/* Fills in the "other" and "total" fields' idle flags */
static void
-setup_other_flags(struct idle_flags *idle_flags, int idle_flag_count)
+setup_other_flags(I830Ptr pI830,
+ struct idle_flags *idle_flags, int idle_flag_count)
{
uint32_t other_idle_flags, total_idle_flags = 0;
int i;
- other_idle_flags = ~(I965_RING_0_ENABLE);
+ if (IS_I965G(pI830))
+ other_idle_flags = ~(I965_RING_0_ENABLE);
+ else
+ other_idle_flags = ~(RING_0_ENABLE | RING_1_ENABLE | RING_2_ENABLE);
+
for (i = 0; i < idle_flag_count - 2; i++) {
other_idle_flags &= ~idle_flags[i].instdone_flag;
total_idle_flags |= idle_flags[i].instdone_flag;
@@ -127,17 +162,26 @@ int main(int argc, char **argv)
scrn.scrnIndex = 0;
scrn.pI830 = &i830;
- /* if (IS_I965) { */
- idle_flags = i965_idle_flags;
- idle_flag_count = sizeof(i965_idle_flags) / sizeof(i965_idle_flags[0]);
+ if (IS_I965G(pI830)) {
+ idle_flags = i965_idle_flags;
+ idle_flag_count = ARRAY_SIZE(i965_idle_flags);
+ } else {
+ idle_flags = i915_idle_flags;
+ idle_flag_count = ARRAY_SIZE(i915_idle_flags);
+ }
- setup_other_flags(idle_flags, idle_flag_count);
+ setup_other_flags(pI830, idle_flags, idle_flag_count);
for (;;) {
int i, j;
for (i = 0; i < 100; i++) {
- uint32_t instdone = INREG(INST_DONE_I965);
+ uint32_t instdone;
+
+ if (IS_I965G(pI830))
+ instdone = INREG(INST_DONE_I965);
+ else
+ instdone = INREG(INST_DONE);
for (j = 0; j < idle_flag_count; j++) {
if ((instdone & idle_flags[j].instdone_flag) !=
@@ -149,7 +193,7 @@ int main(int argc, char **argv)
}
for (j = 0; j < idle_flag_count; j++) {
- printf("%15s: %3d\n", idle_flags[j].name, idle_flags[j].count);
+ printf("%25s: %3d\n", idle_flags[j].name, idle_flags[j].count);
idle_flags[j].count = 0;
}
printf("\n");
diff --git a/src/reg_dumper/reg_dumper.h b/src/reg_dumper/reg_dumper.h
index 769adb27..9a723b9b 100644
--- a/src/reg_dumper/reg_dumper.h
+++ b/src/reg_dumper/reg_dumper.h
@@ -69,6 +69,8 @@ typedef struct _scrn {
#define I830PTR(pScrn) (pScrn->pI830)
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
+
#define INREG8(reg) (*(volatile uint8_t *)((pI830)->mmio + (reg)))
#define INREG16(reg) (*(volatile uint16_t *)((pI830)->mmio + (reg)))
#define INREG(reg) (*(volatile uint32_t *)((pI830)->mmio + (reg)))
diff --git a/src/xvmc/Makefile.am b/src/xvmc/Makefile.am
index 7ae429ab..f571743f 100644
--- a/src/xvmc/Makefile.am
+++ b/src/xvmc/Makefile.am
@@ -22,7 +22,7 @@ libIntelXvMC_la_SOURCES = intel_xvmc.c \
xf86dristr.h \
driDrawable.c \
driDrawable.h
-libIntelXvMC_la_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(top_srcdir)/src -DTRUE=1 -DFALSE=0
+libIntelXvMC_la_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @XVMCLIB_CFLAGS@ -I$(top_srcdir)/src -DTRUE=1 -DFALSE=0
libIntelXvMC_la_LDFLAGS = -version-number 1:0:0
libIntelXvMC_la_LIBADD = @DRI_LIBS@
endif