summaryrefslogtreecommitdiff
path: root/src/i830_crt.c
AgeCommit message (Collapse)Author
2008-03-26More compile warning fixes.Paulo Cesar Pereira de Andrade
o Check for RANDR_GET_CRTC_INTERFACE before defining functions that are used only if it is defined. o Declare a variable before code, and rename it from ret to xvmc_status to better describe it. o if 0 some static functions not used. o Don't declare some unused variables. o Declare as static some functions that are used only in the file defining it. o Add a default/fallback return True to the Bool function src/xvmc/intel_batchbuffer.c:intelInitBatchBuffer(). o Ansify src/xvmc/xf86dri.c. o Add missing prototype to src/xvmc/xf86dri.h and follow pattern of other headers by adding "extern" before function prototype.
2008-03-17Add support for new ->get_crtc output callbacksJesse Barnes
Using the new interface allows the server to avoid some flicker at startup.
2008-03-11Remove i830+ driver's use of CARD*/INT* types for great justice.Eric Anholt
Several uses are actually left, which are determined by the X Server interfaces we're implementing.
2008-01-10Remove unnecessary quirk code in CRT probingJesse Barnes
Since we return early in the CRTC DPMS code, keeping the pipes & clocks enabled, this code is no longer necessary. As an added bonus, VGA connections should be reported correctly even when the pipe A quirk is active. Updates fix for fdo bz #11432.
2008-01-09Add pipe A force enable quirkJesse Barnes
On some platforms, the firmware may read & write GPU registers on lid close, suspend/resume time or during various SMM events. If one of the graphics pipes is disabled at that time, the GPU may hang due to the programming dependencies of the various registers. This patch adds a quirk to force the driver to keep pipe A enabled if necessary, through user configuration in xorg.conf or via a platform specific quirk. Leaving the pipe enabled comes at a power cost however, so the quirk should only be enabled when strictly necessary. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=11432.
2007-12-10CRT hotplug detection improvementsJesse Barnes
Patch from Hong Liu. Fixup CRT detection by making sure the pipe is enabled before CRT detection actually occurs. Fixes bugs Hong was seeing on G35 and other machines.
2007-07-13Remove hard-coded CRT blanking frobbing for load detection.fbcKeith Packard
CRT blanking needn't be adjusted to perform load detection on 9xx chips, and the 8xx load detection path now adjusts blanking just during load detection. Adjusting the blanking interval turned out to cause many monitors to fail to sync.
2007-07-13Ensure pipe/output active before doing load detection.Keith Packard
If the pipe or output have been set to DPMSOff, then load detection will not work correctly. Also, share the load detection configuration code between crt and tv outputs.
2007-07-13Eliminate bogus (and harmful) blanking adjustment for load detect.Keith Packard
Instead of always adding blanking to mode lines, use the FORCE_BORDER option on i9xx hardware where it works, and dynamically add a bit of border if necessary on i8xx hardware to make load detection work. This may cause flashing when a usable crtc is not otherwise idle when load detection is requested.
2007-06-30Fix load detection to use border region instead of blanking.Keith Packard
Make sure there is some border area to use by changing how the pipe is configured, then pick a scanline in the middle of the border for load detection. This lets the load detect code use an active pipe instead of requiring an idle one.
2007-06-19Fix left G33 issuesWang Zhenyu
Be sure to check G33 chip type in: - sdvo output - Y-major tile - crt detect - and xaa composite Sorry for that I should have fixed them very earlier...
2007-05-17Make each output control clones/crtcs. Split DVO into LVDS, TMDS, TV.Keith Packard
Move clone/crtc config into each output where it's easier to understand (no need for a switch statement in I830PrepareOutputs. Also, split DVO into three sub-types (TMDS, LVDS, TVOUT) as those have different cloning abilities.
2007-05-12Deal with i830 CRT load detection which cannot use FORCE_BORDER.Keith Packard
Chips newer than the i830 can force the border color for the active period of the screen, allowing the load detection to easily see the right data. In addition, newer chips appear to have more sensible load detection hardware which either ignores inactive periods on the screen or performs some longer-term averaging. The i830 appears to provide unfiltered samples of the detected load. For the i830, then, emit a border at the bottom of the screen and, for load detection, simply turn it purple and wait for the current line to be within the border. Sample an entire scanline, counting the number of times the load detection sees a monitor. In my testing, the presence of a monitor will cause the detection to succeed every time, while the absense will cause it to fail about 75% of the time. The code here, checks for presence at least 75% of the time, which should be adequate. Also, as the new mode configuration code has already taken care to enable the CRT output, eliminate much of the load detection code which is simply duplicating functionality from the general mode setting code. This should result in faster load detection as this code will now run in no more than one frame time. It does burn the CPU the whole time though, polling the displayed scanline register.
2007-03-04Support new CRTC/Output prepare/commit hooks.Keith Packard
New hooks replace explicit invocation of DPMS functions to manage mode setting sequencing.
2007-02-16Change rotation pixmap creation API to permit start-time rotation.Keith Packard
Start time rotation requires that the pixmap be created after the server has initialized the screens. Delay the pixmap creation until the first block handler invocation.
2007-01-16Interim work on rotation support with new xf86 code.Keith Packard
Yes, there are lots of bits tied together here, and we should split this patch apart. Move I830 mode setting to xf86 mode setting. Make mode setting function also set the base address. This should fix problems where the base gets set incorrectly at times. Add driver-independent rotation support, requires driver-specific hooks for shadow pixmap allocation, otherwise it uses Render for painting.
2007-01-15Convert I830PipeSetMode to xf86CrtcSetMode. Add rotation structures.Keith Packard
Makes the mode setting logic device independent. Magic rename hooks allow multiple drivers to provide the generic code without name conflicts. Rotation code requires special pixmap creation hook, and uses Render to perform the actual rotation.
2006-12-30Detect in ProbeModes. Let get_modes set edid. Prune interlace/dblscan.Keith Packard
Move output connection status detection from RandR code up to ProbeModes so it is done before mode sets are built. Otherwise, the mode building code will elide all modes the first time through as it ignores outputs that are disconnected. Most get_modes functions fetch EDID data; make sure that any EDID changes are used in the ProbeModes filtering of default modes. Otherwise, stale EDID data will be used. Allow outputs to advertise support for interlaced and double scan modes; prune such modes from the default mode list when outputs do not support them.
2006-12-28Configuration support: per-output mode lines, preferred mode.Keith Packard
Add the modelines specified in the per-output monitor and all of the default modes to the list to each output. Prune the resulting list to specified sync limits and virtual sizes. Sort the resulting mode list on preferred/size/refresh.
2006-12-06Merge branch 'modesetting' into nonrandr-setupnonrandr-setupKeith Packard
Also, fix buffer overflow in i830_debug.c
2006-12-06Merge branch 'generic-mode-set' into modesettingEric Anholt
2006-12-06Use xf86 structures for default config instead of RandR.Keith Packard
To avoid requiring RandR 1.2 in the X server, use the xf86 Crtc and Output structures as the basis for the default configuration computation (and, eventually, the config-file based configuration as well).
2006-12-05fix up misleading comment in i830_crt.c about border registerKeith Packard
2006-12-05WIP code to move mode set sequencing to XFree86 handlers.Eric Anholt
It compiles. It definitely doesn't run.
2006-11-30Merge branch 'restructure-outputs' into modesetting.Keith Packard
Outputs and Crtcs now have a driver-independent representation which should permit generic code to control RandR 1.2 and startup configuration.
2006-11-28Conditionally compile old-server compatibility code in.Eric Anholt
This also replaces calls to compat code with the real names of the functions, and slips #defines to an i830-namespaced version in when doing compat. The current server version (7.1.99.2) is still left as requiring compat code, since the version hasn't been bumped yet. This also fixes some failures to call the compat code, and some failures to actually compile the compat code. Oops.
2006-11-27Move crtc/output config to sub-structure.Keith Packard
Place crtc/output in separate structure at head of driver private structure. Use this from the config code to make it driver-independent. Still lots of effectively driver independent code that continues to use driver dependent stuff, but that will change.
2006-11-26Remove mode setting from load detect CRTC allocation.Keith Packard
To share load-detect CRTC allocation with TV driver, move it to the output driver
2006-11-26Clean up reworked data structure code so the server actually starts.Keith Packard
Use i830GeLoadDetectPipe again (instead of missing xf86AllocCrtc). Actually create new Crtc structures. Fix a few other NULL pointer dereferences.
2006-11-26Start output/crtc restructuring work. It compiles.Keith Packard
Outputs and Crtcs are now split between 'generic' and 'driver specific' pieces in the hope that more code will be able to migrate to the xf86-generic layer. Right now, the code remains tangled together, significant work remains to tease the pieces apart. First the code needs to be made to actually work as-is though.
2006-11-08Adapt to RandR updates that split object creation from screen association.Keith Packard
RandR DIX code is preparing for xf86 drivers that want to allocate RandR objects at PreInit time. This patch adapts to that change without taking advantage of it.
2006-11-08Merge branch 'modesetting-keithp' into modesettingKeith Packard
Conflicts in PipeSetMode were resolved to use the keithp changes that pushed more modesetting stuff into the per-pipe function. Switched availablePipes to num_pipes. Used modesetting default output configuration.
2006-11-08Clean up i830_crt_detect_load() a bit more.Eric Anholt
ADPA might not have been set right in some cases (DPMS-off monitor, for example), and a wait for vsync that the bios does was missing.
2006-11-07Eliminate operatingDevices member and PIPE_* values.Keith Packard
operatingDevices and MonType1/MonType2 duplicate information already stored in the device structures. Eliminate them and replace uses with direct references to the appropriate other data. (cherry picked from 3ab7f9693217d8fe993bdc94c376b219b0082961 commit)
2006-11-05Fix CRT output on 965 chipset.Keith Packard
A few more register settings are needed to get CRT output working on the 965 chipset, in particular the the SDVO/UDI clock multiplier register needed to get set to the default value (3). No, I really don't know what this does, but it does get the CRT running at a wide range of sizes.
2006-11-04Rename availablePipes to num_pipesKeith Packard
2006-11-04Eliminate operatingDevices member and PIPE_* values.Keith Packard
operatingDevices and MonType1/MonType2 duplicate information already stored in the device structures. Eliminate them and replace uses with direct references to the appropriate other data.
2006-11-03Add support for load-based CRT detection.Eric Anholt
2006-11-01Attempt to pull monitor physical size information out of DDC EDID data.Eric Anholt
2006-11-01Move mode lists from per-pipe to per-output.Eric Anholt
This should let RandR do the right thing in exposing the modes to userland. As a side effect of getting this working, the SDVO pixel clock range code was fixed and the mode valid tests for various outputs got extended. Also, LVDS grew a get_modes for the fixed panel mode. Note that we now no longer do automatic enabling of outputs at xrandr -s 0, hotkey, or VT switch. That will be left to generic RandR code later. Also, generic modes and user-defined modes are once again not validated into the lists, so this is a regression there.
2006-10-31Give each output a get_modes function and expose those modes through RandR.Eric Anholt
The get_modes should return the probed modes only. The driver should then append to the list (for example, compatible modes listed in other outputs, or standard VESA modes) to create the list to expose through RandR. That isn't done yet.
2006-10-31Move output connection detection to a per-output method.Eric Anholt
This will be used by RandR, and should let us clean up some of the initial display configuration, hopefully. Also, analog hotplug-based detection is now enabled on G965.
2006-10-16Add a per-output mode-valid method.Eric Anholt
This is currently disconnected, but will be used in more overhaul work. This should be where any output limitations, such as clocks, resolution, scaling limits, or other options, are validated. Other limitations, such as chipset resolution limits, CRTC clock limits, etc. should be elsewhere.
2006-10-09Move per-output mode setting code to per-output methods.Eric Anholt
This is not a very clean interface, as a number of outputs require tweaks to the DPLL registers. When possible, the DPLLs are just adjusted in the per-output post_set_mode, which happens just after the DPLL is enabled. However, this seems better than the previous method of having all outputs programmed in the same function.
2006-10-05Give each output type an init method in its file, making other methods static.Eric Anholt
2006-10-04Move the save, restore, and DPMS per-output settings to per-output files.Eric Anholt