Commit Graph

2164 Commits

Author SHA1 Message Date
Zhenyu Wang b404afb755 TV: save serveral TV_CTL register fields in mode set
Driver should keep those fields according with spec.
2008-11-06 10:47:18 +08:00
Zhenyu Wang 2ae91f0ffd TV: fix default contrast and saturation modifier
Color knobs was set with higher modifier which caused strong color
on TV screen. Setting fixed point modifier to default 1.0 makes picture
on TV look nicer.
2008-11-06 10:46:36 +08:00
Zhenyu Wang c4cab00ef7 TV: white space cleanup 2008-11-06 10:46:11 +08:00
Zhenyu Wang b130f94f26 SDVO: fix more command definition errors 2008-11-06 10:14:00 +08:00
Zhenyu Wang 3ab979da5c SDVO: add command for set monitor power state
SDVO encoder power state must be higher than monitor's state.
This only adds command and doesn't enable monitor power state
setting yet.
2008-11-06 10:11:38 +08:00
Zhenyu Wang f558a4972d SDVO: add GetScaledHDTVResolutionSupport command 2008-11-06 09:58:15 +08:00
Zhenyu Wang cd8cbff5d7 SDVO: fix sdvo tv format and sdtv resolution request/reply definition 2008-11-06 09:57:08 +08:00
Zhenyu Wang 61672b8c45 SDVO: add HDMI audio encrypt change bit for GetInterruptEventSource command 2008-11-06 09:56:37 +08:00
Zhenyu Wang 45fb04474d SDVO: fix wrong order of sdvo version's major/minor 2008-11-06 09:55:47 +08:00
Zhenyu Wang 5cbf1e7271 Make IS_GM45 into IS_G4X define
Those are identical that using one define is much clear.
And it can also apply fixes for GM45 too, which is missing with
origin define.
2008-11-06 09:46:54 +08:00
Eric Anholt 78b6cff3b6 i965: Support render acceleration with pixmaps in BOs.
This required reordering the relocation emits for surface/binding table
so that we didn't add new relocations to things that had already been
relocated at (the check_aperture requirement).
2008-11-05 17:22:02 -08:00
Eric Anholt 801f0eac4f Make I830FALLBACK debugging a runtime instead of compile-time option. 2008-11-05 17:22:00 -08:00
Maxim Levitsky d828b0802c Add an option to make the overlay be the first XV adaptor. 2008-11-05 13:51:19 -08:00
Eric Anholt 040d9bf9d8 Remove the CheckDevices timer.
This was an early attempt to support display switch hotkey.  It never really
worked, as the events didn't show up when they should.  It also cost a wakeup
every second to check just in case, instead of taking an interrupt like we can
now using ACPI.  Additionally, some machines apparently get stuck with the
event set and end up DDCing checking for new devices every second and
smashing your video modes.
2008-11-04 10:39:34 -08:00
Carl Worth 08914cceda Use buffer objects for binding table and surface-state objects.
Instead of having a static array for these and doing an ugly sync
everytime we recycle the array, we now simply allocate short-lived
buffer objects for this dynamic state. The dri layer, in turn, can
take care of efficiently reusing objects as necessary.

On a GM965 this change was tested to improve the performance of
x11perf -aa10text from roughly 120000 to 154000 glyphs/sec.
2008-11-03 22:46:28 -08:00
Carl Worth 47cc3d79da Unreference the vertex_buffer_bo in gen4_render_state_cleanup
This avoids leaking one buffer object.
2008-11-03 22:46:28 -08:00
Carl Worth 88700acf30 Rename gen4_dynamic_state to gen4_vertex_buffer
We don't actually plan to put any other data in this structure, so it
doesn't make sense to have a generic name, (since we'll only be using
it for our vertex buffer).
2008-11-03 22:46:28 -08:00
Carl Worth 9e95722763 965: Move composite setup to new _emit_batch_header_for_composite
This function is the new name for _allocate_dynamic_state now that
it also emits everything to the batch necessary for setting up a
composite operation. This happens in prepare_composite() every
time and in composite() whenever our vertex buffer fills up.

It's not yet strictly necessary to be redoing this setup in
composite() but it will be soon when the setup starts referring
to buffer objects for surface state and binding table. This
move prepares for that.
2008-11-03 22:46:28 -08:00
Carl Worth fcb2a5a125 Use buffer object for vertex buffer (in new gen4_dynamic_state)
This begins the process of separating the dynamic data from the
static data, (still to move are the surface state and binding
table objects). The new dynamic_state is stored in a buffer
object, so this patch restores the buffer-object-for-vertex-buffer
functionality originally in commit 1abf4d3a7a and later reverted
in 5c9a62a29f.

