summaryrefslogtreecommitdiff
path: root/src/i830.h
AgeCommit message (Collapse)Author
2008-07-21Improve VBIOS feature detection, add SSC supportJesse Barnes
Improve the VBIOS feature detection and use it to find whether the platform supports spread spectrum clocking. Use the specified reference clock, but disable SSC if multiple heads are active, since it can cause problems in cloned configurations. Reviewed by Nanhai Zou. (cherry picked from commit e00d9435609bcff1afb71aa6638a6b42a64f5178)
2008-07-21xvmc: Don't copy on xvmc surface in PutImageZhenyu Wang
As xvmc rendering result has already been in fb, we shouldn't do extra copy on it. Although special care is required for i915 xvmc surface pitch alignment, which must be at least 1KB aligned. So video display function should take it into acount instead of always setting Y pitch to be double of U/V pitch. (cherry picked from commit 989ec9e8a69f909cb64f17e4465982613b4b054d)
2008-06-26Initial HDMI work. Not currently hooked up at startup.Eric Anholt
(cherry picked from commit beba1dd3561e38573ed9f507328caf7f8fb9f84a)
2008-06-10Set up/restore PWRCTXA from enter/leavevt not server start/exit.Eric Anholt
This should improve behavior in the presence of VT switching, but also avoids a crash on X exit from writing the register after unmapping mmio.
2008-06-05Initialize clock gating from EnterVT and save/restore it appropriately.Eric Anholt
2008-06-05Move BIOS scratch register setup to EnterVT instead of PreInit.Eric Anholt
We want these to always be set when our driver's in control. They are already appropriately save/restored at leave/entervt.
2008-06-05Move DSPARB setup into a separate function, and save/restore it at VT switch.Eric Anholt
2008-06-05Replace a couple of wait-for-ring-idles with a single function to do so.Eric Anholt
2008-05-26Fixup power saving registersJesse Barnes
Update clock gating disable bits to match docs and allocate a power context memory area so that newer chips can save state and power down the render unit.
2008-05-08Implement option to ignore external fixed mode settingsMike Isely
The Intel xorg driver tries mightily to determine the native fixed panel mode settings for the LVDS output. It does this through various means, including scanning video BIOS tables, and noticing if the pipe in question has already been set up by somebody else (and adopting those timings). This strategy works well for say a laptop where the LCD panel is an integral part of the machine. But for other applications where the display is unrelated to the system's BIOS or other software, then the BIOS will likely have no clue how to configure the LVDS output. Worse still, the BIOS can simply "get it wrong", leaving the pipe misconfigured. Unfortunately the Intel driver can potentially notice this, adopt the same settings, leaving a messed up display. All of this complexity normally happens independently, behind the scenes, from the mode timings that might otherwise be specified by the user. This driver has a concept of fixed, i.e. "native" mode, and then user-specified mode. If the corresponding resolutions between those concepts don't match, then the driver in theory will arrange for scaling to take place while adhering to the actual native mode of the panel. Said another way, if the user says 800x600 but the driver mistakenly (see above) thinks the native mode is 640x480, then 640x480 is the mode set with scaling to an 800x600 frame buffer. If the driver gets the wrong native mode, then the result is a miserable mess with no way for the user to override what the driver thinks is right. This patch provides a means to override the driver. This implements a new driver option, "LVDSFixedMode" which defaults to true (the normal, probe-what-I-need behavior). However when set to false, then all the guessing is skipped and the driver will assume no fixed, i.e. "native" mode for the display device. Instead with this option set to false, the driver will directly set the timings specified by the user, providing an escape hatch for situations where the driver can't correctly figure out the right mode. Under most scenarios of course, this option should not be needed. But in situations where the Intel video BIOS is hopelessly fouled up related to the LVDS output, this option provides the escape hatch for the user to get a working display in spite of the BIOS situation. Signed-off-by: Mike Isely <isely@pobox.com>
2008-05-07Save/restore cursor registersJesse Barnes
There are lots of good reasons for doing this, one of them is fdo bug #11305.
2008-05-07Use I830FALLBACK when check pitch for debugZhenyu Wang
2008-05-07Check pitch for EXA operationZhenyu Wang
2D pitch limit applys to all chips. Pre-965 chip has 8KB pitch limit for 3D. 965 supports max pitch by current exa (128KB). (cherry picked from commit 8187a5a16f8bd8f0ba5e7f5357f355928b3b8f07)
2008-04-29Add a new quirk for BIOSes that reprogram regs at lid close/open timeJesse Barnes
Dell Latitude D500s seem to have this problem. At lid close/open, the DSPABASE reg gets reset to 0, so we either need to keep the framebuffer at offset 0 or make sure we reprogram the CRTCs after the lid opens again. Since we can't make sure the former is always true (buffer resize, etc.), this patch adds a quirk to reset the modes at lid open time. Fixes FDO bug #14890.
2008-04-17Make the binding table and surface state be arrays to reduce syncing.Eric Anholt
2008-04-10Enumerate all possible cc_state objectsCarl Worth
We need one for each possible combination of src and dst blend_factors. Again, as with recent changes, this eliminates state updates from prepare_composite and allows that function to instead simply reference an existing object initialized within gen4_state_init. Thanks to Dave Airlie (and git-bisect) for pointing out that with gnome-terminal all text was appearing as solid black with an early version of this commit. As expected the bug was an alignment issue. (cherry picked from 0c0ab52c2d100c47f38c7ef826ef585c8b9815e9 commit) Performance is approximately equivalent on text tests, but may be around +2%.
2008-04-10Keep static copies of the 965 render programs in video memory.Eric Anholt
This reduces the CPU overhead of memcpying them in every time, for a speedup in aa24text of around 30%. This is based on work by Carl Worth which is in the intel-batchbuffer branch.
2008-04-09SDVO: Use the TV reference clock for SDVO TV outputs.Eric Anholt
Based on a patch by Will Wiseman.
2008-04-09Implement support for 24 bit pixel formatMike Isely
The Intel driver appears to be coded to only work with displays expecting 18 bit pixels. However I have an application using a LCD display that expects pixel data in 24 bit format. The difference is only 2 bits in a single GPU register. This patch implements that change, controlled by a new driver option, "LVDS24Bit". The default value is false, which is the previous behavior. When set to true, then 24 bit panels should work (at least the one I'm testing here does). Fd.o bug #15201 Signed-off-by: Mike Isely <isely@pobox.com>
2008-04-09Fix LVDS regressionJesse Barnes
Disable panel fitting on 855GM, and fix dither setting.
2008-03-21Transformed coord computed using floats. Don't move bilinear composite dst.Keith Packard
The homogeneous coordinate computation in the core server cannot be used for many legal matrices as it overflows. Just use floats in the driver; faster and avoids troubles. When compositing with bilinear filter, don't push the dst coordinates around as that makes the output blurry when pixels are aligned.
2008-03-20Merge branch 'xvmc'Zhenyu Wang
2008-03-18Add i830_transform_is_affine and i830_get_transformed_coordinates_3d.Keith Packard
These are needed to deal with projective transforms in the composite operation.
2008-03-18Merge branch 'master' into xvmcZhenyu Wang
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-14Change OUT_RING and similar calls to OUT_BATCH for batchbuffer mergeEric Anholt
2008-03-13Merge branch 'master' into xvmcZhenyu Wang
2008-03-12Eliminate local variables defined in i830 BEGIN_LP_RING().Eric Anholt
This lets us get better sanity asserts, and avoid mysterious braces when you do two BEGIN_LP_RING()s in a single function. Potential minor performance loss isn't too exciting, as ring access is about to become a compat path anyway. This change also removes the requirement for ring emits to be aligned to dwords.
2008-03-12Separate i810 and i830 ring macros out into separate files.Eric Anholt
I want to hack on i830 for changing it into a compat path for batchbuffer without having to worry about the i810 stuff getting broken.
2008-03-11Nuke more CARD* types from i810 driver. Untested.Eric Anholt
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-03-11Crack down on warnings.Kristian Høgsberg
Fix printf formatting warnings, wrap a couple of long lines, nuke unused variables, add missing #include <unistd.h>.
2008-03-11Merge branch 'master' into xvmcZhenyu Wang
Conflicts: man/intel.man src/i830_driver.c
2008-02-22Add quirk for DVO channel selectionJesse Barnes
Some machines want DVOA, some DVOB. We can use this quirk to differentiate them until we come up with a better solution. Patch from Hong Liu. Fixes #13722.
2008-02-05Program FBC fence offset registerJesse Barnes
Just a partial fix for some of the FBC issues people have been seeing. The other half is to disable FBC if both pipes are running.
2008-01-30hardware status page initialization reworkZhenyu Wang
Order hardware status page setup more reasonable after all memory bound, in case new chipset requires non-stolen page and that could be bound then. Also clean up drm irq handler install function, and put first install in starting stage later than status page setup, so we won't make device cry for uninitialized status page.
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.
2008-01-03Fix compilation error when not using DRIJesse Barnes
This patch complements 88f8b688e2316ae4a1f7485f0010ce90de54783a which added uint64_t typed variables to avoid unsigned long overflows in 32-bit architectures but didn't include <stdint.h> with the required definition. When XF86DRI and _XF86DRI_SERVER_ are defined this header gets indirectly included through "i830_dri.h", thanks to "i830_common.h" which masquerades this problem as released in 2.1.0 and that manifests with : In file included from i810_driver.c:88: i830.h:137: error: expected specifier-qualifier-list before 'uint64_t' i830.h:240: error: expected specifier-qualifier-list before 'uint64_t' Patch from Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
2007-12-20xvmc: add disable xvmc build supportZhenyu Wang
Move xvmc source files under XVMC config
2007-12-19Merge branch 'master' into xvmcZhenyu Wang
2007-12-04Add BCM_ to backlight control method enumsJesse Barnes
Avoids polluting the global namespace with such generic terms.
2007-11-15Merge branch 'master' into xvmcZhenyu Wang
2007-11-14Don't stop ring before restoring hw stateJesse Barnes
Some of the hw state restoration callbacks may want to use the ring for various things like stopping video playback, so leave the ring enabled until we get back from RestoreHWState. Also rename the functions so that their purpose is clearer and remove a couple of redundant lines.
2007-11-14Don't enable fbc with XAA or tiling is off.Zhenyu Wang
This slightly reworks my last fbc patch. We don't support tiled front buffer with XAA now, so also disable fbc on it. If tiled alloc failed, disable fbc too.
2007-11-13Merge branch 'master' into xvmcZhenyu Wang
2007-11-12Improve backlight controlJesse Barnes
This commit fixes backlight support for several platforms. Except on recent machines supporting the IGD OpRegion specification, backlight control is rather platform specific. In some cases, we can program the native backlight control regsiters directly without any trouble. On others, we need to use the legacy backlight control register. On still others, we need a combination of the two. And on some platforms, none of the above will work, so we go through the kernel backlight interface, which provides a platform specific driver for backlight control.
2007-10-23Merge branch 'master' into xvmcZhenyu Wang
2007-10-12Fix failure in tiling setup on non-power-of-two allocations on pre-965.Eric Anholt
2007-10-11Move tiling fence register setup to bind time instead of allocate time.Eric Anholt
This allows us to allocate tiled buffers in buffer objects. In the process I removed the fence division that we had for tiled buffers on pre-965. If we resurrect that code, it should probably be managed by just dividing all the objects in roughly half and fencing those halves (to reduce the alignment requirement), instead of using giant fences until we run out of space and then trying to deal with scarce space on the last (or not) buffer. Halving our tiled objects would use 6/8 of our fence registers on that hardware.
2007-10-11Rework DRI buffer mappings and sarea setup to allow for moving buffers.Eric Anholt
While this has been a desired feature for some time, to allow for reallocation of the front buffer, it was made more necessary by the desire to avoid requiring a NO_MOVE buffer type in TTM because buffer objects may not be left pinned over VT switch. This is a step towards making those buffers movable and resizable.