Age | Commit message (Collapse) | Author |
|
RADEONRestore() calls crtc->funcs->dpms() after most of the mode setting
subsystems have been restored. This function enables the CRTCs but does
more: it calls DRM pre- and post-modeset ioctls and sets up the palettes
(LUTs).
None of these two things are needed. Accessing the palette registers after
restoring the PLLs can even lead to lockups.
Thus the CRTC DPMS function is split into two parts: one that just enables
/disables the CRTC and one which wraps this function and does the rest.
Now the inner function can be called directly from RADEONRestore() as
there is no need to go thru the RandR hooks in this function while the
RandR hook uses the wrappering function so the full functionality is
preserved from an RandR point of view.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
|
|
The reintroduction of palette save/restore in 5efdf514 causes some
pre-AVIVO chips to lock up. An investigation revealed that accessing
palette registers when the associated PLL is not running is causing
this. With UMS the PLL setup that is saved has been done by the BIOS
typically.
A similar issue was observed when VGA palette save/restore had
been reinitroduced with 80eee856:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480312
and has been worked around for Linux without further investigation
by 87e66ce7.
To fix the issue we now
a. introduce 'on-demand' palette saving (ie the palette is
saved before it is first altered). This guarantees that
the palette register are only associated when the associated
CRTC is active and thus the PLLs are powered up and running.
b. move palette restore before PLL restore.
c. eliminate generic VGA palette save/restore which seems to be
unneeded when the palette is restored natively.
It is believed that this caused the behavior described in
https://bugs.freedesktop.org/show_bug.cgi?id=18407#c27
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Should fix https://bugs.freedesktop.org/show_bug.cgi?id=42690 .
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Ideally, the display manager will start the X server again, and everything
will be fine and dandy. But in the worst case, at least we won't hit the
hardware behind the KMS driver's back.
(This change intentionally makes (ab)use of the fact that Bool is defined as
int).
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
- KMS only
- Includes full EXA/Xv support
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
RADEONRestore() restores the CLOCK_CNTL_INDEX register before calling
RADEONRestorePLLRegisters(), which modifies the CLOCK_CNTL_INDEX register
to access the PLL registers. As a result we may end up with the wrong clock
being selected when exiting X. This happens on platforms where the driver
doesn't save and restore the VGA state.
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
|
|
NI cards require KMS.
|
|
Also kill unneeded vbe.h include from radeon_bios.c.
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
|
|
Accel not enabled yet.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
add in lots more blocks of regs to save/restore
|
|
|
|
This isn't perfect, but it brings back text VTs here on the
DAC and DVI outputs.
|
|
this is just prep work for evergreen VT save/restore
|
|
|
|
Save and restore the palettes on VT switch. The restore
has to be done after the vga restore to work properly as
determined by Jonathan Kollasch.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=18407
|
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
If the fbLocation was at an address >32 bits, we'd fail.
Change fbLocation to uint64_t and properly cast when needed.
|
|
This fails for MC addresses >32 bits
|
|
Fixes deprecation warnings with xserver master and should also work with older
xservers.
|
|
With MMIO it wasn't *such* a bit deal if we leaked the smallish mapping.
with FB it could be a larger deal. So instead of worrying about this,
reference count the mappings in the entity structure and unmap them when
no one cares anymore.
Prompted by a discussion with airlied
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
What we were doing previously was mapping the framebuffer for zaphod for
only this driver instances chunk, however, fbOffset was (rightly) set to
the offset into the whole framebuffer we were using.
Since in some cases we did operations on the FB virtual address +
fbOffset (for example zeroing the framebuffer on entervt) we were
actually pissing all over ourselves in those cases.
Fix this by implementing shared fb mappings like we do for MMIO already,
and whenever we wish to refer to our area of FB space we always use
fbOffset. Fixes zaphod for some users on r600 chipsets, my 4870 is still
behaving strangely on screen 0, but I suspect that is another bug.
Once calculation (in PreInitAccel) is now wrong because of this, however
dri on zaphod does now happen so this is irrelavent, add a comment to
that effect.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
The rest of it died a long time ago.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
reported on phoronix forums.
|
|
|
|
Also fix some RADEON_ALIGN(x, 63), which would return incorrect results
for odd x. Though this shouldn't happen, it's still not right. You
wouldn't ever write (x + 62) & ~62 which is clearly wrong (and what it
expands to).
CC: Jerome Glisse <jglisse@redhat.com>
CC: Alex Deucher <alexdeucher@gmail.com>
CC: Dave Airlie <airlied@redhat.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
Also, define RADEON_BUFFER_ALIGN in terms of it, and replace some
RADEON_ALIGN(x, RADEON_BUFFER_ALIGN) with RADEON_ALIGN(x,
RADEON_GPU_PAGE_SIZE) since this is really what was intended.
CC: Jerome Glisse <jglisse@redhat.com>
CC: Alex Deucher <alexdeucher@gmail.com>
CC: Dave Airlie <airlied@redhat.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
|
|
|
|
Now that the screen section mapping is fixed,
Make the option per-instance and allow multiple
outputs to be specified; e.g., DVI-0 and HDMI-0
associated with instance 0 and LVDS and VGA-0
associated with instance 1.
|
|
Needed for systems with more than two outputs.
Both KMS and non-KMS zaphod work on systems with
more than two outputs now.
|
|
Allows users that want to use zaphod mode to select
which xrandr outputs are assigned to which head. E.g.,
Option "ZaphodHeads" "LVDS,VGA-0"
will assign LVDS to the first zaphod driver instance
and VGA-0 to the second instance.
|
|
backport from a KMS fix, the rs400/480 mc idle is bit 2 not bit 4.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
|
|
This should hopefully help the problems with flickering
and blinking monitors reported on some systems. If there
are problems, the old PLL algorithm can be selected with:
Option "NewPLL" "FALSE"
in the device section of your X config.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Set bus type appropriately. fixes bug 25002
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
We don't use the invisible memory yet and on cards with
large amounts of vram this can cause the top of GART
calculation to overflow.
Fixes bug fdo bug 24301:
http://bugs.freedesktop.org/show_bug.cgi?id=24301
v2: only clamp cards with more than 512 MB. This seems
to cause problems on some older cards due to the way the
drm and ddx set up the internal memory map.
|
|
This reverts commit 5f846360c46f5a989f5d0fde6d251cdbd61d4968.
Numerous reports of system hangs since this, I'm guessing
some sort of conflict with the drm memory setup. This code
has always been fragile between kernel/userspace drivers.
|
|
We don't use the invisible memory yet and on cards with
large amounts of vram this can cause the top of GART
calculation to overflow.
Fixes bug fdo bug 24301:
http://bugs.freedesktop.org/show_bug.cgi?id=24301
|
|
Allows you to specify an edid per output from a file
to override what is detected by DDC. Useful for
problematic monitors or KVM switches that block
DDC. Specifying an EDID that is not compatible with
your monitor could damage your monitor so use with
caution.
agd5f: cache the custom edid at startup so we don't
have to read it from file every time the output is
queried.
|
|
Remove a message on driver startup which directs people to the old GATOS
website; said site contains highly out of date software which is no longer
necessary.
|
|
|
|
leftover from the randr 1.2 conversion.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
this thing can be rendering to VRAM when we don't expect it.
turn it off.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
|
|
|
|
Use XAA in low memory situations or when the DRI is disabled.
Using shadowfb might also be a viable option, maybe even a better option...
fixes bug 21683
|
|
fixed bicubic filtering after VT switch or suspend/resume
|
|
From RHEL QE testing, we could end up with the cursor at 0 since
we think EXA is in use when really it isn't. the info->useEXA = FALSe
might be unnecessary but better to be explicit
Signed-off-by: Dave Airlie <airlied@redhat.com>
|