Commit Graph

55 Commits

Author SHA1 Message Date
Eric Anholt 4c4faf260e Set the CURSOR_SIZE register when present.
Failure to do so gets you a lot of pretty colors.
2007-03-19 13:36:37 -07:00
Keith Packard 05e0021147 Cast ARGB cursor address to CARD32 * to eliminate warning.
While we're just doing a memcpy, it's nice for the two argument types to
match.
2007-03-17 21:31:04 -07:00
Eric Anholt 213394fbaa Fix crashes and other failures when a cursor allocation fails.
Now, we allocate one single block of memory for cursors, and either succeed or
fail once, rather than trying to support partial fallback modes that generally
resulted in pain due to being untested.  In particular, this fixes cursors on
FreeBSD, which only allowed one large physically-contiguous allocation.
2007-03-15 19:13:28 -07:00
Keith Packard 8ae6ad9332 Use new driver-independent CRTC-based cursor layer.
This eliminates all of the cursor rotation code and other cursor management
infrastructure, leaving a fairly simple hardware layer in its place.
2007-03-15 00:01:39 -07:00
Eric Anholt 5a73624b9b Fix a crash when an ARGB cursor allocation had failed. 2007-03-02 11:03:16 -08:00
Eric Anholt d3ac440e12 Rework the video memory allocation.
The previous allocator worked in multiple passes, with (at least) one of
setting up allocations, another to attempt to adjust those for tiling, and
then a pass to set up the offsets and fix them in memory.

The new allocator is simpler, allocating memory immediately if possible,
setting up tiling up front, and choosing offsets immediately.  AGP memory
is only allocated to back actual memory used, saving some memory that would
have been allocated for padding previous. It will also allow dynamic freeing
and reallocation of memory, which will be useful for framebuffer resizing.
2007-02-23 12:50:49 -08:00
Eric Anholt 76a4f2eea8 Fix bad offsets in "right" rotation of the CRTC in cursor and update handling. 2007-02-02 17:34:41 -08:00
Keith Packard 20419d664c Paint ARGB cursor data to ARGB cursor memory space in frame buffer.
When converting from global cursor to per-crtc cursor, the ARGB cursor data
was accidentally painted to the wrong location, overwriting some critical
data and causing the hardware to lock up. (along with generating a garbage
cursor image from uninitialized data).
2007-01-27 18:34:12 -08:00
Eric Anholt e213324195 Warning fix. 2007-01-24 12:32:38 +08:00
Eric Anholt 74ebff6732 Allocate separate cursor memory per CRTC and rotate cursors appropriately.
Also, add bind/unbind of the shadow rotate buffers, which was missed in a
previous commit.
2007-01-18 14:26:21 -08:00
Eric Anholt 8759f4d89a Partially deal with cursor rotation.
The remaining issue is having a cursor image per CRTC so that the cursors can
be rotated on the independently rotated CRTCs.
2007-01-18 13:13:46 -08:00
Keith Packard 37946c9c8a Interim work on rotation support with new xf86 code.
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-16 12:14:55 +11:00
Eric Anholt 394124ceaa Add per-CRTC gamma control support for RandR.
This makes the CRTCs now always run in gamma-enabled mode, rather than having
flaky logic for switching modes.  Also, it should clear up issues with the LUTs
being uninitialized when outputs are first brought up.
2007-01-03 09:56:19 -08:00
Keith Packard 3fe802453a Move xf86CrtcConfig to ScrnInfo private.
Pull xf86CrtcConfig out of the driver private structure and allocate a
ScrnInfo private index for it. Also, make the arrays of outputs and crtcs
dynamic instead of fixed.
2006-12-13 13:15:14 -08:00
Keith Packard e8d1db3263 Move crtc/output config to sub-structure.
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-27 12:01:47 -08:00
Keith Packard 2529863a1a Start output/crtc restructuring work. It compiles.
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-26 16:44:17 -08:00
Keith Packard 81bace0c31 Merge branch 'modesetting-keithp' into modesetting
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-08 20:23:20 -08:00
Eric Anholt 713c5b0899 Change the output and pipe "is it on/off" field name to "enabled". 2006-11-08 19:55:31 -08:00
Keith Packard 0b2d36d4f0 Use pI830->availablePipes instead of MAX_DISPLAY_PIPES everywhere
(cherry picked from e4bcec796e commit)
2006-11-07 15:13:23 -08:00
Keith Packard 7fcb555735 Rename availablePipes to num_pipes 2006-11-04 00:52:21 -08:00
Keith Packard e4bcec796e Use pI830->availablePipes instead of MAX_DISPLAY_PIPES everywhere 2006-11-03 23:29:12 -08:00
Keith Packard 9681602177 Create I830PipeRec to hold pipe-specific data. Remove unused I830 members.
I830 contained six parallel arrays for pipe-specific data; these
have been moved to a I830PipeRec structure instead.

I830 also contained several unused members:

   unsigned int bios_version;
   Bool newPipeSwitch;
   Bool fakeSwitch;
   int fixedPipe;

These have been removed, along with the code that set them.
2006-11-03 12:55:25 -08:00
Eric Anholt 3e6f81f70f Move cursor base address register setting to a separate function. 2006-10-02 09:53:57 -07:00
Eric Anholt 6ea16bf6b0 Merge branch 'master' into modesetting
This reverts most of the mergedfb code.  This will instead be done in device-
independent RandR code.

Conflicts:

	src/Makefile.am
	src/i810_driver.c
	src/i810_reg.h
	src/i830.h
	src/i830_cursor.c
	src/i830_driver.c
	src/i830_modes.c
	src/i830_video.c
