summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-11-08drm/radeon/kms: unpin fb in atombios crtc disableIlija Hadzic1-0/+15
When drm_helper_disable_unused_functions calls disable function of the CRTC, it also sets the crtc->fb pointer to NULL. This can later (when the mode on that CRTC is setup again from user space) cause ***_do_set_base functions to "think" that there is no old buffer and skip the unpinning code. Consequently, the buffer that has been NULL-ified in drm_helper_disable_unused_functions will never be unpinned causing a leak in VRAM. This patch plugs the leak by unpinning the frame buffer in crtc_disable function. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-08drm/radeon/audio: fix missing multichannel PCM SAD in some casesAnssi Hannula3-15/+45
The current code writing SADs to the audio registers seems to assume that there is at most a single SAD per audio format. However, that is not the case. Especially for PCM it is somewhat common for sinks to have two SADs, one for 8-channel and one for 2-channel audio, which may have different supported sample rates (i.e. the sink supports stereo audio at higher sample rates than multichannel audio). Because of this, only the 2-channel SAD may be used if it appears before the 8-channel SAD. Unless other SADs require otherwise, this may cause the ALSA HDA driver to allow stereo playback only. Fix the code to pick the PCM SAD with the highest number of channels, while merging the rate masks of PCM SADs with lower amount of channels into the additional stereo rate mask byte. Technically there are even more cases to handle (multiple non-PCM SADs of the same type, more than two PCM SADs with varying channel counts, etc), but those have not actually been encountered in the field and handling them would be non-trivial. Example affected EDID from Onkyo TX-SR674 specifying 192kHz stereo support and 96kHz 8-channel support (and other 8-channel compressed formats): 00ffffffffffff003dcb010000000001 ffff0103800000780a0dc9a057479827 12484c00000001010101010101010101 010101010101011d8018711c1620582c 2500c48e2100009e011d007251d01e20 6e285500c48e2100001e000000fc0054 582d53523637342020202020000000fd 00313d0f2e08000a202020202020019b 02032f724f8504030f0e07069413121e 1d1615012f097f070f1f071707503707 503f07c0834f000066030c00ffff808c 0ad08a20e02d10103e9600c48e210000 18011d80d0721c1620102c2580c48e21 00009e011d00bc52d01e20b8285540c4 8e2100001e8c0ad090204031200c4055 00c48e210000180000000000000000a8 Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Tested-by: Andre Heider <a.heider@gmail.com> Cc: Rafał Miłecki <zajec5@gmail.com> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2013-11-08Merge tag 'drm-intel-fixes-2013-11-07' of ↵Dave Airlie873-5617/+8805
git://people.freedesktop.org/~danvet/drm-intel into drm-next Bit a bit -fixes pull request in the merge window than usual dua to two feauture-y things: - Display CRCs are now enabled on all platforms, including the odd DP case on gm45/vlv. Since this is a testing-only feature it should ever hurt, but I figured it'll help with regression-testing -fixes. So I left it in and didn't postpone it to 3.14. - Display power well refactoring from Imre. Would have caused major pain conflict with the bdw stage 1 patches if I'd postpone this to -next. It's only an relatively small interface rework, so shouldn't cause pain. It's also been in my tree since almost 3 weeks already. That accounts for about two thirds of the pull, otherwise just bugfixes: - vlv backlight fix from Jesse/Jani - vlv vblank timestamp fix from Jesse - improved edp detection through vbt from Ville (fixes a vlv issue) - eDP vdd fix from Paulo - fixes for dvo lvds on i830M - a few smaller things all over Note: This contains a backmerge of v3.12. Since the -internal branch always applied on top of -nightly I need that unified base to merge bdw patches. So you'll get a conflict with radeon connector props when pulling this (and nouveau/master will also conflict a bit when Ben doesn't rebase). The backmerge itself only had conflicts in drm/i915. There's also a tiny conflict between Jani's backlight fix and your sysfs lifetime fix in drm-next. * tag 'drm-intel-fixes-2013-11-07' of git://people.freedesktop.org/~danvet/drm-intel: (940 commits) drm/i915/vlv: use per-pipe backlight controls v2 drm/i915: make backlight functions take a connector drm/i915: move opregion asle request handling to a work queue drm/i915/vlv: use PIPE_START_VBLANK interrupts on VLV drm/i915: Make intel_dp_is_edp() less specific drm/i915: Give names to the VBT child device type bits drm/i915/vlv: enable HDA display audio for Valleyview2 drm/i915/dvo: call ->mode_set callback only when the port is running drm/i915: avoid unclaimed registers when capturing the error state drm/i915: Enable DP port CRC for the "auto" source on g4x/vlv drm/i915: scramble reset support for DP port CRC on vlv drm/i915: scramble reset support for DP port CRC on g4x drm/i916: add "auto" pipe CRC source ... Conflicts: MAINTAINERS drivers/gpu/drm/i915/intel_panel.c drivers/gpu/drm/nouveau/core/subdev/mc/base.c drivers/gpu/drm/radeon/atombios_encoders.c drivers/gpu/drm/radeon/radeon_connectors.c
2013-11-08drm/vmwgfx: fix warning if config intel iommu is off.Dave Airlie1-0/+2
Though I'm not really happy with how ugly this code is now. Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-11-08drm/nouveau: consider CLASS_DISPLAY_3D devices while detecting dsm/optimusEmil Velikov1-0/+10
The present code assumes that optimus is present whenever two VGA (PCI_CLASS_DISPLAY_VGA) devices are present. This does not seem to be the case of newer laptops with optimus, in which case the nvidia gpu is a PCI_CLASS_DISPLAY_3D device. Rework the logic so that we count both VGA and 3D devices, when contemplating if optimus is present on the platform. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70208 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-11-08Merge branch 'drm-nouveau-next' of ↵Dave Airlie233-6862/+19471
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next - Ilia's PMPEG improvements - MSI fixes, and another attempt at enabling by default - Initial GK208 support, just modesetting - "Old" PM code gone, new infrastructure and various different stages of support (depending which chipset / ram type etc) is in its place. This includes support that goes beyond what the previous code was capable of. User control has been deliberately sabotaged, it's not safe to use still. - Thermal management / fan control that's been present for a while is turned ON by default now. - Misc other fixes that have accumulated * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (74 commits) drm/nouveau/fb: implement various bits of work towards memory reclocking drm/nouveau: implement a simple sysfs interface to new pm code drm/nouveau/device: initial control object class, with pstate control methods drm/nouveau/clk: implement power state and engine clock control in core drm/nouveau/volt: implement voltage control in core drm/nouveau/bios: parsing for various tables required for power management drm/nouveau/perfmon: initial infrastructure to expose performance counters drm/nouveau/bus: add interfaces/helpers for sequencer drm/nouveau/bus: make external class definitions pointers drm/nouveau/pwr: initial implementation drm/nouveau/therm: update target fanspeed outside of therm lock drm/nouveau/therm: automatic mode by default drm/nouveau/therm: no toggle fan control either if we can't guarantee no pwm connected drm/nvc0/therm: allow fan control if we've killed the vbios ppwr ucode drm/nouveau/therm: if no bios trip/linear info, default to perf-suggested speed drm/nouveau/therm: add hook for clk to suggest fanspeed to therm drm/nouveau/pwr: assign a subdev id for upcoming implementation drm/nouveau/gpio: return different error code for not found vs invalid drm/nouveau/drm/pm: remove everything except the hwmon interfaces to THERM drm/nouveau/core: make all info-level messages silent for runtime pm ...
2013-11-08drm/mgag200: drop pointless info print.Dave Airlie1-2/+0
This isn't useful anymore. Signed-off-by: Dave Airlie <airlied@redhat.com>
2013-11-08drm/nouveau/fb: implement various bits of work towards memory reclockingBen Skeggs21-60/+3093
Not even remotely ready for the vast majority of the world. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau: implement a simple sysfs interface to new pm codeBen Skeggs5-5/+191
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/device: initial control object class, with pstate control methodsBen Skeggs5-2/+196
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/clk: implement power state and engine clock control in coreBen Skeggs19-65/+2590
User control of this has been hard-coded as disabled for now. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/volt: implement voltage control in coreBen Skeggs9-0/+460
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/bios: parsing for various tables required for power managementBen Skeggs16-8/+969
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/perfmon: initial infrastructure to expose performance countersBen Skeggs22-2/+1616
Internal use only at this point. Userspace later. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/bus: add interfaces/helpers for sequencerBen Skeggs9-15/+371
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/bus: make external class definitions pointersBen Skeggs14-176/+133
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/pwr: initial implementationBen Skeggs30-0/+7091
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/therm: update target fanspeed outside of therm lockBen Skeggs1-6/+8
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/therm: automatic mode by defaultBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/therm: no toggle fan control either if we can't guarantee no pwm ↵Ben Skeggs1-0/+7
connected Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nvc0/therm: allow fan control if we've killed the vbios ppwr ucodeBen Skeggs1-3/+4
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/therm: if no bios trip/linear info, default to perf-suggested speedBen Skeggs2-3/+15
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/therm: add hook for clk to suggest fanspeed to thermBen Skeggs4-1/+17
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/pwr: assign a subdev id for upcoming implementationBen Skeggs1-0/+1
THERM will use this before it exists. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/gpio: return different error code for not found vs invalidBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/drm/pm: remove everything except the hwmon interfaces to THERMBen Skeggs15-4837/+69
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/core: make all info-level messages silent for runtime pmBen Skeggs8-76/+54
Removes the need for special handling of messages in init paths. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/fifo: make external class definitions into pointersBen Skeggs17-86/+86
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/device: recognise GK208Ben Skeggs2-13/+48
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nvc0-/gr: fix a number of missing explicit array terminators...Ben Skeggs3-0/+6
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/mc: fix (incorrect) reporting of unknown pending intr bitsBen Skeggs1-6/+11
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/disp: semi-complete link training sequence even if display ↵Ben Skeggs1-16/+32
disappears Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/bios: some older boards have shorter displayport tablesBen Skeggs1-3/+7
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/fbcon: bracket entrypoints with a per-device enabled checkBen Skeggs1-16/+27
We don't necessarily have fbcon on all devices these days. Fixes suspend on (at least) Quadro NVS 450. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nvd0-/disp: reorder writes to lane current control regsBen Skeggs1-4/+8
Matches the nv94-nvc0 commit with the same title. Doesn't fix a reported issue, but NVIDIA use this ordering here too, so let's do it just in case. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nv94-nvc0/disp: reorder writes to lane current control regsBen Skeggs1-4/+8
Fixes link training issues on some boards. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/disp: log if DP link training failsBen Skeggs1-1/+3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/i2c: use a custom bitbanging delay for the adt7473Martin Peres5-49/+77
This patch adds a way to define a custom delay when scanning for i2c devices because the adt7473 sometimes doesn't like the default bitbanging udelay. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/agp: add a quirk list to limit agp modesIlia Mirkin1-5/+39
Certain combinations of hardware can't actually support the maximum detected speed. Add a quirk list that lists pairs of hostbridge/chip pci ids and the mode that they should work with. See https://bugs.freedesktop.org/show_bug.cgi?id=20341 Reported-by: Jason Detring <detringj@gmail.com> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nvd9-/disp: disable display underflow reporting at initBen Skeggs1-0/+9
Reported-by: Andy Ritger <aritger@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nva0/clk: fix accidental limiting of pll coefficientsBen Skeggs1-13/+16
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nv50-nvaf/fb: split fbram oclass in preparation for reclockingBen Skeggs9-52/+184
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/fb: merge more bits and pieces into oclass definitionsBen Skeggs27-519/+272
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/fb: remove ram oclass argument from base fb constructorBen Skeggs24-107/+135
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nv50-nvaf/fb: split the class definitions up a bitBen Skeggs9-44/+203
These will diverge further in the future. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/fb: make external class definitions pointersBen Skeggs26-113/+113
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nvaa/mc: blacklist msi to off by defaultBen Skeggs1-11/+19
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nv50-nv86,nv92/mc: rearm msi via pci config space, rather than mmio mirrorBen Skeggs6-4/+52
This is what NVIDIA do on these chipsets, let's hope it works around the reported MSI failures for us on NV86. v2: updated to include G92, as per information provided by NVIDIA. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nvc0,nvc4/mc: handle 0xc0's "special" msi rearmBen Skeggs13-32/+134
v2. updated to cover GF104, as per information provided by NVIDIA. Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-11-08drm/nouveau/mc: store static data in nouveau_mc class definitionBen Skeggs16-215/+151
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>