Commit Graph

1460 Commits

Author SHA1 Message Date
Matt Turner
b93b78f411 xf86-video-r128 6.10.2
Signed-off-by: Matt Turner <mattst88@gmail.com>
xf86-video-r128-6.10.2
2017-01-17 14:43:12 -08:00
Adam Jackson
5ab23b3a8e Adapt Block/WakeupHandler signature for ABI 23
Signed-off-by: Adam Jackson <ajax@redhat.com>
2016-07-19 10:12:09 -04:00
Connor Behan
a589dd6baf Remove gatos advertisement
There are many current working ways to use a TV tuner with Linux. This
is not one of them.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=94915

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2016-04-13 12:41:00 -04:00
Kevin Brace
3328547c84 xextproto 7.1 support update to the source code
While the compilation script was updated, for some reason, the source
code did not get the update.

Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
Reviewed-by: Connor Behan <connor.behan@gmail.com>
2016-03-30 13:47:17 -04:00
Connor Behan
d3f3c95491 Bump to version 6.10.1
Signed-off-by: Connor Behan <connor.behan@gmail.com>
Tested-by: Christopher Chavez <chrischavez@gmx.us>
xf86-video-r128-6.10.1
2016-01-21 22:12:25 -05:00
Connor Behan
562681414f Assume CRT in the absence of other monitors
This patch is still untested, but it sounds like a lot of people need
it. Assuming that there are no monitors when DDC fails (which causes X
to abort with UMS) does not make sense. Some people will always have DDC
fail. For example, the pins are not connected on an iMac G3. For another
example, some RAGE128TF cards are known to lie that there is no VGA port
in the connector table.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2016-01-17 16:45:31 -05:00
Connor Behan
d6dd6c9ad5 Really fix bitmasks for DDC
For DDC, there is actually no difference between Pro2 cards and other
VGA desktop cards. Mobility / dualhead cards are the only ones that
differ.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91113

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Tested-by: Kevin Brace <kevinbrace@gmx.com>
2015-07-02 18:20:58 -04:00
Connor Behan
0b0f74ac7d Bump to version 6.10.0
Signed-off-by: Connor Behan <connor.behan@gmail.com>
xf86-video-r128-6.10.0
2015-05-01 19:43:42 -04:00
Connor Behan
d05022a1c3 Update bitmasks for DDC
A RAGE128TR chipset with a VGA port uses different i2c clock bits than
the VGA cards previously tested. It seems reasonable to assume that
other Pro2 cards are set up this way as well. In case this is incorrect,
a newly added xf86I2CProbeAddress() should still allow a monitor to be
detected.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Tested-by: Tobias Powalowski <tobias.powalowski@googlemail.com>
2015-03-23 21:57:10 -04:00
Connor Behan
b9c9779398 Look for VGA ports in the VBIOS
It appears that not all r128 chipsets marked as DFP capable have DVI
ports. Some have VGA which we should detect. The old driver "detected"
this by attempting a DVI based probe for monitors. Anything that failed
this was assumed to be VGA.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Tested-by: Tobias Powalowski <tobias.powalowski@googlemail.com>
2015-03-23 21:51:45 -04:00
Connor Behan
cd72de385b Fix allocation of private entity
In the past, pR128Ent was only used for Xinerama-style dualhead and
therefore only allocated for cards with two outputs. However, recent
patches have repurposed pR128Ent as a general struct for things that are
card-specific instead of instance-specific. It therefore needs to be
allocated for all cards.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=89236

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Tested-by: Tobias Powalowski <tobias.powalowski@googlemail.com>
2015-03-23 21:47:52 -04:00
Connor Behan
8c7daa1487 Restore PLL0 as well as PLL3
Apparently, the text mode driver can use either register to store the
pixel clock. The assumption made previously was apparently corrupting
the console on PowerPC systems. Thanks to Michael Lorenz for the patch.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=32606

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2015-03-04 00:31:33 -05:00
Connor Behan
bfff401440 Make it easier to find EXA
As of commit e31564e1a21e73f4d20d6471da4fc7a9b63e4062, the xserver is
more picky about the order in which headers are included. We need to
account for this in order for the compile time exa.h check to succeed.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2015-03-02 16:15:16 -05:00
Connor Behan
e13dd1d338 Include dpmsconst header
Fixes the build on some systems. Thank-you to Andrew Randrianasulu for
the patch.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2015-03-02 15:28:06 -05:00
Connor Behan
86533afa3d Typo fix
This only affects XAA builds but still. Thank-you to Andrew
Randrianasulu for the patch.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2015-03-02 15:28:03 -05:00
Connor Behan
fcee44e469 Silence the non-debug warnings
Some declarations of pScrn are only there for debugging purposes. This
should make gcc quieter on most systems.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-08-23 01:26:42 -04:00
Connor Behan
089c81ed6b Fix whitespace near panel code
This has been bugging me.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-08-23 01:26:38 -04:00
Connor Behan
0519b7b3aa Improve panel code
Since the driver uses PanelXRes and PanelYRes to calculate stretch
ratios, it should try harder to set them. For LVDS, we need to move the
xorg.conf check so that it executes before the BIOS check. For DVI, we
should read them from the mode that the X server has identified as being
the native one. Even then, PanelXRes and PanelYRes are not guaranteed to
be positive, so the driver should verify this before dividing by them.