2006-09-27 16:38:01 -07:00
Keith Packard c11c445bde Consistently use Cursor A on Pipe 0 and Cursor B on Pipe 1.
Mixing random cursors and pipes didn't work very well. I'm left wondering
whether the palette stuff will work on pre-9xx series hardware though; it is
special cased everwhere else.
2006-09-21 01:23:10 -07:00
Keith Packard f6500e94fe Update driver for RandR 1.2 X server API.
This is not entirely what I'd like to see, but it's at least functional.

Limitations:
	Can't disable/enable crtcs
	Can't move outputs on/off crtcs

But, it does handle monitor hot-plug, detecting changes in VGA and SDVO
status on-the fly. Which makes for good demo material.
2006-09-20 22:38:55 -07:00
Eric Anholt 2a7426cf13 Clean up warnings. 2006-08-09 15:47:09 -07:00
Eric Anholt d150b53d10 Merge branch 'i965', adding i965G support.
Conflicts:

	src/i830_cursor.c
	src/i830_driver.c
2006-08-08 15:59:17 -07:00
Alan Hourihane 633a683a4a Ensure palette is updated in mergedfb & clone modes 2006-08-08 10:23:29 +01:00
Eric Anholt a79aa0d7b2 Merge branch 'broadwater-video-rehash' into broadwater
Conflicts:

	src/Makefile.am
	src/common.h
	src/i810_driver.c
	src/i810_reg.h
	src/i830.h
	src/i830_accel.c
	src/i830_cursor.c
	src/i830_dri.c
	src/i830_dri.h
	src/i830_driver.c
	src/i830_memory.c
	src/i830_rotate.c
	src/i830_video.c
2006-08-03 18:29:12 -07:00
Alan Hourihane 760021e398 Add current Tungsten Graphics code drop for i965 support. 2006-08-03 17:08:39 -07:00
Alan Hourihane ac3ad32f66 Calculate allowable refresh rates on the private
mode data for each independent screen in mergedfb.

Lots of other fixes too.
2006-07-27 15:28:42 +01:00
Alan Hourihane fd19b12793 Add mergedfb support to the intel driver with
additional pseudo-Xinerama support.
2006-07-25 11:14:11 +01:00
Eric Anholt 05bcbadd13 Avoid NULL dereference if cursor position changes during a mode change. 2006-07-11 14:05:38 -07:00
Luká\u0161 Hejtmánek f9499a68da Make gamma settings apply to the cursor as well, and fix clone-mode gamma. 2006-07-11 10:13:18 -07:00
Eric Anholt af2432322b First pass of integrating the Tungsten Graphics driver for Broadwater. This
patch is based off of diffing from the branchpoint to the supplied code, but
with many chunks containing reversions of commits removed.  Won't work yet.
2006-05-12 13:32:38 -07:00
Keith Packard c26f0737e2 Merge in master to modesetting 2006-04-10 19:41:41 -07:00
Alan Hourihane 39bdfbb4c2 x86_64 warning fixes 2006-04-10 11:26:06 -07:00
Eric Anholt 2538cbeb50 Enable -Wall on GCC, and do a cleanup of existing warnings. 2006-04-06 15:55:05 -07:00
Kristian Høgsberg fdfce49c54 Drop libc wrapper; don't include xf86_ansic.h and add includes now missing. 2006-03-22 23:24:03 +00:00
Alan Hourihane 58817c9909 Enable gamma for hw cursor when ARGB cursor in use (Lukas Hejtmanek) 2006-03-10 13:07:00 +00:00
Alan Hourihane d8d7490809 Bump version to 1.5.0.0
Add Intel 945GM support
Add RandR rotation support (full 3D acceleration, HWcursor & Xvideo rotated too)
Remove shadow framebuffer rotation code
Add a new LinearAlloc option to allow more offscreen memory to be allocated
for XVideo applications. This allows HDTV movies to be played via Xvideo.
2006-01-24 15:20:34 +00:00
Adam Jackson ac920dae7c Prep for modular builds by adding guarded #include "config.h" everywhere. 2005-07-11 02:29:51 +00:00
Alan Hourihane 27feb0f347 Add Intel(R) 945G support 2005-05-31 17:58:26 +00:00
Alan Hourihane 076c5116ae Add:
- Intel i915GM support to 2D DDX and 3D Mesa drivers.
- PanelID identification
- DRI suspend/resume support
- Detection of monitor changes on VT switches
- Support custom video modes if available in the Video BIOS
- 3D enhancements:
	* GL_ARB_texture_cube_map
	* GL_EXT_blend_equation_separate
	* GL_ATI_blend_equation_separate
	* GL_ARB_point_parameters
	* GL_NV_blend_square
	* GL_EXT_cull_vertex
	* GL_ARB_depth_texture
	* GL_SGIX_depth_texture
	* GL_ARB_shadow
	* GL_EXT_shadow_funcs
	* GL_3DFX_texture_compression_FXT1
By Tungsten Graphics, Keith Whitwell & Alan Hourihane.
2005-01-06 14:43:14 +00:00
Markus Kuhn 59cecb714b Encoding of numerous files changed to UTF-8 2004-12-04 00:43:09 +00:00
Alan Hourihane 5ed7e6f842 i915 support
Dual Head support for i830, i855, i915.
ARGB cursor support (including i810) for all chipsets.
2004-06-22 14:28:46 +00:00
Eric Anholt c5b1972b50 DRI XFree86-4_3_99_12-merge import 2004-06-16 09:23:18 +00:00
Egbert Eich 41eba03d0d Merging XORG-CURRENT into trunk 2004-04-23 19:35:55 +00:00
Egbert Eich e27494f2a9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:33:22 +00:00