summaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2014-01-10HACK: Modify display A and B latency allowanceHEADmasterThierry Reding1-0/+30
This allows the HDMI output on Cardhu to work properly. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/tegra: Obtain head number from DTThierry Reding1-5/+18
The head number of a given display controller is fixed in hardware and required to program outputs appropriately. Relying on the driver probe order to determine this number will not work, since that could yield a situation where the second head was probed first and would be assigned head number 0 instead of 1. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/tegra: Fix possible CRTC mask for RGB outputsThierry Reding1-1/+4
The mask of possible CRTCs that an output (DRM encoder) can be attached to is relative to the position within the DRM device's list of CRTCs. Deferred probing can cause this to not match the pipe number associated with a CRTC. Use the newly introduced drm_helper_crtc_possible_mask() to compute the mask by looking up the proper index of the given CRTC in the list. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm: provide a helper for the encoder possible_crtcs maskRussell King1-13/+26
The encoder possible_crtcs mask identifies which CRTCs can be bound to a particular encoder. Each bit from bit 0 defines an index in the list of CRTCs held in the DRM mode_config crtc_list. Rather than having drivers trying to track the position of their CRTCs in the list, expose the code which already exists for calculating the appropriate mask bit for a CRTC. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/tegra: Statically assign pipe numberThierry Reding1-2/+5
The driver previously relied on the probe order to assign a pipe number to each head. With the introduction of panel support it is now possible for the display controller driver to defer probing and therefore it can happen that the heads are assigned the wrong pipe number, which causes breakage later on because the wrong values end up being programmed into registers of the various outputs. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10WIP: drm/tegra: Add hardware cursor supportThierry Reding2-3/+81
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10WIP: drm/tegra: Add Tegra124 LVDS supportThierry Reding2-0/+6
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10HACK: drm/tegra: Add gk20a supportThierry Reding2-0/+249
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10WIP: drm/tegra: Add Tegra124 HDMI supportThierry Reding2-0/+89
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10WIP: drm/tegra: Implement DSI transfersThierry Reding1-0/+147
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10WIP: gpu: host1x: Replace a variable length arrayThierry Reding1-4/+10
Explicitly allocate the array with the correct length instead of using a variable length array. The variable length array is probably safe in this case, but sparse complains about it. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/tegra: Implement brightness propertyThierry Reding2-2/+59
When attached to a panel that supports the brightness operations, create a connector property that allows the brightness to be manipulated using the KMS API. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/panel: simple: Implement brightness interfaceThierry Reding1-0/+44
Provide implementations to control the associated backlight device. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/tegra: Add eDP supportThierry Reding9-2/+2087
Add support for eDP functionality found on Tegra124 and later SoCs. Only fast link training is currently supported. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/dp: Allow registering AUX channels as I2C bussesThierry Reding1-0/+183
Implements an I2C-over-AUX I2C adapter on top of the generic drm_dp_aux infrastructure. It extracts the retry logic from existing drivers, which should help in porting those drivers to this new helper. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/dp: Add DisplayPort link helpersThierry Reding1-0/+77
Add a helper to probe a DP link (reading out the maximum rate, link count and capabilities) as well as configuring it accordingly. Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v3: - remove duplicate kerneldoc
2014-01-10drm/dp: Add drm_dp_dpcd_read_link_status()Thierry Reding1-0/+16
The function reads the link status (6 bytes starting at offset 0x202) from the DPCD so that it can be conveniently passed to other DPCD helpers. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/dp: Add AUX channel infrastructureThierry Reding1-0/+110
This is a superset of the current i2c_dp_aux bus functionality and can be used to transfer native AUX in addition to I2C-over-AUX messages. Helpers are provided to read and write the DPCD, either blockwise or byte-wise. Many of the existing helpers for DisplayPort take a copy of a portion of the DPCD and operate on that, without a way to write data back to the DPCD (e.g. for configuration of the link). Subsequent patches will build upon this infrastructure to provide common functionality in a generic way. Signed-off-by: Thierry Reding <treding@nvidia.com> --- Changes in v3: - return number of bytes transferred in drm_dp_dpcd_write() - factor out drm_dp_dpcd_access() - describe error codes
2014-01-10drm/edid: Fixup various kerneldoc warningsThierry Reding1-10/+14
Some of the kerneldoc comments were actually doxygen of some sort, while most of the warnings were merely missing parameter descriptions. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10drm/edid: Drop revision argument for drm_mode_std()Thierry Reding1-7/+6
This argument is used to pass in the revision of the EDID, but since the EDID is passed in as well, we can just as well get the revision from the EDID structure directly. While at it, update the kerneldoc comment. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-01-10Merge branch 'akpm-current/current'Stephen Rothwell4-4/+18
Conflicts: drivers/misc/mei/hbm.c
2014-01-10Merge remote-tracking branch 'trivial/for-next'Stephen Rothwell9-14/+16
Conflicts: drivers/gpu/drm/qxl/Kconfig
2014-01-10Merge remote-tracking branch 'iommu/next'Stephen Rothwell1-0/+1
2014-01-10drivers/gpu/drm/gma500/backlight.c: fix a defined-but-not-used warning for ↵David Howells1-2/+2
do_gma_backlight_set() Fix the following warning: drivers/gpu/drm/gma500/backlight.c:29:13: warning: 'do_gma_backlight_set' defined but not used [-Wunused-function] by moving the entire function inside the conditional section currently inside of it. All the places that call it are so conditionalised. Signed-off-by: David Howells <dhowells@redhat.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-01-10drm/nouveau: make vga_switcheroo code depend on VGA_SWITCHEROOJeff Mahoney1-0/+6
Commit 8116188fdef594 ("nouveau/acpi: hook up to the MXM method for mux switching.") broke the build on non-x86 architectures due to the new dependency on MXM and MXM being an x86 platform driver. It built previously since the vga switcheroo registration routines were zereod out on !X86. The code was built in but unused. This patch makes all of the DSM code depend on CONFIG_VGA_SWITCHEROO, allowing it to build on non-x86 and shrinking the module size as well. [rdunlap@infradead.org: fix build eror when VGA_SWITCHEROO is not enabled] Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-01-10drm/cirrus: correct register values for 16bppTakashi Iwai1-2/+2
When the mode is set with 16bpp on QEMU, the output gets totally broken. The culprit is the bogus register values set for 16bpp, which was likely copied from from a wrong place. Addresses https://bugzilla.novell.com/show_bug.cgi?id=799216 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: David Airlie <airlied@linux.ie> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-01-10drm/fb-helper: don't sleep for screen unblank when an oops is in progressDaniel Vetter1-0/+8
Otherwise the system will burn even brighter and worse, leave the user wondering what's going on exactly. Since we already have a panic handler which will (try) to restore the entire fbdev console mode, we can just bail out. Inspired by a patch from Konstantin Khlebnikov. The callchain leading to this, cut&pasted from Konstantin's original patch: callstack: panic() bust_spinlocks(1) unblank_screen() vc->vc_sw->con_blank() fbcon_blank() fb_blank() info->fbops->fb_blank() drm_fb_helper_blank() drm_fb_helper_dpms() drm_modeset_lock_all() mutex_lock(&dev->mode_config.mutex) Note that the entire locking in the fb helper around panic/sysrq and kdbg is ... non-existant. So we have a decent change of blowing up everything. But since reworking this ties in with funny concepts like the fbdev notifier chain or the impressive things which happen around console_lock while oopsing, I'll leave that as an exercise for braver souls than me. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Konstantin Khlebnikov <khlebnikov@openvz.org> Cc: Dave Airlie <airlied@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2014-01-10Merge remote-tracking branch 'drm-intel/for-linux-next'Stephen Rothwell16-921/+440
Conflicts: drivers/gpu/drm/i915/intel_pm.c
2014-01-10Merge remote-tracking branch 'drm/drm-next'Stephen Rothwell170-2210/+7298
Conflicts: drivers/gpu/drm/drm_stub.c drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/i915/intel_pm.c drivers/staging/imx-drm/imx-drm-core.c
2014-01-10Merge remote-tracking branch 'pm/linux-next'Stephen Rothwell8-258/+88
2014-01-10Merge remote-tracking branch 'arm-soc/for-next'Stephen Rothwell5-8/+43
Conflicts: arch/arm/Kconfig.debug
2014-01-10Merge remote-tracking branch 'drm-intel-fixes/for-linux-next-fixes'Stephen Rothwell1-1/+7
2014-01-08drm/i915: fix wrong PLL debug messages.Paulo Zanoni1-8/+3
LPT does have PCH refclk, but it's different form the IBX/CPT/PPT one and doesn't use the same structs. It is wrong to have a message saying that "LPT does not has PCH refclk" (sic). While at it, signal that we only want this function on IBX/CPT/PPT by renaming it and adding a WARN. On HSW we also print "0 shared PLLs initialized", but we *do* have shared PLLs on HSW (LCPLL, WRPLL, SPLL) and we *do* initialize them. We just don't use "struct intel_shared_dpll". So remove the debug message. In the future we may want to rename all that "intel shared pll" code to "ibx shared pll", but I'll leave this to another patch. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08drm/i915: fix DDI PLLs HW state readout codePaulo Zanoni1-1/+7
Properly zero the refcounts and crtc->ddi_pll_set so the previous HW state doesn't affect the result of reading the current HW state. This fixes WARNs about WRPLL refcount if we have an HDMI monitor on HSW and then suspend/resume. Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64379 Tested-by: Qingshuai Tian <qingshuai.tian@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08drm/i915/bdw: don't try to check IPS state on BDW v2Jesse Barnes2-9/+12
According to Art, we don't have a way to read back the state reliably at runtime, through the control reg or the mailbox, at least not without risking disabling it again. So drop the readout and checking on BDW. v2: drop TODO comment (Paulo) move POSTING_READ of control reg under HSW branch in disable (Paulo) always report IPS as enabled on BDW (Paulo) References: https://bugs.freedesktop.org/show_bug.cgi?id=71906 Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08Merge branch 'acpi-dsm'Rafael J. Wysocki3-240/+83
* acpi-dsm: ACPI / extlog: replace open-coded _DSM code with helper functions ACPI / nouveau: replace open-coded _DSM code with helper functions nouveau / ACPI: fix memory leak in ACPI _DSM related code ACPI / i915: replace open-coded _DSM code with helper functions ACPI / i2c-hid: replace open-coded _DSM code with helper functions ACPI / TPM: detect PPI features by checking availability of _DSM functions ACPI / TPM: replace open-coded _DSM code with helper functions ACPI / TPM: match node name instead of full path when searching for TPM device PCI / pci-label: treat PCI label with index 0 as valid label ACPI / PCI: replace open-coded _DSM code with helper functions PCI / pci-label: release allocated ACPI object on error recovery path ACPI: introduce helper interfaces for _DSM method
2014-01-08drm/i915: use crtc_htotal when calculating ilk watermarksJesse Barnes1-1/+1
This was introduced in: commit 7c4a395ff8f441acb7876281c6777624e6410349 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed Oct 9 19:17:56 2013 +0300 drm/i915: Don't re-compute pipe watermarks except for the affected pipe and I missed fixing it in: commit fec8cba306f974f3a4491176994de5d821273643 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Wed Nov 27 11:10:26 2013 -0800 drm/i915: use crtc_htotal in watermark calculations to match fastboot v2 It's needed for ILK+ platforms to fastboot without crashing on a divide by 0 after a DPMS on action. Note: Ville mentioned in his review that this confusion seems to go down to the original introduction of this code in commit 801bcfffbb0721d7131e930f9a46103e539c43a4 Author: Paulo Zanoni <paulo.r.zanoni@intel.com> Date: Fri May 31 10:08:35 2013 -0300 drm/i915: properly set HSW WM_PIPE registers So it seems to have been missed both in the fastboot patch and in the 3d mode suppport (where only crtc_htotal reflects the real pipe width). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [danvet: Add note based on Ville's review.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08Merge branch 'drm-nouveau-next' of ↵Dave Airlie8-11/+21
git://anongit.freedesktop.org/nouveau/linux-2.6 into drm-fixes misc fixes for nouveau, one more msi rearm, regression fix for old bioses crash and leak fixes. * 'drm-nouveau-next' of git://anongit.freedesktop.org/nouveau/linux-2.6: drm/nouveau/nouveau: fix memory leak in nouveau_crtc_page_flip() drm/nouveau/bios: fix offset calculation for BMPv1 bioses drm/nouveau: return offset of allocated notifier drm/nouveau/bios: make jump conditional drm/nvce/mc: fix msi rearm on GF114 drm/nvc0/gr: fix mthd data submission drm/nouveau: populate master subdev pointer only when fully constructed
2014-01-08drm/i915: fix fastboot pfit disable hack to update pipe w/hJesse Barnes1-0/+2
When fastbooting, we read out the pipe timings early on, and then in a panel fitted config, disable the fitter later. But we weren't updating the pipe src h/w, which meant the mouse cursor was clipped to the pfitted size rather than the native size set later. Fix that up so the cursor is visible in the new mode. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08drm/i915: check modeset state after a pipe_set_base if using fastbootJesse Barnes1-0/+10
Otherwise we won't check the state until the next DPMS transition, which may never happen. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08drm/nouveau/nouveau: fix memory leak in nouveau_crtc_page_flip()Christian Engelmayer1-1/+1
Fix a memory leak in the nouveau_crtc_page_flip() error handling path. Signed-off-by: Christian Engelmayer <cengelma@gmx.at> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-08drm/nouveau/bios: fix offset calculation for BMPv1 biosesIlia Mirkin1-4/+4
The only BIOS on record that needs the 14 offset has a bios major version 2 but BMP version 1.01. Another bunch of BIOSes that need the 18 offset have BMP version 2.01 or 5.01 or higher. So instead of looking at the bios major version, look at the BMP version. BIOSes with BMP version 0 do not contain a detectable script, so always return 0 for them. See https://bugs.freedesktop.org/show_bug.cgi?id=68835 Reported-by: Mauro Molinari <mauromol@tiscali.it> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-07drm/msm: Fix link error with !MSM_IOMMUJoerg Roedel1-0/+1
The DRM driver for MSM depends on symbols from the MSM IOMMU driver. Add this dependency to the Kconfig file. Fixes this comile error: Kernel: arch/arm/boot/zImage is ready ERROR: "msm_iommu_get_ctx" [drivers/gpu/drm/msm/msm.ko] undefined! make[2]: *** [__modpost] Error 1 Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>
2014-01-07drm/i915: Simplify watermark/init_clock_gating setupVille Syrjälä1-62/+16
Avoid duplicating the same piece of code several times by separating the watemark vfunc setup from the init_clock_gating vfunc setup on PCH platforms. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-07drm/i915: Enable watermarks for BDWVille Syrjälä1-0/+11
We forgot to intialize the watermark vfuncs for BDW, and hence the watermarks were never updated. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-07drm/i915: Fix watermark code for BDWVille Syrjälä1-7/+7
Looks like I forgot to update the ILK/SNB/IVB watermark patches to deal with BDW. Add the relevant BDW checks to make sure we take the HSW codepaths on BDW as well. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-07drm/i915: avoid unclaimed registers when capturing the error statePaulo Zanoni1-1/+2
We're iterating over the CPU transcoders, so check for the correct power domain. This fixes many "unclaimed register" error messages. This can be reproduced by the IGT test mentioned below, but we still get a FAIL when we run it. Testcase: igt/kms_lip/flip-vs-panning-vs-hang Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-07drm/i915: Flush outstanding requests before allocating new seqnoChris Wilson1-4/+8
In very rare cases (such as a memory failure stress test) it is possible to fill the entire ring without emitting a request. Under this circumstance, the outstanding request is flushed and waited upon. After space on the ring is cleared, we return to emitting the new command - except that we just cleared the seqno allocated for this operation and trigger the sanity check that a request is only ever emitted with a valid seqno. The fix is to rearrange the code to make sure the allocation of the seqno for this operation is after any required flushes of outstanding operations. The bug exists since the preallocation was introduced in commit 9d7730914f4cd496e356acfab95b41075aa8eae8 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Nov 27 16:22:52 2012 +0000 drm/i915: Preallocate next seqno before touching the ring Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-07drm/i915: remove duplicate MODULE_LICENSE definitionJani Nikula1-2/+0
Multiple definitions show up multiple times in modinfo output. There's already an identical one in i915_drv.c along with other MODULE_* definitions, so drop the lone one in intel_fbdev.c. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-07drm/i915: Avoid dereference past end of page array in ↵Chris Wilson1-9/+9
gen8_ppgtt_insert_entries() The bug from gen6_ppgtt_insert_entries() was replicated into gen8_ppgtt_insert_entries(). This applies the fix for the OOPS from the previous patch to the gen8 routine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ben Widawsky <benjamin.widawsky@intel.com> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>