Another problem with the old panel code was that PanelPwrDly had no sane
default. It was also missing the check for Rage Pro 2 which lacks RMX.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-08-23 01:26:34 -04:00
Connor Behan
d49c3431e9 Remove custom DGA code
I have yet to see a use for the DGA code included in the driver.
According to radeon commits, it should be safe to replace it with DiDGA.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-06 15:54:44 -07:00
Connor Behan
6140081f0e Remove custom dualhead code
There are probably no reasons left to use Xinerama over xrandr. This
removes the screen based dualhead code and the BIOS Display option in
xorg.conf. Additionally, R128ValidMode() is wrapped so that it can be
aware of multiple displays.

Even though some Crtc functions refer to them, PanelXRes and PanelYRes
should be properties of the Output. If this change to the code seems
awkward, see http://marc.info/?t=107222330700001 for more information.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-06 15:51:33 -07:00
Connor Behan
2072d9aa1a Improve handling of monitor and output types
Checking for OUTPUT_DVI is not the same as checking for MT_DFP. There
might be r128 cards with a DVI-I connector. These have the capability of
driving an MT_CRT so we now check the monitor type before programming
DAC or TMDS registers.

This patch also removes R128ConnectorType and R128BIOSConnector because
they were not doing much. These data structures are more useful for the
radeon driver where there is a much wider range of cards.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-08-06 15:41:02 -07:00
Connor Behan
6dc5e9ab12 Unify byte swappers
The cursor loading function was using a lot of code to swap bytes for
big endian systems. For awhile now, the solid picture support for EXA
has had a more optimized function that does the same thing.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-24 00:01:46 -07:00
Connor Behan
48e9b2359e Unify allocators
RandR and Xv were using almost the same code to grab offscreen memory
from EXA and XAA.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-24 00:00:24 -07:00
Connor Behan
0d901460b3 Use standard integers
To fix another warning, we need to be consistent about when we use
CARD32 an when we use uint32_t. Xorg developers have decided on the
latter as a convention.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-07-16 17:47:44 -07:00
Connor Behan
b632e89b92 Remove pointless output
This removes a debug line to fix a compiler warning and make the
crtc1 and crtc2 code more symmetric. The number of bits per pixel is
easy to find out anyway.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-07-16 17:40:49 -07:00
Connor Behan
866d0ad529 Cleanup info struct
This removes some dead code from info. It also fixes some indentation
errors that were likely caused by sed.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-07-16 17:39:59 -07:00
Connor Behan
d05123eab1 Cleanup entity struct
This moves HasCRTC2 into the entity to make it more similar to radeon.
It also removes IsDRIEnabled for being dead code.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-07-16 17:23:37 -07:00
Connor Behan
c95ce42519 Get entity without code duplication
This fixes the parts of the code that were not using the helper function
to find the entity.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-07-16 01:29:19 -07:00
Connor Behan
e9ea36390e Change register name
Surely this is a typo.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-07-16 00:57:18 -07:00
Connor Behan
3bbce42414 Move display enabling code to DPMS
This ensures that DAC, TMDS and LVDS enable bits are properly saved and
only set in the dpms hook.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-09 11:40:35 -07:00
Connor Behan
de7fa61b06 Split up output register functions
The old code was writing registers more often than it needed to. TMDS
writes were triggered by changing the mode for an LVDS panel and RMX
writes were triggered by changing the mode for the second crtc. This
splits TMDS, LVDS, DAC and RMX calls into their own functions.

Also note that routing bits have been specified. R128_FP_SEL_CRTC2 and
R128_LVDS_SEL_CRTC2 are always unset to make the panels use the first
crtc. R128_DAC_CRT_SEL_CRTC2 is unset unless LVDS is already using the
first crtc.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-09 11:37:12 -07:00
Connor Behan
4c6457e189 Map and unmap the MMIO better
Now that the MMIO stays mapped during several function calls, we need to
remember to unmap it if any of them fail. This also fixes a PowerPC code
path that was not updated to work with the longer lived MMIO.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-07-07 18:49:15 -07:00
Connor Behan
539320429f Only enable CRTCs for DPMSModeOn
This was suggested as a power saving tip.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-07 17:34:46 -07:00
Connor Behan
3ed5035074 Port to RandR
This rearranges the r128 code to use the Crtc and Output interfaces
which should make the driver easier to maintain in the long run. User
visible changes include DDC detection working in more cases and the
ability to have multiple monitors with DRI.

