aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2012-11-14UBUNTU: SAUCE: drm -- stop early access to drm devicesAndy Whitcroft
When a drm driver is initialised we first allocate and initialise the drm minor numbers including creating the sysfs files, then we trigger the driver load method. The act of creating the sysfs files triggers the uevent. This means udev may start programs which open /dev/dri/card0 and other interfaces, this can occur before the load method has even started and thus before the driver has fully initialised its data structures. In the case of plymouthd this leads to it opening and closing (in disgust) the interface, which in turn leads to a kernel panic as the mutexes are yet to be initialised. This patch delays the linking up of the drm devices minor numbers until the driver is fully initialised. As it is possible for consumers of these interfaces to reach them before they are fully initialised we arrange for opens of these devices to return EAGAIN until the device is fully initialised. Signed-off-by: Andy Whitcroft <apw@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
2012-11-09drm/vmwgfx: Fix a case where the code would BUG when trying to pin GMR memoryThomas Hellstrom
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Dmitry Torokhov <dtor@vmware.com> Cc: stable@vger.kernel.org Cc: linux-graphics-maintainer@vmware.com Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09drm/vmwgfx: Fix hibernation device resetThomas Hellstrom
The device would not reset properly when resuming from hibernation. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Dmitry Torokhov <dtor@vmware.com> Cc: stable@vger.kernel.org Cc: linux-graphics-maintainer@vmware.com Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-11-09Merge branch 'drm-nouveau-fixes' of ↵Dave Airlie
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes just some misc regression fixes and typo fixes. * 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau: fix acpi edid retrieval drm/nvc0/disp: fix regression in vblank semaphore release drm/nv40/mpeg: fix context handling drm/nv40/graph: fix typo in type names drm/nv41/vm: fix typo in type name
2012-11-09drm/nouveau: fix acpi edid retrievalMaarten Lankhorst
Commit c0077061e7ea accidentally inverted the logic for nouveau_acpi_edid, causing it to only show a connector as connected when the edid could not be retrieved with acpi. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-09drm/nvc0/disp: fix regression in vblank semaphore releaseKelly Doran
Signed-off-by: Kelly Doran <kel.p.doran@gmail.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-09drm/nv40/mpeg: fix context handlingMarcin Slusarz
It slipped in thanks to typeless API. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-09drm/nv40/graph: fix typo in type namesMarcin Slusarz
nv04_graph_priv / nv04_graph_chan are not defined in this context... Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-09drm/nv41/vm: fix typo in type nameMarcin Slusarz
It's a miracle it compiles at all - nv04_vm_priv does not exist anywhere in the tree. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-08drm/radeon/si: add some missing regs to the VM reg checkerAlex Deucher
This register is needed for streamout to work properly. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-11-08drm/radeon/cayman: add some missing regs to the VM reg checkerAlex Deucher
These regs were being wronly rejected leading to rendering issues. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=56876 Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2012-11-07drm/radeon/dce3: switch back to old pll allocation order for discreteAlex Deucher
The order shouldn't matter, but this seems to cause regressions for certain specific cases. This should fix it for now. We probably need to investigate a proper fix in the next development cycle. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: Andy Furniss <andyqos@ukfsn.org>
2012-11-07drm/radeon: fix typo in evergreen_mc_resume()Alex Deucher
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>
2012-11-07drm: set dev_mapping before calling drm_open_helperIlija Hadzic
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>
2012-11-07drm: restore open_count if drm_setup failsIlija Hadzic
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>
2012-11-02drm/udl: fix stride issues scanning out stride != width*bppDave Airlie
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>
2012-11-02Merge branch 'exynos-drm-fixes' of ↵Dave Airlie
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
2012-11-02Merge branch 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie
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.
2012-11-02Merge branch 'drm-intel-fixes' of ↵Dave Airlie
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
2012-11-01drm/radeon: add load detection support for ext DAC on R200 (v2)Alex Deucher
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>
2012-11-01DRM/radeon: For single CRTC GPUs move handling of CRTC_CRT_ON to crtc_dpms().Egbert Eich
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>
2012-11-01DRM/Radeon: Fix TV DAC Load Detection for single CRTC chips.Egbert Eich
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>
2012-11-01DRM/Radeon: Clean up code in TV DAC load detection.Egbert Eich
Signed-off-by: Egbert Eich <eich@suse.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-11-01drm/radeon: fix ATPX function documentationIgor Murzov
Fix a copy&pasted documentation. Signed-off-by: Igor Murzov <e-mail@date.by> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-11-01drivers/gpu/drm/radeon/evergreen_cs.c: Remove unnecessary semicolonPeter Senna Tschudin
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>
2012-11-01DRM/Radeon: On DVI-I use Load Detection when EDID is bogus.Egbert Eich
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>
2012-11-01DRM/Radeon: Fix primary DAC Load Detection for RV100 chips.Egbert Eich
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>
2012-11-01DRM/Radeon: Fix Load Detection on legacy primary DAC.Egbert Eich
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
2012-10-31drm: exynos: removed warning due to missing typecast for mixer driver dataRahul Sharma
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>
2012-10-31drm/exynos: add support for ARCH_MULTIPLATFORMRob Clark
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>
2012-10-31drm/exynos: fix display on issueInki Dae
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>
2012-10-31drm/nouveau: headless mode by default if pci class != vga displayBen Skeggs
This is to prevent nouveau from taking over the console on headless boards such as Tesla. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-31drm/nouveau: resurrect headless mode since reworkBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-31drm/nv50/fb: prevent oops on chipsets without compression tagsBen Skeggs
Unconditionally create the tagram mm, even if there's zero tags. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-31drm/nouveau: allow creation of zero-sized mmBen Skeggs
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>
2012-10-31drm/nouveau/i2c: fix typo when checking nvio i2c port validityBen Skeggs
Reported-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Tested-by: Mathieu Chouquet-Stringer <mathieu@csetco.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-31drm/nouveau: silence modesetting spam on pre-gf8 chipsetsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-26drm/i915: Only kick out vesafb if we takeover the fbcon with KMSChris Wilson
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>
2012-10-26drm/i915: be less verbose about inability to provide vendor backlightJani Nikula
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>
2012-10-24drm/radeon: fix ATPX regression in acpi reworkAlex Deucher
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>
2012-10-24drm/radeon: fix ATPX function documentationAlex Deucher
The ATPX code no longer handles ATRM. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2012-10-24drm/radeon: move the retry to gem_object_createChristian König
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>
2012-10-24drm/radeon: move size limits to gem_object_create.Christian König
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>
2012-10-24drm/radeon: use vzalloc for gart pagesChristian König
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>
2012-10-24drm/radeon: fix and simplify pot argument checks v3Christian König
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>
2012-10-24drm/i915: clear the entire sdvo infoframe bufferDaniel Vetter
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>
2012-10-23drm/radeon: fix header size estimation in VM codeChristian König
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>
2012-10-23drm/radeon: remove set_page check from VM codeChristian König
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>
2012-10-23drm/radeon: fix si_set_page v2Christian König
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>
2012-10-23drm/radeon: fix cayman_vm_set_page v2Christian König
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>