aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2012-05-07drm/nouveau/i2c: resume use of i2c-algo-bit, rather than custom stackBen Skeggs
Previous issues with i2c-algo-bit have now been resolved. This is a revert of f553b79c03f0dbd52f6f03abe8233a2bef8cbd0d mostly, due to fixes in the i2c core repairing the original issue, this code isn't required and was causing regressions. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reported-by: Nick Bowler <nbowler@elliptictech.com> Tested-by: Nick Bowler <nbowler@elliptictech.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-07drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+Daniel Vetter
I've flagged this while reviewing the first version and Ken Graunke fixed it up in v2, but unfortunately Dave Airlie picked up the wrong version. Cc: Dave Airlie <airlied@redhat.com> Cc: Kenneth Graunke <kenneth@whitecape.org> Cc: stable@kernel.org Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-07drm/i915: disable sdvo hotplug on i945g/gmDaniel Vetter
Chris Wilson dug out a hw erratum saying that there's noise on the interrupt line on i945G chips. We also have a bug report from a i945GM chip with an sdvo hotplug interrupt storm (and no apparent cause). Play it safe and disable sdvo hotplug on all i945 variants. Note that this is a regression that has been introduced in 3.1, when we've enabled sdvo hotplug support with commit cc68c81aed7d892deaf12d720d5455208e94cd0a Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Date: Wed Sep 21 17:13:30 2011 +0100 drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI Cc: stable@kernel.org Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=38442 Reported-and-tested-by: Dominik Köppl <dominik@devwork.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-04drm/radeon: clarify and extend wb setup on APUs and NI+ asicsAlex Deucher
Use family rather than DCE check for clarity, also always use wb on APUs, there will never be AGP variants. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-03Merge branch 'drm-intel-fixes' of ↵Dave Airlie
git://people.freedesktop.org/~danvet/drm-intel into drm-fixes * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: enable dip before writing data on gen4 fixing dmi match for hp t5745 and hp st5747 thin client drm/i915: Only enable IPS polling for gen5 drm/i915: Do not read non-existent DPLL registers on PCH hardware
2012-05-03drm/i915: enable dip before writing data on gen4Paulo Zanoni
While testing with the intel_infoframes tool on gen4, I see that when video DIP is disabled, what we write to the DATA memory is not exactly what we read back later. This regression has been introduce in commit 64a8fc0145a1d0fdc25fc9367c2e6c621955fb3b Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Thu Sep 22 11:16:00 2011 +0530 drm/i915: fix ILK+ infoframe support That commit was setting VIDEO_DIP_CTL to 0 when initializing, which caused the problem. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43947 Cc: stable@kernel.org Tested-by: Yang Guang <guang.a.yang@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com> [danvet: Pimped commit message by using the usual commit citation layout.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-03nouveau: initialise has_optimus variable.Dave Airlie
We should initialise this to 0 really to avoid getting false positives. Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-02fixing dmi match for hp t5745 and hp st5747 thin clientMarc Gariepy
Match the correct information which is DMI_PRODUCT_NAME instead of DMI_BOARD_NAME See dmidecode information on launchpad for both thin client: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/911920 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/911916 Signed-off-by: Marc Gariepy <mgariepy@ubuntu.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-02drm/i915: Only enable IPS polling for gen5Chris Wilson
On SandyBridge IPS was entirely implemented in hardware and not reliant on the driver monitoring power consumption and feeding back desired run states, so the hardware is able to adapt quicker and more flexibly. Which is a huge relief for us as we no longer have to carry empirically derived magic algorithms. Yet despite the advance in technology, the driver was still doing its IPS polling on all machines. Restrict it to the only supported hardware, Clarkdale/Arrandale. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-by: Andrey Rahmatullin <wrar@wrar.name> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49025 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-05-02drm/i915: Do not read non-existent DPLL registers on PCH hardwareChris Wilson
We only execute intel_decrease_pllclock for pre-PCH hardware, typically gen4 mobiles. However, in the variable declaration we did read from the non-PCH DPLL register, quite naughty and detected by SandyBridge. Reported-and-tested-by: Andrey Rahmatullin <wrar@wrar.name> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49025 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-30drm/nv10/gpio: fix thinko in mask for gpio lines 2-9Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-30nvc0/fb: shut up PMFB interrupt after the first occurrenceChristoph Bumiller
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-30drm/nouveau/hdmi: use correct hdmi regs for nvaa/nvacBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-30drm/nouveau/bios: fix regression on some nv4x boardBen Skeggs
We started using the connector table on nv4x a while back, and this VBIOS has bad connector indices which causes the wrong encoders to get paired with connectors. Add a quirk to fix this... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-28drm/i915: Set the Stencil Cache eviction policy to non-LRA mode.Kenneth Graunke
Clearing bit 5 of CACHE_MODE_0 is necessary to prevent GPU hangs in OpenGL programs such as Google MapsGL, Google Earth, and gzdoom when using separate stencil buffers. Without it, the GPU tries to use the LRA eviction policy, which isn't supported. This was supposed to be off by default, but seems to be on for many machines. This cannot be done in gen6_init_clock_gating with most of the other workaround bits; the render ring needs to exist. Otherwise, the register write gets dropped on the floor (one printk will show it changed, but a second printk immediately following shows the value reverts to the old one). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47535 Cc: stable@vger.kernel.org Cc: Rob Castle <futuredub@gmail.com> Cc: Eric Appleman <erappleman@gmail.com> Cc: aaron667@gmx.net Cc: Keith Packard <keithp@keithp.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-28drm/radeon/kms: need to set up ss on DP bridges as wellAlex Deucher
Makes Nutmeg DP to VGA bridges work for me. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=42490 Noticed by Jerome Glisse (after weeks of debugging). Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-27drm/radeon/kms: use frac fb div on APUsAlex Deucher
Seems to be more stable on certain monitors. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=48880 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-27drm/radeon: add a missing entry to encoder_namesIlija Hadzic
An entry for INTERNAL_VCE encoder was missing. Add it. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-27Merge branch 'drm-intel-fixes' of ↵Dave Airlie
git://people.freedesktop.org/~danvet/drm-intel into drm-fixes From Daniel Vetter - VGA load-detect fix. This bug seems to be as old as the load-detect code (2.6.30), but needs stupid userspace (upowerd trying to detect connectors on dpms-off outputs) to actually kill the machine. And obviously a machine without VGA-hotplug, otherwise we don't do load detect. - 2 interger overflow fixes for unpriviledged ioctls from Xi Wang. - Fix SDVO regression for low-res (pixelclock < 100MHz) digital outputs, introduce in 2.6.36. * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: handle input/output sdvo timings separately in mode_set drm/i915: fix integer overflow in i915_gem_do_execbuffer() drm/i915: fix integer overflow in i915_gem_execbuffer2() drm/i915: fixup load-detect on enabled, but not active pipe
2012-04-27Merge branch 'exynos-drm-fixes' of ↵Dave Airlie
git://git.infradead.org/users/kmpark/linux-2.6-samsung into drm-fixes From Inki Dae: this patch set fixes gem allocation and mapping issue between user space and physical memory region. * 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-2.6-samsung: drm/exynos: added missed vm area region mapping type. drm/exynos: fixed exynos_drm_gem_map_pages bug. drm/exynos: fixed duplicatd memory allocation bug.
2012-04-26drm/i915: handle input/output sdvo timings separately in mode_setDaniel Vetter
We seem to have a decent confusion between the output timings and the input timings of the sdvo encoder. If I understand the code correctly, we use the original mode unchanged for the output timings, safe for the lvds case. And we should use the adjusted mode for input timings. Clarify the situation by adding an explicit output_dtd to the sdvo mode_set function and streamline the code-flow by moving the input and output mode setting in the sdvo encode together. Furthermore testing showed that the sdvo input timing needs the unadjusted dotclock, the sdvo chip will automatically compute the required pixel multiplier to get a dotclock above 100 MHz. Fix this up when converting a drm mode to an sdvo dtd. This regression was introduced in commit c74696b9c890074c1e1ee3d7496fc71eb3680ced Author: Pavel Roskin <proski@gnu.org> Date: Thu Sep 2 14:46:34 2010 -0400 i915: revert some checks added by commit 32aad86f particularly the following hunk: diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 093e914..62d22ae 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c @@ -1122,11 +1123,9 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder, /* We have tried to get input timing in mode_fixup, and filled into adjusted_mode */ - if (intel_sdvo->is_tv || intel_sdvo->is_lvds) { - intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode); + intel_sdvo_get_dtd_from_mode(&input_dtd, adjusted_mode); + if (intel_sdvo->is_tv || intel_sdvo->is_lvds) input_dtd.part2.sdvo_flags = intel_sdvo->sdvo_flags; - } else - intel_sdvo_get_dtd_from_mode(&input_dtd, mode); /* If it's a TV, we already set the output timing in mode_fixup. * Otherwise, the output timing is equal to the input timing. Due to questions raised in review, below a more elaborate analysis of the bug at hand: Sdvo seems to have two timings, one is the output timing which will be sent over whatever is connected on the other side of the sdvo chip (panel, hdmi screen, tv), the other is the input timing which will be generated by the gmch pipe. It looks like sdvo is expected to scale between the two. To make things slightly more complicated, we have a bunch of special cases: - For lvds panel we always use a fixed output timing, namely intel_sdvo->sdvo_lvds_fixed_mode, hence that special case. - Sdvo has an interface to generate a preferred input timing for a given output timing. This is the confusing thing that I've tried to clear up with the follow-on patches. - A special requirement is that the input pixel clock needs to be between 100MHz and 200MHz (likely to keep it within the electromechanical design range of PCIe), 270MHz on later gen4+. Lower pixel clocks are doubled/quadrupled. The thing this patch tries to fix is that the pipe needs to be explicitly instructed to double/quadruple the pixels and needs the correspondingly higher pixel clock, whereas the sdvo adaptor seems to do that itself and needs the unadjusted pixel clock. For the sdvo encode side we already set the pixel mutliplier with a different command (0x21). This patch tries to fix this mess by: - Keeping the output mode timing in the unadjusted plain mode, safe for the lvds case. - Storing the input timing in the adjusted_mode with the adjusted pixel clock. This way we don't need to frob around with the core crtc mode set code. - Fixing up the pixelclock when constructing the sdvo dtd timing struct. This is why the first hunk of the patch is an integral part of the series. - Dropping the is_tv special case because input_dtd is equivalent to adjusted_mode after these changes. Follow-up patches clear this up further (by simply ripping out intel_sdvo->input_dtd because it's not needed). v2: Extend commit message with an in-depth bug analysis. Reported-and-Tested-by: Bernard Blackham <b-linuxgit@largestprime.net> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48157 Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: stable@kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-23drm/i915: fix integer overflow in i915_gem_do_execbuffer()Xi Wang
On 32-bit systems, a large args->num_cliprects from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access. This vulnerability was introduced in commit 432e58ed ("drm/i915: Avoid allocation for execbuffer object list"). Signed-off-by: Xi Wang <xi.wang@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-23drm/i915: fix integer overflow in i915_gem_execbuffer2()Xi Wang
On 32-bit systems, a large args->buffer_count from userspace via ioctl may overflow the allocation size, leading to out-of-bounds access. This vulnerability was introduced in commit 8408c282 ("drm/i915: First try a normal large kmalloc for the temporary exec buffers"). Signed-off-by: Xi Wang <xi.wang@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-23drm/exynos: added missed vm area region mapping type.Inki Dae
with this patch, if the memory region is physically non-continuous then VM_MIXEDMAP is set to vm->vm_flags otherwise VM_PFNMAP. we had missed this flag setting. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-04-23drm/exynos: fixed exynos_drm_gem_map_pages bug.Inki Dae
this patch fixes the problem that the physical memory region to be mapped to user space could be exceeded. if page fault address was placed at between buffer start and end then memory region to be mapped would be exceeded. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-04-23drm/exynos: fixed duplicatd memory allocation bug.Inki Dae
the gem was already allocated at gem allocation time but is allocated at page fault handler so this patch fixes the problem that gem was allocated one more time. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
2012-04-22drm/i915: fixup load-detect on enabled, but not active pipeDaniel Vetter
Somehow we have a fast-path that tries to avoid going through the load-detect code when the encode already has a crtc associated. But this fails horribly when the crtc is off. The load detect pipe itself manages this case well (and also does not forget to restore the dpms state), so just rip out this special case. The issue seems to go back all the way to the commit that originally introduced load-detection on the vga output: commit e4a5d54f924ea5ce2913d9d0687d034004816465 Author: Ma Ling <ling.ma@intel.com> Date: Tue May 26 11:31:00 2009 +0800 drm/i915: Add support for VGA load detection (pre-945). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43020 Reported-by: Jean Delvare <khali@linux-fr.org> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-21kill mm argument of vm_munmap()Al Viro
it's always current->mm Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-04-20VM: add "vm_mmap()" helper functionLinus Torvalds
This continues the theme started with vm_brk() and vm_munmap(): vm_mmap() does the same thing as do_mmap(), but additionally does the required VM locking. This uninlines (and rewrites it to be clearer) do_mmap(), which sadly duplicates it in mm/mmap.c and mm/nommu.c. But that way we don't have to export our internal do_mmap_pgoff() function. Some day we hopefully don't have to export do_mmap() either, if all modular users can become the simpler vm_mmap() instead. We're actually very close to that already, with the notable exception of the (broken) use in i810, and a couple of stragglers in binfmt_elf. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-20VM: add "vm_munmap()" helper functionLinus Torvalds
Like the vm_brk() function, this is the same as "do_munmap()", except it does the VM locking for the caller. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-19nouveau: Set special lane map for the right chipsetHenrik Rydberg
The refactoring of the nv50 logic, introduced in 8663bc7c, modified the test for the special lane map used on some Apple computers with Nvidia chipsets. The tested MBA3,1 would still boot, but resume from suspend stopped working. This patch restores the old test, which fixes the problem. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-19drm/radeon: fix load detect on rn50 with hardcoded EDIDs.Dave Airlie
When the force changes went in back in 3.3.0, we ended up returning disconnected in the !force case, and the connected in when forced, as it hit the hardcoded check. Fix it so all exits go via the hardcoded check and stop spurious modesets on platforms with hardcoded EDIDs. Reported-by: Evan McNabb (Red Hat) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-19drm: Releasing FBs before releasing GEM objects during drm_releasePrathyush
During DRM release, all the FBs and gem objects are released. If a gem object is being used as a FB and set to a crtc, it must not be freed before releasing the framebuffer first. If FBs are released first, the crtc using the FB is disabled first so now the GEM object can be freed safely. The CRTC will be enabled again when the driver restores fbdev mode. Signed-off-by: Prathyush K <prathyush.k@samsung.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-19drm/nouveau/pm: don't read/write beyond end of stack bufferJim Meyering
NUL-terminate after strncpy. If the parameter "profile" has length 16 or more, then strncpy leaves "string" with no NUL terminator, so the following search for '\n' may read beyond the end of that 16-byte buffer. If it finds a newline there, then it will also write beyond the end of that stack buffer. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-19drivers: gpu: drm: gma500: mdfld_dsi_output.h: Remove not unneeded include ↵Marcos Paulo de Souza
of version.h The output of "make versioncheck" points a incorrect include of version.h in the drivers/gpu/drm/gma500/mdfld_dsi_output.h: drivers/gpu/drm/gma500/mdfld_dsi_output.h: 32 linux/version.h not needed. If we take a look in the file, we can agree to remove it. Cc: David Airlie <airlied@linux.ie> Cc: <dri-devel@lists.freedesktop.org> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-19radeon: fix r600/agp when vram is after AGP (v3)Jerome Glisse
If AGP is placed in the middle, the size_af is off-by-one, it results in VRAM being placed at 0x7fffffff instead of 0x8000000. v2: fix the vram_start setup. v3: also fix r7xx & newer ASIC Reported-by: russiane39 on #radeon Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-19drm: fix page_flip error handlingJoonyoung Shim
Free event and restore event_space only when page_flip->flags has DRM_MODE_PAGE_FLIP_EVENT if page_flip() is failed. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-19Merge branch 'drm-intel-fixes' of ↵Dave Airlie
git://people.freedesktop.org/~danvet/drm-intel into drm-fixes * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: Do not set "Enable Panel Fitter" on SNB pageflips drm/i915: Hold mode_config lock whilst changing mode for lastclose() drm/i915: don't clobber the special upscaling lvds timings
2012-04-19drm/radeon/kms: fix the regression of DVI connector checkTakashi Iwai
The check of the encoder type in the commit [e00e8b5e: drm/radeon/kms: fix analog load detection on DVI-I connectors] is obviously wrong, and it's the culprit of the regression on my workstation with DVI-analog connection resulting in the blank output. Fixed the typo now. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: <stable@vger.kernel.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-19drm/usb: fix module license on drm/usb layer.Dave Airlie
Allows this module to load correctly with certain debugging options on. Reported on irc by scientes Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-18drm/i915: Do not set "Enable Panel Fitter" on SNB pageflipsChris Wilson
Not only do the pageflip work without it at non-native modes (i.e. with the panel fitter enabled), it also causes normal (non-pageflipped) modesets to fail. Reported-by: Adam Jackson <ajax@redhat.com> Tested-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Wanted-by-for-fixes: Dave Airlie <airlied@gmail.com> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-16drm/i915: Hold mode_config lock whilst changing mode for lastclose()Chris Wilson
Upon lastclose(), we switch back to the fbcon configuration. This requires taking the mode_config lock in order to serialise the change with output probing elsewhere. Reported-by: Oleksij Rempel <bug-track@fisher-privat.net> References: https://bugs.freedesktop.org/show_bug.cgi?id=48652 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-16drm/radeon/si: add missing radeon_bo_unreserve in si_rlc_init() v2Alex Deucher
Forget to unreserve after pinning. This can lead to problems in soft reset and resume. v2: rework patch as per Michel's suggestion. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-16drm/radeon: disable MSI on RV515Dave Airlie
My rv515 card is very flaky with msi enabled. Every so often it loses a rearm and never comes back, manually banging the rearm brings it back. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-16drm/i915: don't clobber the special upscaling lvds timingsDaniel Vetter
This regression has been introduced in commit ca9bfa7eed20ea34e862804e62aae10eb159edbb Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Sat Jan 28 14:49:20 2012 +0100 drm/i915: fixup interlaced vertical timings confusion, part 1 Unfortunately that commit failed to take into account that the lvds code does some special adjustements to the crtc timings for upscaling an centering. Fix this by explicitly computing crtc timings in the lvds mode fixup function and setting a special flag in mode->private_flags if the crtc timings have been adjusted. v2: Add a comment to explain the new mode driver private flag, suggested by Eugeni Dodonov. v3: Kill the confusing and now redundant set_crtcinfo call in intel_fixed_panel_mode, noticed by Chris Wilson. Reported-and-Tested-by: Hans de Bruin <jmdebruin@xmsnet.nl> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43071 Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-12Merge branch 'exynos-drm-fixes' of ↵Dave Airlie
git://git.infradead.org/users/kmpark/linux-samsung into drm-intel-fixes * 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung: drm/exynos: fixed exynos broken ioctl drm/exynos: fix to pointer manager member of struct exynos_drm_subdrv drm/exynos: fix struct for operation callback functions to driver name drm/exynos: use define instead of default_win member in struct mixer_context drm/exynos: rename s/HDMI_OVERLAY_NUMBER/MIXER_WIN_NR drm/exynos: remove unused codes in hdmi and mixer drm/exynos: remove unnecessary type conversion of hdmi and mixer drm/exynos: add format list of plane drm/exynos: fixed duplicated page allocation bug. drm/exynos: fixed page align and code clean.
2012-04-12Merge branch 'drm-intel-fixes' of ↵Dave Airlie
git://people.freedesktop.org/~danvet/drm-intel into drm-intel-fixes Daniel Vetter writes: 3 regression fixes: - disable gmbus again, too broken for 3.4, we'll try again for 3.5 - dp bandwidth computation fix, we've lost the 6bpc dithering flag sometimes, this is a 3.3 regression (maybe even earlier for some configurations). - fix resume regression caused by the gen2/3 fencing fix merged into -rc2. And a few other fixes: - gpu hang fix for i845 (Chris) - sprite fix (Armin Reese) - crtc disable vs. scanlinewait race fix (Chris) - rc6 module option read-only, it confused testers (Jesse) - fbc related blitter death hw workaround, note that we disable fbc on snb by default anyway. With these fixes we have one 3.4 regression outstanding: One of the cleanup patches for the interlaced support managed to confuse the lvds panel fitter when upscaling. The root-cause is still unclear, but test patches are awaiting feedback from the reporter. * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: clear fencing tracking state when retiring requests drm/i915: make rc6 module parameter read-only drm/i915: implement ColorBlt w/a drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g Revert "drm/i915: reenable gmbus on gen3+ again" drm/i915: properly compute dp dithering for user-created modes drm/i915: Finish any pending operations on the framebuffer before disabling drm/i915: Removed IVB forced enable of sprite dest key.
2012-04-12drm/i915: clear fencing tracking state when retiring requestsDaniel Vetter
This fixes a resume regression introduced in commit 7dd4906586274f3945f2aeaaa5a33b451c3b4bba Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Mar 21 10:48:18 2012 +0000 drm/i915: Mark untiled BLT commands as fenced on gen2/3 which fixed fencing tracking for untiled blt commands. A side effect of that patch was that now also untiled objects have a non-zero obj->last_fenced_seqno to track when a fence can be set up after a pipelined tiling change. Unfortunately this was only cleared by the fence setup and teardown code, resulting in tons of untiled but inactive objects with non-zero last_fenced_seqno. Now after resume we completely reset the seqno tracking, both on the driver side (by setting dev_priv->next_seqno = 1) and on the hw side (by allocating a new hws page, which contains the seqnos). Hilarity and indefinite waits ensued from the stale seqnos in obj->last_fenced_seqno from before the suspend. The fix is to properly clear the fencing tracking state like we already do for the normal gpu rendering while moving objects off the active list. Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Jiri Slaby <jslaby@suse.cz> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-04-12drm/exynos: fix to pointer manager member of struct exynos_drm_subdrvJoonyoung Shim
The struct exynos_drm_manager has to exist for exynos drm sub driver using encoder and connector. If it isn't NULL to member of struct exynos_drm_subdrv, will create encoder and connector else will not. And the is_local member also doesn't need. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2012-04-12drm/exynos: fix struct for operation callback functions to driver nameJoonyoung Shim
The mixer driver and hdmi driver have each operation callback functions and they is registered to hdmi common driver. Their struct names in hdmi common driver include display, manager and overlay. It confuses to appear whose operation and two driver cannot register same operation callback functions at the same time. Use their struct names to driver name. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>