summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon: fix typo in evergreen_mc_resume()Alex Deucher2012-11-071-1/+1
| | | | | | | | | | | | Add missing index that may have led us to enabling more crtcs than necessary. May also fix: https://bugs.freedesktop.org/show_bug.cgi?id=56139 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>
* drm: set dev_mapping before calling drm_open_helperIlija Hadzic2012-11-071-17/+30
| | | | | | | | | | | | | | | Some drivers (specifically vmwgfx) look at dev_mapping in their open hook, so we have to set dev->dev_mapping earlier in the process. Reference: http://lists.freedesktop.org/archives/dri-devel/2012-October/029420.html Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Reported-by: Thomas Hellstrom <thellstrom@vmware.com> Cc: stable@vger.kernel.org Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: restore open_count if drm_setup failsIlija Hadzic2012-11-071-1/+4
| | | | | | | | | | | If drm_setup (called at first open) fails, the whole open call has failed, so we should not keep the open_count incremented. Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com> Cc: stable@vger.kernel.org Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/udl: fix stride issues scanning out stride != width*bppDave Airlie2012-11-023-8/+11
| | | | | | | | | | | | | When buffer sharing with the i915 and using a 1680x1050 monitor, the i915 gives is a 6912 buffer for the 6720 width, the code doesn't render this properly as it uses one value to set the base address for reading from the vmap and for where to start on the device. This fixes it by calculating the values correctly for the device and for the pixmap. No idea how I haven't seen this before now. Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'exynos-drm-fixes' of ↵Dave Airlie2012-11-024-18/+20
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Inki writes: "As I posted before, we have added a new git repository for Exynos drm to MAINTAINERS file so change it to new one like below, from git://git.infradead.org/users/kmpark/linux-samsung to git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos And this pull request includes the following: - fix display on issue when user requested dpms mode changing. - add git repository for Exynos drm to MAINTAINERS file. - add support for ARCH_MULTIPLATFORM. - and code clean." * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm: exynos: removed warning due to missing typecast for mixer driver data drm/exynos: add support for ARCH_MULTIPLATFORM MAINTAINERS: Add git repository for Exynos DRM drm/exynos: fix display on issue
| * drm: exynos: removed warning due to missing typecast for mixer driver dataRahul Sharma2012-10-311-1/+1
| | | | | | | | | | | | | | | | | | Removing the warning by adding proper type casting where local pointer variable of type mixer driver data is assigned with void pointer. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: add support for ARCH_MULTIPLATFORMRob Clark2012-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | Exynos does not seem to have any dependency on anything from platform headers so just needs Kconfig updated to build in ARCH_MULTIPLATFORM builds. Signed-off-by: Rob Clark <rob@ti.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * drm/exynos: fix display on issueInki Dae2012-10-312-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When crtc_funcs->dpms callback is called, exynos_crtc->dpms and exynos_encoder->dpms are changed to new mode. But if user requests dpms mode operation, OFF -> ON, when crtc's dpms callback is called, exynos_encoder->dpms is also changed to ON. This makes encoder's dpms callback call be ignored so display power couldn't become on again. This patch removes exynos_encoder->dpms changing and adds 'updated' variable to exynos_drm_encoder structure to avoid duplicated overlay updating. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* | Merge branch 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie2012-11-025-40/+184
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into drm-fixes Alex writes: "This request is mostly load detection fixes from Egbert and me." * 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: add load detection support for ext DAC on R200 (v2) DRM/radeon: For single CRTC GPUs move handling of CRTC_CRT_ON to crtc_dpms(). DRM/Radeon: Fix TV DAC Load Detection for single CRTC chips. DRM/Radeon: Clean up code in TV DAC load detection. drm/radeon: fix ATPX function documentation drivers/gpu/drm/radeon/evergreen_cs.c: Remove unnecessary semicolon DRM/Radeon: On DVI-I use Load Detection when EDID is bogus. DRM/Radeon: Fix primary DAC Load Detection for RV100 chips. DRM/Radeon: Fix Load Detection on legacy primary DAC.
| * | drm/radeon: add load detection support for ext DAC on R200 (v2)Alex Deucher2012-11-011-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The R200 asics use an external DAC for the secondary DAC. The current KMS code tries to use code for the integrated TV DAC for R200 which leads to unpredictable results since R200 does not have an integrated TV DAC. This patch ports the external DAC load detection support from the UMS driver to KMS. v2: fix typo in loop break logic Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Egbert Eich <eich@suse.de>
| * | DRM/radeon: For single CRTC GPUs move handling of CRTC_CRT_ON to crtc_dpms().Egbert Eich2012-11-012-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On all dual CRTC GPUs the CRTC_CRT_ON in the RADEON_CRTC_EXT_CNTL register controls the CRTC of the primary DAC. Therefore it is set in the DAC DMPS function. This is different for GPU's with a single CRTC but a primary and a TV DAC: here it controls the single CRTC no matter where it is routed. Therefore we set it here. This avoids an elaborate on/off state tracking since both primary_dac_dpms() and tv_dac_dpms() functions would have to touch this bit. On single CRTC GPUs with just one DAC it's irrelevant where this bit is handled. agd5f: fix warning Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | DRM/Radeon: Fix TV DAC Load Detection for single CRTC chips.Egbert Eich2012-11-011-24/+38
| | | | | | | | | | | | | | | | | | | | | | | | The RN50 has a TV DAC but only a single CRTC. For load detection this DAC is controlled by the primary CRTC. Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | DRM/Radeon: Clean up code in TV DAC load detection.Egbert Eich2012-11-011-8/+10
| | | | | | | | | | | | | | | Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drm/radeon: fix ATPX function documentationIgor Murzov2012-11-011-2/+2
| | | | | | | | | | | | | | | | | | | | | Fix a copy&pasted documentation. Signed-off-by: Igor Murzov <e-mail@date.by> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | drivers/gpu/drm/radeon/evergreen_cs.c: Remove unnecessary semicolonPeter Senna Tschudin2012-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p << r1.p; p1 << r1.p1; @@ if p[0].line != p1[0].line_end: cocci.include_match(False) @@ position r1.p; @@ -;@p // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | DRM/Radeon: On DVI-I use Load Detection when EDID is bogus.Egbert Eich2012-11-011-7/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Radeon driver uses the analog/digital flag to determine if the DAC or the TMDS encoder should be enabled on a DVI-I connector. If the EDID is bogus this flag is no longer reliable. This fix adds a fallback to DAC load detection to determine if anything is connected to the DAC. If not and a (bogus) EDID is found it assumes a digital display is connected. This works around problems with some crappy IPMI devices using Radeon ES1000. Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | DRM/Radeon: Fix primary DAC Load Detection for RV100 chips.Egbert Eich2012-11-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Radeon 7500 ATI recommends a DAC_FORCE value of 0x1ac. This value works better on ES1000 (RV100) chips, too, as it doesn't produce any false positives on any cards I have tested. Therefore let's assume that this value is good for all RV100 and RV200 chipset generations. Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
| * | DRM/Radeon: Fix Load Detection on legacy primary DAC.Egbert Eich2012-11-011-0/+1
| |/ | | | | | | | | | | | | | | An uninitialized variable led to broken load detection. Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | Merge branch 'drm-intel-fixes' of ↵Dave Airlie2012-11-026-26/+59
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~danvet/drm-intel into drm-fixes Daniel Vetter writes" Nothing big at all for -fixes, just small stuff: - Two patches to fix bugs on i830M - ums regression fixer due to kicking firmeware fbs (Chris) - tune down a too loud warning (Jani) - be more careful with sdvo infoframes, which fixes a long-standing sdvo-hdmi regression" * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: Only kick out vesafb if we takeover the fbcon with KMS drm/i915: be less verbose about inability to provide vendor backlight drm/i915: clear the entire sdvo infoframe buffer drm/i915: VGA needs to be on pipe A on i830M drm/i915: fix overlay on i830M
| * drm/i915: Only kick out vesafb if we takeover the fbcon with KMSChris Wilson2012-10-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we may remove the only console for a nomodeset system. We became more aggressive in our kicking with commit e188719a2891f01b3100dca4ae3a055fb5a7ab52 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Jun 12 11:28:17 2012 +0200 drm/i915: kick any firmware framebuffers before claiming the gtt Reported-and-tested-by: monnier@iro.umontreal.ca Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54615 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@vger.kernel.org # v3.6 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm/i915: be less verbose about inability to provide vendor backlightJani Nikula2012-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 28dcc2d60cb570d9f549c329b2f51400553412a1 Author: Jani Nikula <jani.nikula@intel.com> Date: Mon Sep 3 16:25:12 2012 +0300 drm/i915: do not expose a dysfunctional backlight interface to userspace prevents backlight interface creation if the BIOS has not set the backlight PWM CTL registers that contain the max PWM value. It's apparently normal on those machines, so demote the message about it to debug level. Reported-by: Orion Poplawski <orion@cora.nwra.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56330 Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm/i915: clear the entire sdvo infoframe bufferDaniel Vetter2012-10-242-20/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like in the case of native hdmi, which is fixed already in commit adf00b26d18e1b3570451296e03bcb20e4798cdd Author: Paulo Zanoni <paulo.r.zanoni@intel.com> Date: Tue Sep 25 13:23:34 2012 -0300 drm/i915: make sure we write all the DIP data bytes we need to clear the entire sdvo buffer to avoid upsetting the display. Since infoframe buffer writing is now a bit more elaborate, extract it into it's own function. This will be useful if we ever get around to properly update the ELD for sdvo. Also #define proper names for the two buffer indexes with fixed usage. v2: Cite the right commit above, spotted by Paulo Zanoni. v3: I'm too stupid to paste the right commit. v4: Ben Hutchings noticed that I've failed to handle an underflow in my loop logic, breaking it for i >= length + 8. Since I've just lost C programmer license, use his solution. Also, make the frustrated 0-base buffer size a notch more clear. Reported-and-tested-by: Jürg Billeter <j@bitron.ch> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=25732 Cc: stable@vger.kernel.org Cc: Paulo Zanoni <przanoni@gmail.com> Cc: Ben Hutchings <ben@decadent.org.uk> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm/i915: VGA needs to be on pipe A on i830MDaniel Vetter2012-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bit doesn't stick, and the output is always cloned from pipe A, even when it's supposed to scan out from pipe B. Shuts up annoying warnings from the modeset-rework, too. I've noticed that with this patch we know get and unknown connection state since the code can't find a suitable pipe for load detection. But that beats the previous state of affairs, where it tried to use pipe B, actually used pipe A and concluded that something is connected (although it's the LVDS on pipe A and nothing on the VGA connector on pipe B). I've tried to make load detect work by remapping the pipe->planes stuff, so that crtc 0 will use pipe B and hence we still have something left for load-detect on pipe A. But alas, that upset the hw a bit. So there's still some things to figure out, but this here will at least paper over some of the problems. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51265 Acked-by: Chris Wilson <chris@chris-wilson.co.uk> [danvet: extend the commit message a bit with recent observations.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
| * drm/i915: fix overlay on i830MDaniel Vetter2012-10-231-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The overlay on the i830M has a peculiar failure mode: It works the first time around after boot-up, but consistenly hangs the second time it's used. Chris Wilson has dug out a nice errata: "1.5.12 Clock Gating Disable for Display Register Address Offset: 06200h–06203h "Bit 3 Ovrunit Clock Gating Disable. 0 = Clock gating controlled by unit enabling logic 1 = Disable clock gating function DevALM Errata ALM049: Overlay Clock Gating Must be Disabled: Overlay & L2 Cache clock gating must be disabled in order to prevent device hangs when turning off overlay.SW must turn off Ovrunit clock gating (6200h) and L2 Cache clock gating (C8h)." Now I've nowhere found that 0xc8 register and hence couldn't apply the l2 cache workaround. But I've remembered that part of the magic that the OVERLAY_ON/OFF commands are supposed to do is to rearrange cache allocations so that the overlay scaler has some scratch space. And while pondering how that could explain the hang the 2nd time we enable the overlay, I've remembered that the old ums overlay code did _not_ issue the OVERLAY_OFF cmd. And indeed, disabling the OFF cmd results in the overlay working flawlessly, so I guess we can workaround the lack of the above workaround by simply never disabling the overlay engine once it's enabled. Note that we have the first part of the above w/a already implemented in i830_init_clock_gating - leave that as-is to avoid surprises. v2: Add a comment in the code. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47827 Cc: stable@vger.kernel.org Tested-by: Rhys <rhyspuk@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | drm/nouveau: headless mode by default if pci class != vga displayBen Skeggs2012-10-312-3/+3
| | | | | | | | | | | | | | This is to prevent nouveau from taking over the console on headless boards such as Tesla. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: resurrect headless mode since reworkBen Skeggs2012-10-314-35/+51
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50/fb: prevent oops on chipsets without compression tagsBen Skeggs2012-10-311-6/+4Star
| | | | | | | | | | | | Unconditionally create the tagram mm, even if there's zero tags. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: allow creation of zero-sized mmBen Skeggs2012-10-312-4/+6
| | | | | | | | | | | | | | | | Useful for places where a given chipset may or may not have a given resource, and we want to avoid having to spray checks for the mm's existance around everywhere. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/i2c: fix typo when checking nvio i2c port validityBen Skeggs2012-10-311-1/+1
| | | | | | | | | | | | Reported-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Tested-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: silence modesetting spam on pre-gf8 chipsetsBen Skeggs2012-10-313-20/+19Star
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/radeon: fix ATPX regression in acpi reworkAlex Deucher2012-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | Copy and paste typo in the apci rework. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=49351 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com>
* | drm/radeon: fix ATPX function documentationAlex Deucher2012-10-241-2/+2
| | | | | | | | | | | | The ATPX code no longer handles ATRM. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: move the retry to gem_object_createChristian König2012-10-242-11/+7Star
| | | | | | | | | | | | | | | | When internal users want VRAM we shouldn't return GART memory instead. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: move size limits to gem_object_create.Christian König2012-10-242-9/+10
| | | | | | | | | | | | | | | | Driver internal users shouldn't be limited in their allocation size. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: use vzalloc for gart pagesChristian König2012-10-241-6/+5Star
| | | | | | | | | | | | | | | | | | When allocating more than 2GB of GART the array of pages gets to big for kzalloc, use vzalloc instead. Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: fix and simplify pot argument checks v3Christian König2012-10-241-36/+24Star
| | | | | | | | | | | | | | | | | | | | | | | | GART and VRAM size limits need to be a power of two. Fix values greater than 1GB and simplify those checks a bit. v2: also fix radeon_vram_limit usage, and simplify test even more. v3: agd5f: fix spelling as noticed by Klaus Schnass Signed-off-by: Christian König <deathsimple@vodafone.de> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: fix header size estimation in VM codeChristian König2012-10-231-3/+3
| | | | | | | | | | | | | | Only NI uses 3dw headers, SI uses 4dw headers. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: remove set_page check from VM codeChristian König2012-10-231-2/+1Star
| | | | | | | | | | | | | | It's better to handle this in the chipset specific code. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: fix si_set_page v2Christian König2012-10-231-19/+24
| | | | | | | | | | | | | | | | | | Handle requests that won't fit into a single packet. v2: pe needs to increase as well. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: fix cayman_vm_set_page v2Christian König2012-10-231-18/+23
| | | | | | | | | | | | | | | | | | Handle requests that won't fit into a single packet. v2: pe needs to increase as well. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: fix PFP sync in vm_flushChristian König2012-10-233-0/+9
| | | | | | | | | | | | | | | | Otherwise the next IB might start reading commands with the page table still invalid. Signed-off-by: Christian König <deathsimple@vodafone.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: add error output if VM CS fails on caymanAlex Deucher2012-10-231-0/+1
| | | | | | | | | | | | | | So we know why the CS was rejected. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
* | drm/radeon: give each backlight a unique idAlex Deucher2012-10-232-2/+8
| | | | | | | | | | | | | | | | | | In cases where we have multiple radeons with backlight controls. Should fix: https://bugzilla.kernel.org/show_bug.cgi?id=48941 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* | drm/radeon: fix sparse warningAlex Deucher2012-10-231-1/+1
|/ | | | | Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
* drm/ttm: Fix a theoretical race in ttm_bo_cleanup_refs()Thomas Hellstrom2012-10-231-8/+12
| | | | | | | | | | | | | | | | | | In theory, that function could release the lru lock between checking for bo on ddestroy list and a successful reserve if the bo was already reserved, and the function was called with waiting reserves allowed. However, all current reservers of a bo on the ddestroy list would atomically take the bo off the list after a successful reserve so this race should not have been hit, so no need to backport for stable. This patch also fixes a case found by Maarten Lankhorst where ttm_mem_evict_first called with no_wait_gpu would incorrectly spin waiting for bo idle if trying to evict a busy buffer that also sits on the ddestroy list. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/ttm: Fix a theoretical raceThomas Hellstrom2012-10-231-2/+2
| | | | | | | | | | | The ttm_mem_evict_first function could theoretically drop the lru lock without retrying if a reservation from off the LRU list ended up waiting. However, since currently there are no users that could cause a wait in that situation so this is not suitable for stable Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: platform: Don't initialize driver-private dataThierry Reding2012-10-232-8/+5Star
| | | | | | | | | Platform device drivers usually use the driver-private data for their own purposes. Having it overwritten by drm_platform_init() is confusing and error-prone. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/debugfs: remove redundant info from gem_namesMarcin Slusarz2012-10-231-2/+0Star
| | | | | | | | | | It's a relic of "drm: Convert proc files to seq_file and introduce debugfs", which wrongly converted DRM_INFO + sprintf to 2 seq_printfs. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Ben Gamari <bgamari@gmail.com> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: fb: cma: Fail gracefully on allocation failureThierry Reding2012-10-231-1/+1
| | | | | | | | | | | The drm_gem_cma_create() function never returns NULL but rather an error encoded in the return value using the ERR_PTR() macro. Callers therefore need to check for errors using the IS_ERR() macro. This change allows drivers to handle contiguous DMA allocation failures gracefully. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: fb: cma: Fix typo in debug messageThierry Reding2012-10-231-1/+1
| | | | | | | | The debug message showing the resolution of a framebuffer to be allocated is missing a closing parenthesis. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Dave Airlie <airlied@redhat.com>