We can get a case with gnome-terminal + links, where we get two arrays
of glyphs all with 0 width and 0 heights in them. If this happens
we manage to get to this case without any buffer setup and segfault.
(cherry picked from commit 717c7492a0f6ba3fb3eabda33515881eef314155)
This results in allocation overhead for small (8x8-128x128 or so) pixmaps with
DRI2, but we're interested in looking at tiling them in general in the near
future, anyway.
The call into intel_batch_flush() will invalidate the pI830->batch_bo
stored in bo_table[0]. Fix it by re-read the refreshed value.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Set the SDVO_AUDIO_ENABLE bit to enable SDVO HDMI audio output of the
Intel G35 chipset.
Signed-off-by: Ma Ling <ling.ma@intel.com>
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Enable audio output for the integrated HDMI of Intel G45 chipset
by introducing the SDVO_AUDIO_ENABLE bit.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
HDMI is compatible with DVI, and we've seen many boards that
use HDMI port for DVI output.
So Zhenyu proposed this flag: i830_hdmi_priv.has_hdmi_sink
to indicate the presence of HDMI capable monitors.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
The GM45 b-spec requires the use of the longer hotplug activation period,
but does not require looping twice over the detection logic. With this
patch, CRT detection appears solid on my GM45.
Signed-off-by: Keith Packard <keithp@keithp.com>
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.
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).
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.
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.
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).
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.
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).
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.
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.