diff options
author | Jesse Barnes <jbarnes@jbarnes-t61.(none)> | 2008-08-05 13:02:47 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-08-05 13:02:47 -0700 |
commit | 4f1f30854260e18b8b9c4103eebbad5dcf729ce6 (patch) | |
tree | c3fdc92c76fee35fee4e6e8b37d3aa45672e3c37 /src | |
parent | e9e6b4738573ffa3822ae68088bd53a645eedbce (diff) | |
parent | 2aaa207db2cea03ba05c439b5074807689f2c5be (diff) |
Merge branch 'master' into drm-gem
Conflicts:
src/i830_driver.c
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 6 | ||||
-rw-r--r-- | src/common.h | 2 | ||||
-rw-r--r-- | src/i830_debug.c | 2 | ||||
-rw-r--r-- | src/i830_display.c | 7 | ||||
-rw-r--r-- | src/i830_dri.c | 2 | ||||
-rw-r--r-- | src/i830_driver.c | 22 | ||||
-rw-r--r-- | src/i830_hdmi.c | 2 | ||||
-rw-r--r-- | src/i830_quirks.c | 6 | ||||
-rw-r--r-- | src/i830_sdvo.c | 9 | ||||
-rw-r--r-- | src/i830_sdvo_regs.h | 2 | ||||
-rw-r--r-- | src/i830_tv.c | 1 | ||||
-rw-r--r-- | src/i965_render.c | 2 |
12 files changed, 41 insertions, 22 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index e3bbdcea..2932233d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -37,7 +37,7 @@ AM_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@ @DRM_CFLAGS@ @DRI_CFLAGS@ \ intel_drv_la_LTLIBRARIES = intel_drv.la intel_drv_la_LDFLAGS = -module -avoid-version intel_drv_ladir = @moduledir@/drivers -intel_drv_la_LIBADD = +intel_drv_la_LIBADD = -lm if XSERVER_LIBPCIACCESS intel_drv_la_LIBADD += @PCIACCESS_LIBS@ endif @@ -142,7 +142,6 @@ INTEL_G4A = \ exa_wm_src_sample_argb.g4a \ exa_wm_src_sample_a.g4a \ exa_wm_src_sample_planar.g4a \ - exa_wm_src_data.g4a \ exa_wm_mask_affine.g4a \ exa_wm_mask_projective.g4a \ exa_wm_mask_sample_argb.g4a \ @@ -151,6 +150,7 @@ INTEL_G4A = \ exa_wm_ca.g4a \ exa_wm_ca_srcalpha.g4a \ exa_wm_write.g4a \ + exa_wm_yuv_rgb.g4a \ exa_wm_xy.g4a INTEL_G4I = \ @@ -168,7 +168,6 @@ INTEL_G4B = \ exa_wm_src_sample_argb.g4b \ exa_wm_src_sample_a.g4b \ exa_wm_src_sample_planar.g4b \ - exa_wm_src_data.g4b \ exa_wm_mask_affine.g4b \ exa_wm_mask_projective.g4b \ exa_wm_mask_sample_argb.g4b \ @@ -177,6 +176,7 @@ INTEL_G4B = \ exa_wm_ca.g4b \ exa_wm_ca_srcalpha.g4b \ exa_wm_write.g4b \ + exa_wm_yuv_rgb.g4b \ exa_wm_xy.g4b EXTRA_DIST = \ diff --git a/src/common.h b/src/common.h index 57db6cb0..f2ae502b 100644 --- a/src/common.h +++ b/src/common.h @@ -374,6 +374,8 @@ extern int I810_DEBUG; /* chipsets require status page in non stolen memory */ #define HWS_NEED_NONSTOLEN(pI810) (IS_GM45(pI810) || IS_G4X(pI810)) #define SUPPORTS_INTEGRATED_HDMI(pI810) (IS_GM45(pI810) || IS_G4X(pI810)) +/* dsparb controlled by hw only */ +#define DSPARB_HWCONTROL(pI810) (IS_G4X(pI810) || IS_GM45(pI810)) #define GTT_PAGE_SIZE KB(4) #define ROUND_TO(x, y) (((x) + (y) - 1) / (y) * (y)) diff --git a/src/i830_debug.c b/src/i830_debug.c index 21e52504..1671e255 100644 --- a/src/i830_debug.c +++ b/src/i830_debug.c @@ -1314,8 +1314,6 @@ i830_valid_command (uint32_t cmd) if (!mi_cmds[opcode]) return -1; break; - case 1: - break; case 2: /* 2D */ count = (cmd & 0x1f) + 2; opcode = (cmd >> 22) & 0x7f; diff --git a/src/i830_display.c b/src/i830_display.c index 69bf7f77..e1dad03c 100644 --- a/src/i830_display.c +++ b/src/i830_display.c @@ -1249,7 +1249,7 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, xf86DrvMsg(pScrn->scrnIndex, X_INFO, "clone detected, disabling SSC\n"); /* Don't use SSC when cloned */ - if (pI830->lvds_use_ssc && num_outputs < 2) { + if (is_lvds && pI830->lvds_use_ssc && num_outputs < 2) { refclk = pI830->lvds_ssc_freq * 1000; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "using SSC reference clock of %d MHz\n", refclk / 1000); @@ -1477,6 +1477,9 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, /* Wait for the clocks to stabilize. */ usleep(150); + if (!DSPARB_HWCONTROL(pI830)) + i830_update_dsparb(pScrn); + OUTREG(htot_reg, (adjusted_mode->CrtcHDisplay - 1) | ((adjusted_mode->CrtcHTotal - 1) << 16)); OUTREG(hblank_reg, (adjusted_mode->CrtcHBlankStart - 1) | @@ -1510,8 +1513,6 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, i830WaitForVblank(pScrn); - i830_update_dsparb(pScrn); - /* Clear any FIFO underrun status that may have occurred normally */ OUTREG(pipestat_reg, INREG(pipestat_reg) | FIFO_UNDERRUN); } diff --git a/src/i830_dri.c b/src/i830_dri.c index 387e9876..46783721 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -381,7 +381,7 @@ I830InitVisualConfigs(ScreenPtr pScreen) i = 0; for (accum = 0; accum <= 1; accum++) { - for (depth = 0; depth <= 1; depth++) { /* and stencil */ + for (depth = 1; depth >= 0; depth--) { /* and stencil */ for (db = 1; db >= 0; db--) { pConfigs[i].vid = -1; pConfigs[i].class = -1; diff --git a/src/i830_driver.c b/src/i830_driver.c index dcbaa040..4cede907 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2016,7 +2016,8 @@ SaveHWState(ScrnInfoPtr pScrn) } /* Save video mode information for native mode-setting. */ - pI830->saveDSPARB = INREG(DSPARB); + if (!DSPARB_HWCONTROL(pI830)) + pI830->saveDSPARB = INREG(DSPARB); pI830->saveDSPACNTR = INREG(DSPACNTR); pI830->savePIPEACONF = INREG(PIPEACONF); @@ -2159,7 +2160,8 @@ RestoreHWState(ScrnInfoPtr pScrn) if (!IS_I830(pI830) && !IS_845G(pI830)) OUTREG(PFIT_CONTROL, pI830->savePFIT_CONTROL); - OUTREG(DSPARB, pI830->saveDSPARB); + if (!DSPARB_HWCONTROL(pI830)) + OUTREG(DSPARB, pI830->saveDSPARB); OUTREG(DSPCLK_GATE_D, pI830->saveDSPCLK_GATE_D); OUTREG(RENCLK_GATE_D1, pI830->saveRENCLK_GATE_D1); @@ -2485,6 +2487,7 @@ I830BlockHandler(int i, ScreenPtr pScreen = screenInfo.screens[i]; ScrnInfoPtr pScrn = xf86Screens[i]; I830Ptr pI830 = I830PTR(pScrn); + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); pScreen->BlockHandler = pI830->BlockHandler; @@ -2516,13 +2519,18 @@ I830BlockHandler(int i, * (except for mode setting, where it may occur naturally). * Check & ack the condition. */ - if (INREG(PIPEASTAT) & FIFO_UNDERRUN) { + if (pScrn->vtSema && !DSPARB_HWCONTROL(pI830)) { + if (xf86_config->crtc[0]->enabled && + (INREG(PIPEASTAT) & FIFO_UNDERRUN)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "underrun on pipe A!\n"); OUTREG(PIPEASTAT, INREG(PIPEASTAT) | FIFO_UNDERRUN); - } - if (INREG(PIPEBSTAT) & FIFO_UNDERRUN) { + } + if (xf86_config->num_crtc > 1 && + xf86_config->crtc[1]->enabled && + (INREG(PIPEBSTAT) & FIFO_UNDERRUN)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "underrun on pipe B!\n"); OUTREG(PIPEBSTAT, INREG(PIPEBSTAT) | FIFO_UNDERRUN); + } } I830VideoBlockHandler(i, blockData, pTimeout, pReadmask); @@ -3381,7 +3389,7 @@ I830LeaveVT(int scrnIndex, int flags) } #endif /* XF86DRI */ - if (IS_I965G(pI830)) + if (pI830->useEXA && IS_I965G(pI830)) gen4_render_state_cleanup(pScrn); if (pI830->AccelInfoRec) @@ -3434,7 +3442,7 @@ I830EnterVT(int scrnIndex, int flags) intel_batch_init(pScrn); - if (IS_I965G(pI830)) + if (pI830->useEXA && IS_I965G(pI830)) gen4_render_state_init(pScrn); if (i830_check_error_state(pScrn)) { diff --git a/src/i830_hdmi.c b/src/i830_hdmi.c index b738463c..58d1c49a 100644 --- a/src/i830_hdmi.c +++ b/src/i830_hdmi.c @@ -229,5 +229,5 @@ i830_hdmi_init(ScrnInfoPtr pScrn, int output_reg) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HDMI output %d detected\n", - 1 + (output_reg - SDVOB)); + (output_reg == SDVOB) ? 1 : 2); } diff --git a/src/i830_quirks.c b/src/i830_quirks.c index 3becf357..5ae2898a 100644 --- a/src/i830_quirks.c +++ b/src/i830_quirks.c @@ -203,7 +203,8 @@ static void quirk_lenovo_tv_dmi (I830Ptr pI830) ErrorF("Failed to load DMI info, X60 TV quirk not applied.\n"); return; } - if (!strncmp(i830_dmi_data[bios_version], "7B", 2)) + if (!strncmp(i830_dmi_data[bios_version], "7B", 2) || /* X60, X60s */ + !strncmp(i830_dmi_data[bios_version], "7E", 2)) /* R60e */ pI830->quirk_flag |= QUIRK_IGNORE_TV; } @@ -222,6 +223,9 @@ static i830_quirk i830_quirk_list[] = { /* Apple Mac mini has no lvds, but macbook pro does */ { PCI_CHIP_I945_GM, 0x8086, 0x7270, quirk_mac_mini }, + /* Transtec Senyo 610 mini pc */ + { PCI_CHIP_I965_GM, 0x1509, 0x2f15, quirk_ignore_lvds }, + /* Clevo M720R has no tv output */ { PCI_CHIP_I965_GM, 0x1558, 0x0721, quirk_ignore_tv }, diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c index d9b76d40..701aeaa1 100644 --- a/src/i830_sdvo.c +++ b/src/i830_sdvo.c @@ -228,23 +228,30 @@ const static struct _sdvo_cmd_name { SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_SUPPORTED_POWER_STATES), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_ENCODER_POWER_STATE), SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_ENCODER_POWER_STATE), - SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_TV_RESOLUTION_SUPPORT), SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_CONTROL_BUS_SWITCH), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_SDTV_RESOLUTION_SUPPORT), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_SUPPORTED_ENHANCEMENTS), /* HDMI op code */ SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_SUPP_ENCODE), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_ENCODE), + SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_ENCODE), + SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_PIXEL_REPLI), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_PIXEL_REPLI), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_COLORIMETRY_CAP), + SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_COLORIMETRY), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_COLORIMETRY), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_AUDIO_ENCRYPT_PREFER), + SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_AUDIO_STAT), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_AUDIO_STAT), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_HBUF_INDEX), SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_HBUF_INDEX), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_HBUF_INFO), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_HBUF_AV_SPLIT), + SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_HBUF_AV_SPLIT), SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_HBUF_TXRATE), + SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_HBUF_TXRATE), + SDVO_CMD_NAME_ENTRY(SDVO_CMD_SET_HBUF_DATA), + SDVO_CMD_NAME_ENTRY(SDVO_CMD_GET_HBUF_DATA), }; static I2CSlaveAddr slaveAddr; diff --git a/src/i830_sdvo_regs.h b/src/i830_sdvo_regs.h index 747f2cdd..4d555557 100644 --- a/src/i830_sdvo_regs.h +++ b/src/i830_sdvo_regs.h @@ -503,8 +503,6 @@ struct i830_sdvo_enhancements_arg { # define SDVO_DITHER_ON (1 << 0) # define SDVO_DITHER_DEFAULT_ON (1 << 1) -#define SDVO_CMD_SET_TV_RESOLUTION_SUPPORT 0x93 - #define SDVO_CMD_SET_CONTROL_BUS_SWITCH 0x7a # define SDVO_CONTROL_BUS_PROM (1 << 0) # define SDVO_CONTROL_BUS_DDC1 (1 << 1) diff --git a/src/i830_tv.c b/src/i830_tv.c index 651f77b3..1022c469 100644 --- a/src/i830_tv.c +++ b/src/i830_tv.c @@ -36,6 +36,7 @@ #include "xf86.h" #include "i830.h" #include "i830_display.h" +#include "i830_bios.h" #include "X11/Xatom.h" #include <string.h> diff --git a/src/i965_render.c b/src/i965_render.c index 1cbfe242..8360be4a 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -862,7 +862,7 @@ i965_set_picture_surface_state(ScrnInfoPtr pScrn, struct brw_surface_state *ss, memset(&local_ss, 0, sizeof(local_ss)); local_ss.ss0.surface_type = BRW_SURFACE_2D; if (is_dst) { - uint32_t dst_format; + uint32_t dst_format = 0; Bool ret = TRUE; ret = i965_get_dest_format(pPicture, &dst_format); |