aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-11-01Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds4-14/+39
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Two fixes: - Fix 'NMI handler took too long to run' false positives [ Genuine NMI overhead speedups will come for v3.13, this commit only fixes a measurement bug ] - Fix perf ring-buffer missed barrier causing (rare) ring-buffer data corruption on ppc64" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: Fix NMI measurements perf: Fix perf ring buffer memory ordering
2013-11-01drm/radeon: don't share PPLLs on DCE4.1Alex Deucher1-1/+1
Sharing PPLLs seems to cause problems on some boards. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=45334 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-11-01drm/radeon/dpm: fix typo in setting smc flagAlex Deucher1-1/+1
PPSMC_EXTRAFLAGS_AC2DC_GPIO5_POLARITY_HIGH should be set in extraFlags, not systemFlags. Noticed-by: Sylvain BERTRAND <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: fixup locking inversion between, mmap_sem and reservationsMaarten Lankhorst3-223/+106
op 08-10-13 18:58, Thomas Hellstrom schreef: > On 10/08/2013 06:47 PM, Jerome Glisse wrote: >> On Tue, Oct 08, 2013 at 06:29:35PM +0200, Thomas Hellstrom wrote: >>> On 10/08/2013 04:55 PM, Jerome Glisse wrote: >>>> On Tue, Oct 08, 2013 at 04:45:18PM +0200, Christian König wrote: >>>>> Am 08.10.2013 16:33, schrieb Jerome Glisse: >>>>>> On Tue, Oct 08, 2013 at 04:14:40PM +0200, Maarten Lankhorst wrote: >>>>>>> Allocate and copy all kernel memory before doing reservations. This prevents a locking >>>>>>> inversion between mmap_sem and reservation_class, and allows us to drop the trylocking >>>>>>> in ttm_bo_vm_fault without upsetting lockdep. >>>>>>> >>>>>>> Signed-off-by: Maarten Lankhorst <[email protected]> >>>>>> I would say NAK. Current code only allocate temporary page in AGP case. >>>>>> So AGP case is userspace -> temp page -> cs checker -> radeon ib. >>>>>> >>>>>> Non AGP is directly memcpy to radeon IB. >>>>>> >>>>>> Your patch allocate memory memcpy userspace to it and it will then be >>>>>> memcpy to IB. Which means you introduce an extra memcpy in the process >>>>>> not something we want. >>>>> Totally agree. Additional to that there is no good reason to provide >>>>> anything else than anonymous system memory to the CS ioctl, so the >>>>> dependency between the mmap_sem and reservations are not really >>>>> clear to me. >>>>> >>>>> Christian. >>>> I think is that in other code path you take mmap_sem first then reserve >>>> bo. But here we reserve bo and then we take mmap_sem because of copy >>> >from user. >>>> Cheers, >>>> Jerome >>>> >>> Actually the log message is a little confusing. I think the mmap_sem >>> locking inversion problem is orthogonal to what's being fixed here. >>> >>> This patch fixes the possible recursive bo::reserve caused by >>> malicious user-space handing a pointer to ttm memory so that the ttm >>> fault handler is called when bos are already reserved. That may >>> cause a (possibly interruptible) livelock. >>> >>> Once that is fixed, we are free to choose the mmap_sem -> >>> bo::reserve locking order. Currently it's bo::reserve->mmap_sem(), >>> but the hack required in the ttm fault handler is admittedly a bit >>> ugly. The plan is to change the locking order to >>> mmap_sem->bo::reserve >>> >>> I'm not sure if it applies to this particular case, but it should be >>> possible to make sure that copy_from_user_inatomic() will always >>> succeed, by making sure the pages are present using >>> get_user_pages(), and release the pages after >>> copy_from_user_inatomic() is done. That way there's no need for a >>> double memcpy slowpath, but if the copied data is very fragmented I >>> guess the resulting code may look ugly. The get_user_pages() >>> function will return an error if it hits TTM pages. >>> >>> /Thomas >> get_user_pages + copy_from_user_inatomic is overkill. We should just >> do get_user_pages which fails with ttm memory and then use copy_highpage >> helper. >> >> Cheers, >> Jerome > Yeah, it may well be that that's the preferred solution. > > /Thomas > I still disagree, and shuffled radeon_ib_get around to be called sooner. How does the patch below look? 8<------- Allocate and copy all kernel memory before doing reservations. This prevents a locking inversion between mmap_sem and reservation_class, and allows us to drop the trylocking in ttm_bo_vm_fault without upsetting lockdep. Changes since v1: - Kill extra memcpy for !AGP case. Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Jerome Glisse <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: clear the page directory using the DMAChristian König1-5/+29
Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: initially clear page tablesChristian König1-0/+10
Clear page tables after allocating them in case we don't completely fill them later. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: drop CP page table updates & cleanup v2Christian König10-267/+73
The DMA ring seems to be stable now. v2: remove pt_ring_index as well Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: add vm_set_page tracepointChristian König4-0/+33
Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: rework and fix reset detection v2Christian König3-230/+127
Stop fiddling with jiffies, always wait for RADEON_FENCE_JIFFIES_TIMEOUT. Consolidate the two wait sequence implementations into just one function. Activate all waiters and remember if the reset was already done instead of trying to reset from only one thread. v2: clear reset flag earlier to avoid timeout in IB test Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: don't use PACKET2 on CIKMarek Olšák1-1/+1
It is said to cause hangs. Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: fix UVD destroy IB sizeChristian König1-1/+1
The parameter is in bytes not dwords. Signed-off-by: Christian König <[email protected]> Cc: [email protected] Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: activate UVD clocks before sending the destroy msgChristian König1-0/+2
Make sure the UVD clocks are still active before sending the destroy message, otherwise the hw might hang. Signed-off-by: Christian König <[email protected]> Cc: [email protected] Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon/si: fix define for MC_SEQ_TRAIN_WAKEUP_CNTLAlex Deucher1-1/+1
Typo in the register offset. Noticed-by: Sylvain BERTRAND <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-11-01drm/radeon: fix endian handling in rlc buffer setupAlex Deucher3-54/+56
The buffers needs to be in little endian format. Noticed-by: Sylvain BERTRAND <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon/dpm: retain user selected performance level across state changesAlex Deucher1-4/+8
If the user has forced the state high or low, retain that preference even when we switch power states. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=70654 Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: disable force performance state when thermal state is activeAlex Deucher1-2/+6
If the thermal state is active, we are in the lowest performance level to cool down the chip. Don't let the user force it higher. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: enable DPM by default on r7xx asicsAlex Deucher1-4/+4
Seems to be stable on them. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: enable DPM by default on evergreen asicsAlex Deucher1-5/+5
Seems to be stable on them. There are still some issues with the performance states staying in the highest levels on certain cards when multiple monitors are attached, but being that the the cards are always in their highest power state at boot up anyway, this doesn't really change anything and improves things in all other cases. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01Merge tag 'usb-3.12-rc8' of ↵Linus Torvalds4-268/+66
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here is a set of patches that revert all of the changes done to the pl2303 USB serial driver in the 3.12-rc timeframe, as it turns out they break some devices that work just fine on 3.11. As it's not a good idea to break working systems, drop them all and they will be reworked for future kernel versions such that there is no breakage. I've also included a MAINTAINERS update for the USB serial subsystem and a new device id for the ftdi_sio driver as well" * tag 'usb-3.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: serial: ftdi_sio: add id for Z3X Box device USB: Maintainers change for usb serial drivers Revert "USB: pl2303: restrict the divisor based baud rate encoding method to the "HX" chip type" Revert "usb: pl2303: fix+improve the divsor based baud rate encoding method" Revert "usb: pl2303: do not round to the next nearest standard baud rate for the divisor based baud rate encoding method" Revert "usb: pl2303: remove 500000 baud from the list of standard baud rates" Revert "usb: pl2303: move the two baud rate encoding methods to separate functions" Revert "usb: pl2303: increase the allowed baud rate range for the divisor based encoding method" Revert "usb: pl2303: also use the divisor based baud rate encoding method for baud rates < 115200 with HX chips" Revert "usb: pl2303: add two comments concerning the supported baud rates with HX chips" Revert "pl2303: simplify the else-if contruct for type_1 chips in pl2303_startup()" Revert "pl2303: improve the chip type information output on startup" Revert "pl2303: improve the chip type detection/distinction" Revert "USB: pl2303: distinguish between original and cloned HX chips"
2013-11-01Merge tag 'sound-3.12' of ↵Linus Torvalds4-1/+9
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull more sound fixes from Takashi Iwai: "The fixes for random bugs that have been reported lately in the game: a few fixes in ASoC dpam and wm_hubs bugs spotted by Coverity, a one-liner HD-audio fixup, and a fix for Oops with DPCM. They are not so critically urgent bugs, but all small and safe" * tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: fix oops in snd_pcm_info() caused by ASoC DPCM ASoC: wm_hubs: Add missing break in hp_supply_event() ALSA: hda - Add a fixup for ASUS N76VZ ASoC: dapm: Return -ENOMEM in snd_soc_dapm_new_dai_widgets() ASoC: dapm: Fix source list debugfs outputs
2013-11-01Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linuxLinus Torvalds4-4/+25
Pull clock subsystem fixes from Mike Turquette. * tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux: clk: fixup argument order when setting VCO parameters clk: socfpga: Fix incorrect sdmmc clock name clk: armada-370: fix tclk frequencies clk: nomadik: set all timers to use 2.4 MHz TIMCLK
2013-11-01memcg: remove incorrect underflow checkGreg Thelen1-1/+0
When a memcg is deleted mem_cgroup_reparent_charges() moves charged memory to the parent memcg. As of v3.11-9444-g3ea67d0 "memcg: add per cgroup writeback pages accounting" there's bad pointer read. The goal was to check for counter underflow. The counter is a per cpu counter and there are two problems with the code: (1) per cpu access function isn't used, instead a naked pointer is used which easily causes oops. (2) the check doesn't sum all cpus Test: $ cd /sys/fs/cgroup/memory $ mkdir x $ echo 3 > /proc/sys/vm/drop_caches $ (echo $BASHPID >> x/tasks && exec cat) & [1] 7154 $ grep ^mapped x/memory.stat mapped_file 53248 $ echo 7154 > tasks $ rmdir x <OOPS> The fix is to remove the check. It's currently dangerous and isn't worth fixing it to use something expensive, such as percpu_counter_sum(), for each reparented page. __this_cpu_read() isn't enough to fix this because there's no guarantees of the current cpus count. The only guarantees is that the sum of all per-cpu counter is >= nr_pages. Fixes: 3ea67d06e467 ("memcg: add per cgroup writeback pages accounting") Reported-and-tested-by: Flavio Leitner <[email protected]> Signed-off-by: Greg Thelen <[email protected]> Reviewed-by: Sha Zhengju <[email protected]> Acked-by: Johannes Weiner <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-11-01drm/i915: avoid unclaimed registers when capturing the error statePaulo Zanoni1-7/+8
Even though we only check for unclaimed registers while we're writing registers, if we read a bad register we'll still trigger a CPU error interrupt, and we'll print an "Unclaimed register" DRM_ERROR due to that. To avoid this error, just avoid touching power domains that are not enabled. Use kzalloc so we're sure all the disabled domains will be zeroed on the error state file. We already print the information that is enough to discover if the power well is enabled on the error state file, so this should not be a problem. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69747 Signed-off-by: Paulo Zanoni <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-01drm/i915: Enable DP port CRC for the "auto" source on g4x/vlvDaniel Vetter1-2/+17
Now that DP port CRCs are stable, we can use it for generic CRC tests. Yay, the auto CRC source should now work everywhere! Reviewed-by: Damien Lespiau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-01drm/i915: scramble reset support for DP port CRC on vlvDaniel Vetter1-0/+46
They've moved the DC balance reset bit around. Again I don't think we need it, but better safe than sorry and maybe HDMI port CRC will prove useful for checking infoframes or hdmi audio. v2: Apply the suggestions from Damien's review. Reviewed-by: Damien Lespiau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-01drm/i915: scramble reset support for DP port CRC on g4xDaniel Vetter2-0/+60
We need to reset the DP scrambler on every vsync to get stable CRCs. And since we can't use the normal pipe CRC on DP ports on g4x we really need them to be able to test modesetting issues on (e)DP outputs. Note that the DC balance reset is for SDVO port CRCs so we don't strictly need it. But better safe than sorry (and it's a nice template in case we ever want to grab port CRCs for e.g. audio checking). v2: Apply the suggestions from Damien's review. Reviewed-by: Damien Lespiau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-01drm/i916: add "auto" pipe CRC sourceDaniel Vetter2-15/+77
On gmch platforms the normal pipe source CRC registers don't work for DP and TV encoders. And on newer platforms the single pipe CRC has been replaced by a set of CRC at different stages in the platform. Now most of our userspace tests don't care one bit about the exact CRC, they simply want something that reflects any changes on the screen. Hence add a new auto target for platform agnostic tests to use. v2: Pass back the adjusted source so that it can be shown in debugfs. v3: I seem to be unable to get a stable CRC for DP ports. So let's just disable them for now when using the auto mode. Note that testcases need to be restructured so that they can dynamically skip connectors. They also first need to set up the desired mode configuration, since otherwise the auto mode won't do the right thing. v4: Don't leak the modeset mutex on error paths. v5: Spelling fix for the i9xx auto_source function. Cc: Damien Lespiau <[email protected]> Reviewed-by: Damien Lespiau <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-01drm/radeon: enable DPM by default on BTC asicsAlex Deucher1-3/+3
Seems to be stable on them. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: enable DPM by default on SI asicsAlex Deucher1-5/+5
Seems to be stable on them and improves peformance as most SI asics have very low boot clocks. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: enable DPM by default on SUMO/PALM APUsAlex Deucher1-3/+15
DPM seems to be stable on these asics and it drastically improves performance depending on the boot clocks. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon/dpm: only print dpm debugging messages when radeon_dpm=1Alex Deucher1-6/+8
Avoids spamming the system log for chips where dpm is enabled by default, but prints then messages when users force it on for other asics. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: Implement radeon_pci_shutdownMarkus Trippelsdorf1-0/+10
Currently radeon devices are not properly shutdown during kexec. This causes a varity of issues, e.g. dpm initialization failures. Fix this by implementing a radeon_pci_shutdown function, that unloads the driver cleanly. Signed-off-by: Markus Trippelsdorf <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon/audio: write audio/video latency info for DCE6/8Alex Deucher3-0/+91
Needed by the hda driver to properly set up synchronization on the audio side. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2013-11-01drm/radeon/audio: write audio/video latency info for DCE4/5Alex Deucher2-0/+75
Needed by the hda driver to properly set up synchronization on the audio side. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2013-11-01drm/radeon/audio: break out of loops once we match connectorAlex Deucher2-4/+12
No need to continue with the loops once we've matched the appropriate connector. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon/atom: don't call [EN|DIS]ABLE_OUTPUT on DCE4.xAlex Deucher1-6/+1
The plain [EN|DIS]ABLE functions do the same thing and more and aren't broken on some systems like [EN|DIS]ABLE_OUTPUT. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon/atom: don't call [EN|DIS]ABLE_OUTPUT on DCE3.xAlex Deucher1-8/+0
The plain [EN|DIS]ABLE functions do the same thing and more and aren't broken on some systems like [EN|DIS]ABLE_OUTPUT. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon/si: tell dpm there is a display connectedAlex Deucher1-1/+6
On SI asics, the SMC will automatically force the performance level to the lowest level if there are no displays active. This prevents automatic performance scaling on PowerXpress systems or for offscreen rendering or compute when displays are disabled. Going forward, it would be best to dynamically change this, but for now leave scaling enabled. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69395 Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: implement blit copy callback for CIKAlex Deucher3-0/+145
Uses the CP ring rather than the DMA ring. Useful for debugging and benchmarking. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon/dpm: cleanup a type issue with rv6xx_clocks_per_unit()Dan Carpenter1-3/+3
The rv6xx_clocks_per_unit() function pretends it can set flags in a u64 bitfield but really because "1" is an int it doesn't work for more than 32 bits. The only caller truncates the high bits away anyway. I've just changed it to be a u32. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: plug in blit copy routine for SIAlex Deucher1-1/+1
Uses CP DMA packet just like previous asics. Useful for debugging and benchmarking. Uses same packet format as prior asics. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: enable hdmi audio by defaultAlex Deucher1-4/+4
Seems to be stable enough for the majority of users. It can be disabled on the fly via connector attributes. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: add runtime PM support (v2)Dave Airlie10-36/+299
This hooks radeon up to the runtime PM system to enable dynamic power management for secondary GPUs in switchable and powerxpress laptops. v2: agd5f: clean up, add module parameter Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: convert to pmopsDave Airlie3-30/+49
This is a pre-requisite for runtime pm on powerxpress systems. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: add a connector property for ditherAlex Deucher7-17/+82
Allows you to enable dither in the display hardware when the monitor supports lower a lower bpc than the current framebuffer format. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/radeon: Add support for programming the FMT blocksAlex Deucher9-0/+333
The FMT blocks control how data is sent from the backend of the display pipe to to monitor. Proper set up of the FMT blocks are required for 30bpp formats. Additionally, dithering can be enabled on for better display with 18 and 24bpp displays. The exception is LVDS/eDP which atom takes care of in the SelectCRTC_Source table. For now just enable truncation until we test dithering more. Signed-off-by: Alex Deucher <[email protected]>
2013-11-01drm/msm/mdp4: page_flip cleanups/fixesRob Clark3-15/+50
There were a few potential problems with the original page_flip/vblank code in mdp4_crtc. 1) We need vblank irq for a couple things, both completing flips and updating cursor. We need to keep track of what work is pending so that (for example) a cursor update while we are still waiting for pageflip_cb (ie. pageflip requested from userspace, but still waiting for rendering to complete) would not prematurely trigger event to userspace. 2) A preclose -> pageflip-cancel should not cancel a pageflip that was requested on a different file (ie. non-master closing should not cancel a pending pageflip). With these fixes, we no longer have problems w/ cursor not updating and with occasional hangs with userspace waiting for a pageflip that had been cancelled (launching XBMC from gnome-shell overview mode was a good way to trigger this, but now works reliably). Signed-off-by: Rob Clark <[email protected]>
2013-11-01drm/msm: EBUSY status handling in msm_gem_fault()Rob Clark1-0/+5
Subsequent threads returning EBUSY from vm_insert_pfn() was not handled correctly. As a result concurrent access from new threads to mmapped data caused SIGBUS. See e79e0fe3 Signed-off-by: Rob Clark <[email protected]> Acked-by: David Brown <[email protected]>
2013-11-01drm/msm: rework inactive-workRob Clark6-33/+71
Re-arrange things a bit so that we can get work requested after a bo fence passes, like pageflip, done before retiring bo's. Without any sort of bo cache in userspace, some games can trigger hundred's of transient bo's, which can cause retire to take a long time (5-10ms). Obviously we want a bo cache.. but this cleanup will make things a bit easier for atomic as well and makes things a bit cleaner. Signed-off-by: Rob Clark <[email protected]> Acked-by: David Brown <[email protected]>
2013-11-01drm/msm: add plane supportRob Clark6-56/+182
Enable using VG1 and VG2 for planes. Currently YUV/CSC or scaling is not enabled, but ARGB and xRGB blending is. Signed-off-by: Rob Clark <[email protected]> Acked-by: David Brown <[email protected]>