Age | Commit message (Collapse) | Author | Files | Lines |
|
drmmode_set_scanout_pixmap(pix) adds drmmod->fb_id through a call
to drmmode_xf86crtc_resize(), but on a subsequent
drmmode_set_scanout_pixmap(NULL) it would not remove the fb.
This keeps the crtc marked as busy, which causes the dgpu to not
being able to runtime suspend, after an output attached to the dgpu
has been used once. Which causes burning through an additional 10W
of power and the laptop to run quite hot.
This commit adds the missing remove fb call, allowing the dgpu to runtime
suspend after an external monitor has been plugged into the laptop.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
I don't think these should actually be able to happen, given that we
already reject the unknown formats in the Check() functions. But,
just in case...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Reported by Coverity.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
A port of commit ff9a6b6f from xf86-video-ati.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93670
Reported-by: Thomas D. <thfrdue@gmx.de>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Various random fixes have been pending for a long while now...
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
In multi-x-screen ZaphodHeads configurations, there isn't a
one-to-one mapping of kernel provided drmmode crtc index
to the index of the corresponding xf86Crtc inside the
xf86CrtcConfig crtc array anymore, ie. for kernel provided
drmmode->mode_res->crtcs[i], the i'th crtc won't correspond
to the xf86Crtc in the i'th slot of the x-screens xf86CrtcConfig
anymore, once ZaphodHeads has only selected a subset of all crtcs
of a graphics card for a given x-screen, instead of all crtcs.
This breaks the mapping of bit positions in the bit masks returned
in kencoder->possible_crtcs and kencoder->possible_clones. A 1 bit
in position i of those masks allows use of the kernels i'th crtc for
the given kencoder. The X-Servers dix code checks those bit masks
for valid xf86Output -> xf86Crtc assignments, assuming that the i'th
slot xf86CrtcConfigPtr config->crtc[i] corresponds to bit i in the
xf86Output->possibe_crtcs bitmask, and bails if the bitmask doesn't
allow the specified assignment of crtc to output. If ZaphodHeads
breaks the assumption of bit i <-> crtc slot i this ends in failure.
Take this shift of crtc index positions wrt. encoder bitmask bit
positions into account by bit-shifting positions accordingly when
assigning encoder->possible_crtcs to output->possible_crtcs, so
the proper indices match up again for validation by the dix.
This problem wasn't apparent last year when testing the ZaphodHeads
support on some Kepler cards, as apparently the encoder->possible_crtcs
bitmasks returned for those cards by the kernel just had all 4
lsb bits set for all tested encoders/output, so each of the cards 4
crtcs could go with each output and things worked by chance.
The current code breaks, e.g., on 2010 MacBookPro with nv50, where
one crtc is hardwired to the internal lvds panel, and one crtc
is hardwired to the external DP connector, resulting in a failure
where dual-display on single-x-screen works fine, but assigning
each output to a separate x-screen via ZaphodHeads fails due to
the mismatched encoder->possible_crtcs bitmasks.
This patch fixes the problem.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70931
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
There is no EXA acceleration, and now no GLAMOR either.
User is better off with modesetting until EXA makes an appearance.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
If you want glamor, just use modesetting instead. It's hooked up
incorrectly in nouveau, and there doesn't seem to be any point in fixing
it when the modesetting driver does it all properly.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Allow user to select the maximum level of DRI implementation
to use, DRI2 or DRI3.
exa accel supports both DRI2 and, if the kernel supports
rendernodes, also DRI3. However, DRI3 still seems to have
some bugs on current implementations, and additionally it
doesn't work well at all for X-Servers older than 1.16.3
due to X-Server bugs. Therefore we default to DRI2 on exa,
but allow the user to enable DRI3 with this new option.
nouveau's glamor accel backend currently doesn't work under
DRI2 at all, so we continue to use DRI3 whenever it is
supported and ignore this new option for now.
Also add a bit more output about status of Present and
DRI3 to aid debugging.
Note: This was originally meant to be a boolean parameter,
to just select between DRI3 on and off, but changed
here to a DRI level to make it consistent with the
same option in the released Intel-ddx.
v2: Use fixed up Bool return type of nouveau_present_init().
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Martin Peres <martin.peres@free.fr>
Cc: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Make it a Bool consistently, as declared in header.
Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
|
Mirrors commit b6d871bf2 (radeon: adopt for new X server dirty tracking
APIs.) in xf86-video-ati.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91284
|
|
This is probably a typo error which has been introduced in 2009...
This fixes the following warning detected by Clang :
drmmode_display.c:907:30: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
|
As decoded by envydis. Perhaps these should move into separate files
similar to nvc0, but this seems like a simple intermediate solution.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Doing a solid copy of 0, or a clear, has the same effect. This is a
partial revert of commit 5439a9905eab8c. Pre-nv50 hardware succeeds with
copies more often.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
A 32-bit shift is a no-op, which will also make the new planemask get
or'd with ~0, thus negating the usefulness of the subsequent
planemask != ~0 check. Only do this if it's a less-than-32-bit per pixel
format, in which case it will have the desired effect of setting the
high bits.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Martin Peres <martin.peres@free.fr>
|
|
Pre-nv50 has all sorts of funny requirements for non-copy alu
operations, and will bail out of solid fills left and right. Account for
that case and fall back to the memset.
Reported-by: Andrew Randrianasulu <randrianasulu@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Martin Peres <martin.peres@free.fr>
|
|
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Oops!
|
|
The memcpy in the fallback path fails with SIGBUS on GK20A because
this memory is not coherent, try to use a solid fill instead.
|
|
Judging from previous commits all linear buffers should have a 256 byte alignment.
|
|
|
|
Signed-off-by: Maarten Lankhorst <dev@mblankhorst.nl>
|
|
Signed-off-by: Maarten Lankhorst <dev@mblankhorst.nl>
|
|
|
|
As reported by Roy Spliet.
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Only the NVA3/5/8/F tesla chips have a copy engine. Don't bother trying
to create one on earlier tesla chips (and thus printing an error on
failure).
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
|
|
Highlights:
- Support for server managed fd's.
- Glamor support.
- Maxwell support.
- DRI3 and initial Present support.
- vsync'ed kms pageflip performance fixes when running on Linux 3.13+
- Multi-display vsync, vblank, swap scheduling, timestamping fixes.
- Multi x-screen support fixes.
- ZaphodHead support on for multiple outputs per x-screen.
- EXA nv-10 fixes.
- Enable sync of swaps to vblank by default (Option GLXVblank "on").
- Disable pseudo-triplebuffering by default (Option SwapLimit "1").
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
This used to be 2 for pseudo-triplebuffering on XOrg 1.12+.
However, it caused problems like unthrottled swapping
at up to twice the video refresh rate for redirected
windows under desktop composition, which can't be easily
fixed under dri2.
Default to double-buffering. Users can override this, but
dri3 provides better solutions for this.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Make crtc selection consistent with ati and intel ddx.
Pick the crtc to use for vblank events, swap scheduling and
kms-pageflip completion events as the one with maximum pixel area
intersection between its viewport and the drawable. If multiple
crtc's viewports display the same amount of area of a drawable,
select the crtc whose output is the designated "primary output"
for the x-screen. The latter allows, e.g., in a clone display
setup, to select the important output on which tearing should be
minimized. The former makes sure to minimize or avoid tearing on
the display which shows the largest part of the drawable.
This method is transplanted from the ati ddx.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Some auto-generated file by new make systems to deal with some
old compilers.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Only register the wakeup handler and event socket
once per card fd and server generation, as the fd
and device file is shared between all x-screens for
a given card during a given server generation.
Without this fix, vblank and kms-pageflip completion
event processing don't work properly, as the server
doesn't kick the wakeup handler for gpu events, and
therefore the desktop will freeze, unless the user
manually kicks the wakeup handler by moving the mouse
or hitting the keyboard.
Add proper reference counting and checks to make it so.
This fix is derived from a similar and proven fix in
the ati ddx for the same problem.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Reset the mask of already assigned crtc's at start
of each new server generation.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Use helper function drmmode_head() to choose proper hw-crtc
to sync to. Fixes xv blits, and dri2 Copy-Swaps.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Defining multiple ZaphodHead outputs per x-screen in a
multiple x-screen's per gpu configuration caused all
outputs except one per x-screen to go dark, because
there was a fixed mapping x-screen number -> crtc number,
limiting the number of crtc's per x-screen to one.
On a ZaphodHead's setup, be more clever and assign
as many crtc's to a given x-screen as there are
ZaphodHeads defined for that screen, assuming
there are enough unused crtc's available.
Tested on a triple display setup with different combos
of one, two or three ZaphodHeads per one, two or three
x-screens.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Old mapping of xf86Crtc -> display head index was
too simple and only worked on a single x-screen config.
Introduce a new helper function drmmode_hw_head_index()
which returns proper mapping also for multi x-screens per
gpu and ZaphodHeads setups and other non-standard multi-
display configurations.
Tested on triple-head setup with various ZaphodHead and
server layout combos.
This helper will be also needed for dri3/present code.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
|
|
Doesn't actually end up mattering.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|
|
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
|