A notable difference is that this time we actually do use
check_aperture_space to ensure things will fit, (assuming
there's a non-empty implementation under that).
2008-11-03 22:46:17 -08:00
Jesse Barnes 7e68786cf7 Don't modify render standby if kernel mode setting is active
Since we can't bang on registers directly in that case.
2008-10-30 13:40:23 -07:00
Adam Jackson 87ea531c5d Quirk: No LVDS on Dell Studio Hybrid 2008-10-24 14:47:27 -04:00
Carl Worth 4d5360b1f3 Use consistent idiom for obtaining static_state
This doesn't make any difference, but it's cleaner to have
each function follow the same idiom for obtaining these pointers.
2008-10-22 16:17:39 -07:00
Carl Worth 36fc53d068 Rename state_base_offset to static_state_offset in gen4_static_state_init
More cleanup here, and again no functional change.
2008-10-22 16:16:30 -07:00
Carl Worth 8fda7df007 Rename gen4_state_init to gen4_static_state_init
This follows naturally from the structure rename.

Also we make things less muddled by having this function
actually accept a pointer to a gen4_static_state_t rather
than a gen4_state_t, (and then fetching the desired pointer
out from that).

Again, no intended change in functionality here.
2008-10-22 15:43:21 -07:00
Carl Worth acba423811 Rename gen4_state_t to gen4_static_state_t
It doesn't contain only static data yet, but it will soon, so
this renaming prepares for that. Also, this helps make things
more clear between gen4_render_state_t and gen4_state_t which
were muddled before, (particularly because the corresponding
identifiers were render_state and card_state). The card_state
identifier is now known as static_state which should be less
confusing.

This change is strictly search-and-replace with no functional
changes.
2008-10-22 15:20:22 -07:00
Carl Worth c6550fa53d Ignore intel_gtt binary
We simply forgot to add this to .gitignore when it was created.
2008-10-22 14:51:42 -07:00
Dave Airlie ee3df629ea Default kernel mode setting to off, add configure flag to enable
Should help avoid unpleasantness.
2008-10-20 18:46:49 -07:00
Eric Anholt 55cb65c6fd Enable Option "Legacy3D" for 965 as well, and clarify both the docs and code.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
2008-10-19 21:53:16 -07:00
Keith Packard 28bb056f8c Use pipes, not planes for sarea geometry data
Vblank in the kernel is far simpler if it deals with pipes instead of
planes, so we're changing both user and kernel side. This is the user mode
side. This fixes both i830_crtc_dpms and i830PipeSetBase, the two functions
which copy geometry from the crtc to the sarea.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-19 15:23:52 -07:00
Keith Packard 546e2aca5b Reduce incidence of MI_FLUSH usage.
This tracks whether the last command in each batch is an MI_FLUSH command
and avoids appending another MI_FLUSH in the non-GEM cases.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-19 14:46:12 -07:00
Keith Packard 9b91cdf7ac No need to check for drmCommandWriteRead; we link against libdrm
My checks for DRM enabled were a bit too extensive; drmCommandWriteRead is
part of libdrm which the driver is always linked against. Only the symbols
in the DRI module need to be checked here.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-19 14:25:01 -07:00
Keith Packard c25437a694 Remove accidental 'return;' left at the top of I830DRIInitBuffers
I was testing the behaviour of the XAA-based DRI buffer drawing code for
tiled buffers and accidentally left I830DRIInitBuffers disabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-19 14:12:29 -07:00
Keith Packard ae224be27b Check for DRI module before initializing GEM mm
GEM requires the DRI extension module currently, so make sure that is loaded
(by checking for the DRIQueryVersion symbol) before trying to call it. This
allows the server to start with the DRI extension disabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-19 14:12:02 -07:00
Keith Packard 7ddea0447c Handle differently tiled front/back/depth/third in DRI window management
When moving or clearing the extra buffer contents associated with DRI
windows, the XAA code needs to see which buffer is being manipulated in the
Setup functions to program the tiling values correctly. Calling
I830SelectBuffer and not then calling I830Setup... would result in mis-tiled
rendering.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2008-10-17 00:33:36 -07:00
Keith Packard c946383afc XAA tiling support was mis-computing adjusted pitch (>>4 instead of >>2)
This may well explain why XAA never worked well on tiled front buffers;
tiled buffers require a different pitch programming on 965 than non-tiled
buffers, in dwords rather than bytes.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
2008-10-17 00:33:36 -07:00
Zhenyu Wang 871728a0cb Don't handle irq in GEM mode 2008-10-16 11:18:06 +08:00
Zhenyu Wang 2419bce9ef Make GTT dumper work on other 9XX chips 2008-10-16 10:28:16 +08:00
Adam Jackson 986c8df79e Fix Mac mini crash in DDC mode probe
SDVO on Mac mini trys to get EDID from CRT port, which
failed with recent DVI-I change.
2008-10-16 10:24:04 +08:00
Eric Anholt 6707371176 Remove gratuitous flushing in EXA after solid operations.
This snuck in with the UXA rename commit.
2008-10-15 08:12:11 -07:00
Eric Anholt 4dd00681dd Fix broken stolen memory counting on G4X.
On the GM45 we were assuming too little stolen memory (mostly harmless,
except when it wasn't, until the AGP fix), and on the G45 we were assuming too
much stolen memory, which was quite harmful when we touched the page that
didn't get mapped.

Future stolen memory accounting should use src/reg_dumper/intel_gtt before and
after enabling AGP on the chipset to confirm that only the GTT entries not
mapped to stolen are replaced, and that all of the unmapped GTT entries are
replaced with the constant scratch page.
2008-10-14 11:33:33 -07:00
Eric Anholt e7e49bed7e Add a GTT dumper for G4x debugging. 2008-10-14 10:39:22 -07:00
Julien Cristau 1c6ea4ab47 Typo fix
Reported by Tomas Carnecky on IRC
2008-10-12 15:17:35 +02:00
Zhenyu Wang 6cb4150160 Bug #17892: Fix possible crash in CRT probe
Introduced in patch for DVI-I CRT probe, if no EDID
CRT monitor is connected, origin code destroys default
DDC bus which causes crash in later get_modes call.
Change it to setup and destroy DDC bus as needed in
get_modes, so we always reprobe and get current state.
2008-10-12 08:07:44 +08:00
Keith Packard 140451abb4 For non-DRM, add NOOPs after BATCH_BUFFER_START to verify completion
In non-DRM mode, the driver waits for the hardware by checking the ring
pointers; when the ring is empty, it assumes the hardware is idle. However,
the hardware updates the ring pointers before executing a command, so if the
MI_BATCH_BUFFER_START is the last command in the ring, the driver will think
the hardware is idle while it may still be processing the contents of the
batch buffer. Placing NOOPs after the BATCH_BUFFER_START allows the driver
to know that the hardware has completed the batch buffer.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-09 18:23:26 -07:00
Keith Packard d09d938bf2 i830 nondrm batch buffer insertion was missing ADVANCE_LP_RING() call
The ring commands to insert a batch buffer to the ring in i830 form were not
terminated by a call to ADVANCE_LP_RING(). This surely would have caused
chaos.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-10-09 18:23:26 -07:00
Carl Worth d24010b7b3 Disable frame buffer compression by default for GM965.
We haven't found a way to make FBC work reliably with GM965 yet,
(it often fails to notice CPU writes). This appears to be a
specific problem with this device, (as we haven't gotten similar
bug reports for subsequent devices such as GM45). So FBC is
now disabled by default for GM965 but can still be enabled with
the FrameBufferCompression option for experimenting/debugging.

This resolves bug #16257:

	[GM965 EXA] Frame-buffer compression broken for CPU writes (XPutImage)
	https://bugs.freedesktop.org/show_bug.cgi?id=16257
2008-10-09 14:32:14 -07:00
Zhenyu Wang 4128b01ec8 Remove Lenovo T61 TV quirk
BIOS already says no integrated TV, and this quirk blocks TV
on R61i which has the same subdevice id as T61.
2008-10-09 09:19:41 +08:00
Zhenyu Wang 7457136353 Put forware VBIOS data parsing
i830_bios_init() is called too late after output init, which
makes bios data mostly useless, and caused all TV init fail as
tv_present flag is not set.
2008-10-08 15:36:10 +08:00
Lukas Hejtmanek 111dd151de Fix driver build against server master.
Broken by 3a4151b69d
2008-10-07 10:27:03 -07:00
Eric Anholt 3a4151b69d Fix driver build against server 1.4.2.
This disables UXA and DRM modesetting pre-1.5, due to privates handling
issues.
2008-10-06 17:26:43 -07:00