Some choices have been made to conserve memory. Modes can be switched up
to the highest resolution in xorg.conf. If this is 1024x768 for example,
the front buffer will be 1024x768 instead of 1024x1024. This means 90
and 270 degree rotations will not work. However, scalings, reflection
and 180 degree rotations can be set with the xrandr client program.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=75629

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-07-02 02:18:48 -07:00
Connor Behan
4efc87f41d Fix ScreenInit with noAccel
Now that EXA is on by default, we must remember to turn it off again if
acceleration is disabled.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2014-04-28 21:26:44 -07:00
Connor Behan
5ef5812a7a Remove overuse of COMPOSITE_SETUP()
COMPOSITE_SETUP() involves expensive register writes so
R128EnterServer() should call it once when there are 3D windows and 0
times when there are no 3D windows.

Instead the code was calling it once when there were no 3D windows and
arbitrarily many times when there were 3D windows.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2014-03-11 23:58:51 -07:00
Connor Behan
9eb6936401 Only declare PCITAG if we need it
If libpciaccess is available, we do not need to declare the deprecated
PciTag member because it will not be used.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-12-03 21:48:19 -08:00
Connor Behan
35dc7faf9f Do not disable gouraud shading for a render op
The EXA Composite hooks should not overwrite any register values
expected by DRI. Initial testing of the EXA support revealed that
R128_WINDOW_XY_OFFSET is one register where we have to be careful.
However, it was mostly tested using glxgears which does not stress the
driver very much. Going through the various 3D screensavers one by one
reveals a bug where certain models turn green if compositing is enabled.

It seems that if we slightly alter the values passed to R128_SETUP_CNTL
and R128_PM4_VC_FPU_SETUP, the 3D driver will be happy and compositing
will still work. The proper way would be to constantly save and restore
register values but this showed poor performance when dragging 3D
windows across the screen.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-27 17:05:22 -08:00
Connor Behan
d757fe10b9 Drop dependence on xf86PciInfo.h
It is about time we stop using this deprecated file and include pciids
locally.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-26 17:58:15 -08:00
Tormod Volden
d5da29d2ff Do not use int10 or VBE on powerpc
VBE was already skipped in the normal path, but not when setting
the PROBE_DETECT flag.

Should avoid bus error seen in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=622606 and
http://lists.x.org/archives/xorg/2012-February/053969.html

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-10-27 18:46:36 -07:00
Tormod Volden
ccdfcf5c05 r128: bump to version 6.9.2
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
xf86-video-r128-6.9.2
2013-10-02 20:36:38 +02:00
Connor Behan
255cf857af Specify NULL for the platform probe function
Apparently this has been required by the ABI since server 1.13.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2013-09-30 23:24:54 -07:00
Connor Behan
a98077959a Minor spacing changes
A log message needed a space added, two source files needed whitespace
removed.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2013-09-30 21:12:20 -07:00
Connor Behan
aca6aa127f Swap pixmap bytes for a solid picture on big endian host
Some PowerPC users were reporting color errors that only happened with
EXA+DRI. This implements a recent bugfix in the Radeon driver which will
solve at least one of these problems.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2013-03-08 01:02:22 -08:00
Connor Behan
24f28a78fd Remove call to obsolete miInitializeBackingStore()
Definition was deleted from Xorg during 1.14 merge window, but has been
a no-op since 1.10 merge window.

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2012-12-19 10:41:14 -08:00
Dave Airlie
ef4467b4aa r128: bump to 6.9.1
Signed-off-by: Dave Airlie <airlied@redhat.com>
xf86-video-r128-6.9.1
2012-09-28 11:25:17 +10:00
Dave Airlie
1793fe6e84 fix make distcheck
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-28 11:24:53 +10:00
Dave Airlie
e0222a5f5e r128: bump release to 6.9.0
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-28 11:22:54 +10:00
Dave Airlie
e8b741e8fd r128: enable EXA by default if XAA isn't available at build time.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-09-28 11:20:41 +10:00
Connor Behan
4ecd6e67fb Scale Xv with the vertical stretch ratio
If we are using a resolution lower than the native resolution of the
flat panel, the video overlay needs to know this. Otherwise a black bar
appears beneath the video. This is essentially Conn's patch from the bug
tracker except it doesn't always rely on info->PanelYRes. ACPI events
can change this without the driver's knowledge.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=6493

Signed-off-by: Connor Behan <connor.behan@gmail.com>
2012-08-31 00:19:21 -07:00