Commit Graph

13772 Commits

Author SHA1 Message Date
Linus Torvalds c59224d132 Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie:
 "Not a huge amount happening, some MAINTAINERS updates, radeon, vmwgfx
  and tegra fixes"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/vmwgfx: avoid null pointer dereference at failure paths
  drm/vmwgfx: Make sure backing mobs are cleared when allocated. Update driver date.
  drm/vmwgfx: Remove some unused surface formats
  drm/radeon: enable speaker allocation setup on dce3.2
  drm/radeon: change audio enable logic
  drm/radeon: fix audio disable on dce6+
  drm/radeon: free uvd ring on unload
  drm/radeon: disable pll sharing for DP on DCE4.1
  drm/radeon: fix missing bo reservation
  drm/radeon: print the supported atpx function mask
  MAINTAINERS: update drm git tree entry
  MAINTAINERS: add entry for drm radeon driver
  drm/tegra: Add guard to avoid double disable/enable of RGB outputs
  gpu: host1x: do not check previously handled gathers
  drm/tegra: fix typo 'CONFIG_TEGRA_DRM_FBDEV'
2014-03-02 15:25:45 -08:00
Dave Airlie d668ca1cc6 Merge branch 'drm-fixes-3.14' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
more radeon fixes

* 'drm-fixes-3.14' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: enable speaker allocation setup on dce3.2
  drm/radeon: change audio enable logic
  drm/radeon: fix audio disable on dce6+
  drm/radeon: free uvd ring on unload
  drm/radeon: disable pll sharing for DP on DCE4.1
  drm/radeon: fix missing bo reservation
  drm/radeon: print the supported atpx function mask
2014-03-03 09:04:41 +10:00
Alexey Khoroshilov 6950e23e54 drm/vmwgfx: avoid null pointer dereference at failure paths
vmw_takedown_otable_base() and vmw_mob_unbind() check for
potential vmw_fifo_reserve() failure and print error message,
but then immediately dereference NULL pointer.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
2014-03-02 09:49:59 +01:00
Thomas Hellstrom a34417f6be drm/vmwgfx: Make sure backing mobs are cleared when allocated. Update driver date.
Backing mob contents is propagated to user-space, so make sure backing
mobs are cleared when allocated. This also accidently fix rendering errors
with celestia when emulating legacy mode.

Also update driver date.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-02 09:43:40 +01:00
Thomas Hellstrom ae2045694b drm/vmwgfx: Remove some unused surface formats
These formats are deprecated.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2014-03-02 09:42:53 +01:00
Alex Deucher 3803c8e5b5 drm/radeon: enable speaker allocation setup on dce3.2
Now that we disable audio while setting up the audio
hw, we should be able to set this up without hangs.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-02-27 14:21:37 -05:00
Alex Deucher 832eafaf34 drm/radeon: change audio enable logic
Disable audio around audio hw setup.  This may avoid
hangs on certain asics.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-02-27 14:21:31 -05:00
Alex Deucher d7eb0a0940 drm/radeon: fix audio disable on dce6+
Properly clear the enable bit when audio disable is requested.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
2014-02-27 14:13:06 -05:00
Jerome Glisse d965441342 drm/radeon: free uvd ring on unload
Need to free the uvd ring. Also reshuffle gart tear down to
happen after uvd tear down.

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Cc: stable@vger.kernel.org
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-27 14:10:35 -05:00
Alex Deucher 9ef4e1d000 drm/radeon: disable pll sharing for DP on DCE4.1
Causes display problems.  We had already disabled
sharing for non-DP displays.

Based on a patch from:
Niels Ole Salscheider <niels_ole@salscheider-online.de>

bug:
https://bugzilla.kernel.org/show_bug.cgi?id=58121

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2014-02-27 14:10:34 -05:00
Christian König 5e386b574c drm/radeon: fix missing bo reservation
Otherwise we might get a crash here.

Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-27 14:05:28 -05:00
Alex Deucher 9f050c7f97 drm/radeon: print the supported atpx function mask
Print the supported functions mask in addition to
the version.  This is useful in debugging PX
problems since we can see what functions are available.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2014-02-27 14:05:27 -05:00
Linus Torvalds 795233bfd6 ACPI and power management fixes for 3.14-rc4
- Fix for a recent probing regression in the nouveau driver introduced
    by an ACPI change related to the handling of _DSM from Jiang Liu.
 
  - Fix for a dock station sysfs attribute that stopped working correctly
    after recent changes in the ACPI core.
 
  - cpufreq fix taking care of broken code related to CPU removal and
    overlooked by a previous recent fix in that area.  From Viresh Kumar.
 
  - Two intel_pstate fixes related to Baytrail support added during
    the 3.13 cycle (candidates for -stable) from Dirk Brandewie.
 
  - ACPI video fix removing duplicate brightness values from the _BCL
    table which makes its user space interface behave sanely.  From
    Hans de Goede.
 
  - Fix for the powernow-k8 cpufreq driver making it initialize its
    per-CPU data structures correctly from Srivatsa S. Bhat.
 
  - Fix for an obscure memory leak in the ACPI PCI interrupt allocation
    code (related to ISA) from Tomasz Nowicki.
 
  - ACPI video blacklist changes moving several systems that should
    use the native backlight interface instead of the ACPI one from
    the general ACPI _OSI blacklist the the ACPI video driver's
    blacklist where they belong.  This consists of an ACPI video
    driver update from Aaron Lu and a revert of a previous commit
    adding systems to the ACPI _OSI blacklist requested by Takashi Iwai.
 
  - Several fixes for build issues in ACPI drivers occuring when
    CONFIG_PM_SLEEP is unset from Shuah Khan.
 
  - Fix for an sscanf() format string in the ACPI Smart Battery
    Subsystem (SBS) driver from Luis G.F.
 
 /
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABCAAGBQJTB3oSAAoJEILEb/54YlRxjnUQAJ+ncexP66dwfCbkbWehfY/Y
 j339hEgSbj/OId7AQl9UKSSnomFd4KHLQG2eRmJ5p3hVtjIm975XCO4UJDA6UNuW
 bHpeMdled6zCKf9cXaboiBlU5FvpALJWEohVxVOf3tXMteAKSInN1mY8Kikmh7ZS
 C9v9rGS5vhETN4FZHkM8PCcQVIYXGv+kbXPzos+TcfJ77nFS6UYJRG0G+x2TBhCY
 d4JFE2EVfTCNMGLAPYr4M0kUWlqvOFMmlUqoIck/qYeCATIlsVilgbXD+VxVVrLK
 dO1QLPsj1dUq3a3PDGh+r8ML8iQN9v4EABfNwCCes8D/zwGf4lql1J2k9zc7/kax
 +3ppJEqprBMIlsLZzFKdnWQEswkwt6Gy/EFzUQb9v0CQp1pb3hQ+9ziPD/y/abfM
 HjZzvc/fGzC08IDHcTFdfpoga1oU9HLAoYe8PXJFEPoSwEHZET9ddXVsn74BdyvI
 r03VQuP7HeerCwsvdhDL2veEOXPt5HoWLsXRfprKiQmjX2W6ypUO7fPM34wXF1iT
 l5oWu0OclsuNURvJnXWjA+9VUEM+0nHSScqsXF/oKUQywYCQI7Cp9TXnrE1G/jw9
 5nnnLjnPCMXrMan31rxeg2gJgeq/w/fNs5fa7xFGjWrLIC5gNQoAb5f+B+cAeSNn
 ifmNqPBAtReT5p7qr2wV
 =5gW2
 -----END PGP SIGNATURE-----

Merge tag 'pm+acpi-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI and power management fixes from Rafael Wysocki:
 "These include two fixes for recent regressions related to ACPI, a
  cpufreq fix for breakage overlooked by a previous fix commit, two
  intel_pstate fixes for stuff added during the 3.13 cycle that need to
  go into -stable, three fixes for older bugs that also are -stable
  candidates, ACPI video blacklist changes related to BIOSes that behave
  in a special way on Windows 8, several build fixes for CONFIG_PM_SLEEP
  unset in ACPI drivers and an ACPI driver cleanup.

  Specifics:

   - Fix for a recent probing regression in the nouveau driver
     introduced by an ACPI change related to the handling of _DSM from
     Jiang Liu.

   - Fix for a dock station sysfs attribute that stopped working
     correctly after recent changes in the ACPI core.

   - cpufreq fix taking care of broken code related to CPU removal and
     overlooked by a previous recent fix in that area.  From Viresh
     Kumar.

   - Two intel_pstate fixes related to Baytrail support added during the
     3.13 cycle (candidates for -stable) from Dirk Brandewie.

   - ACPI video fix removing duplicate brightness values from the _BCL
     table which makes its user space interface behave sanely.  From
     Hans de Goede.

   - Fix for the powernow-k8 cpufreq driver making it initialize its
     per-CPU data structures correctly from Srivatsa S Bhat.

   - Fix for an obscure memory leak in the ACPI PCI interrupt allocation
     code (related to ISA) from Tomasz Nowicki.

   - ACPI video blacklist changes moving several systems that should use
     the native backlight interface instead of the ACPI one from the
     general ACPI _OSI blacklist the the ACPI video driver's blacklist
     where they belong.  This consists of an ACPI video driver update
     from Aaron Lu and a revert of a previous commit adding systems to
     the ACPI _OSI blacklist requested by Takashi Iwai.

   - Several fixes for build issues in ACPI drivers occuring when
     CONFIG_PM_SLEEP is unset from Shuah Khan.

   - Fix for an sscanf() format string in the ACPI Smart Battery
     Subsystem (SBS) driver from Luis G.F"

* tag 'pm+acpi-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  intel_pstate: Add support for Baytrail turbo P states
  intel_pstate: Use LFM bus ratio as min ratio/P state
  ACPI / nouveau: fix probing regression related to _DSM
  Revert "ACPI: Blacklist Win8 OSI for some HP laptop 2013 models"
  ACPI / video: Add systems that should favour native backlight interface
  ACPI / video: Filter the _BCL table for duplicate brightness values
  cpufreq: powernow-k8: Initialize per-cpu data-structures properly
  cpufreq: remove sysfs link when a cpu != policy->cpu, is removed
  ACPI / PCI: Fix memory leak in acpi_pci_irq_enable()
  ACPI / dock: Make 'docked' sysfs attribute work as documented
  ACPI / SBS: Fix incorrect sscanf() string
  ACPI / thermal: fix thermal driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / SBS: fix SBS driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / fan: fix fan driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / button: fix button driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / battery: fix battery driver compile error when CONFIG_PM_SLEEP is undefined
  ACPI / AC: fix AC driver compile error when CONFIG_PM_SLEEP is undefined
2014-02-21 10:01:17 -08:00
Jiang Liu e284175a96 ACPI / nouveau: fix probing regression related to _DSM
Fix regression caused by commit b072e53, which breaks loading nouveau
driver on optimus laptops.

On some platforms, ACPI _DSM method (nouveau_op_dsm_muid, function 0)
has special requirements on the fourth parameter, which is different
from ACPI specifications. So revert to the private implementation
to check availability of _DSM functions instead of using common
acpi_check_dsm() interface.

Fixes: b072e53b0a (ACPI / nouveau: replace open-coded _DSM code with helper functions)
Reported-and-tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
[rjw: Subject]
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-02-20 21:19:47 +01:00
Dave Airlie 5d7aad03c8 drm/tegra: Fixes for v3.14-rc3
These patches contain a fix for a potential hang when the RGB output is
 disabled twice, a typofix that prevents the framebuffer console from
 being restored on ->lastclose() and an optimization to do as little work
 as possible during host1x job submission.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJS+xxlAAoJEN0jrNd/PrOhccMQAL4gGMXoDI+LrPT99qjSvMN5
 gxCQ5DUgKKNLWFp42phVvCbUyqOS8sYd3SBK8rAjmCnFLGyqlUp6CGecoH3Hhl47
 j91CtkJDPytqMPSymxPH14JXxFvBq9e2AlKBKLEJcBE155KtaRbgPYsAfgMef81/
 HBP+QfnteWMs3Mg8vWpUsMikGT7HQlYSEdCf0hptsuOe3AmUiUP1fGG77u3uKMbW
 iJZTuRenVCcPTvP9YpDYc2xG4QzcRwngHb/SuFL6vuMZlbRt/PCP/83y5QpJ+DnQ
 qyP6rzPUmnTcGZN0gfcy9MpMRuR97ptA6srpA1ZBowwTKGO95a5K8cGdIP3056dG
 ZyKRNEMlRT4Oo7xJu2jRd4vPGuJ/Xno5NY9RW0l6E8kit7Mutw5DWX5/gxis3YtE
 UVAy74qeWyYjM7Pi2PvZxPyZ09Gsma8oUF+KNnU69SvcZsfCzt4JB6C2WgWvpyiC
 A2kJcfa/JU69AvYHhLoz9EhbcBonu1KWF+mAgCNZWZL3qkRkKuXDI2op1y3CInVc
 2agGHKqN9FWVOlvA8yuYEvlXpABLKbMCU2JNEtj9+fT1IuntRNY6qvigCUv1j/Gq
 St4KOHEOXF1qMp8Dn+i9UXqF8S+a291dACsDoagacIyy9zmwb6Cj9aN4OLzcp2vg
 kJJYyuQeAqiMsvstR8d2
 =pQjy
 -----END PGP SIGNATURE-----

Merge tag 'drm/for-3.14-rc3' of git://anongit.freedesktop.org/tegra/linux into drm-fixes

drm/tegra: Fixes for v3.14-rc3

These patches contain a fix for a potential hang when the RGB output is
disabled twice, a typofix that prevents the framebuffer console from
being restored on ->lastclose() and an optimization to do as little work
as possible during host1x job submission.

* tag 'drm/for-3.14-rc3' of git://anongit.freedesktop.org/tegra/linux:
  drm/tegra: Add guard to avoid double disable/enable of RGB outputs
  gpu: host1x: do not check previously handled gathers
  drm/tegra: fix typo 'CONFIG_TEGRA_DRM_FBDEV'
2014-02-20 16:22:25 +10:00
Dave Airlie 75936c65dd Merge tag 'ttm-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux into drm-fixes
Pull request of 2014-02-18

One compile fix and one memory leak.

* tag 'ttm-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux:
  drm/ttm: Fix memory leak in ttm_agp_backend.c
  drm/ttm: declare 'struct device' in ttm_page_alloc.h
2014-02-19 08:21:26 +10:00
Dave Airlie 9830e44f56 Merge tag 'vmwgfx-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux into drm-fixes
Pull request of 2014-02-18.

Nothing special. The biggest change is adding a couple of command defines and
packing the command data correctly.

* tag 'vmwgfx-fixes-3.14-2014-02-18' of git://people.freedesktop.org/~thomash/linux:
  drm/vmwgfx: Fix command defines and checks
  drm/vmwgfx: Fix possible integer overflow
  drm/vmwgfx: Remove stray const
  drm/vmwgfx: unlock on error path in vmw_execbuf_process()
  drm/vmwgfx: Get maximum mob size from register SVGA_REG_MOB_MAX_SIZE
  drm/vmwgfx: Fix a couple of sparse warnings and errors
2014-02-19 08:21:02 +10:00
Alex Deucher 21ed4947fd drm/radeon/ni: fix typo in dpm sq ramping setup
inverted logic.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2014-02-18 13:41:06 -05:00
Alex Deucher 5b43c3cd07 drm/radeon/si: fix typo in dpm sq ramping setup
inverted logic.

Noticed-by: Sylvain BERTRAND <sylware@legeek.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2014-02-18 13:41:05 -05:00
Christian König 8f53492f86 drm/radeon: fix CP semaphores on CIK
The CP semaphore queue on CIK has a bug that triggers if uncompleted
waits use the same address while a signal is still pending. Work around
this by using different addresses for each sync.

Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-18 13:41:05 -05:00
Dan Carpenter ebc54ffe1c drm/radeon: delete a stray tab
Static checkers complain that probably curly braces were intended here,
but actually it makes more sense to remove the extra tab.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-18 13:41:04 -05:00
Alex Deucher 6d8ea7de3f drm/radeon: fix display tiling setup on SI
Apply the same logic as CI to SI for setting up the
display tiling parameters.  The num banks may vary
per tiling index just like CI.

Bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=71488
https://bugs.freedesktop.org/show_bug.cgi?id=73946
https://bugs.freedesktop.org/show_bug.cgi?id=74927

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2014-02-18 13:41:03 -05:00
Alex Deucher 78b0351019 drm/radeon/dpm: reduce r7xx vblank mclk threshold to 200
Most laptops seems to have a vblank period of less than
300 and mclk switching works fine.  Drop the quirk and
set the default threshold to 200.

bug:
https://bugzilla.kernel.org/show_bug.cgi?id=70701

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-18 13:41:02 -05:00
Alex Deucher bea61c59d7 drm/radeon: fill in DRM_CAPs for cursor size
CIK parts are 128x128, older parts are 64x64.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-18 13:41:01 -05:00
Alex Deucher 8716ed4e7b drm: add DRM_CAPs for cursor size
Some hardware may not support standard 64x64 cursors.  Add
a drm cap to query the cursor size from the kernel.  Some examples
include radeon CIK parts (128x128 cursors) and armada (32x64 or 64x32).
This allows things like device specific ddxes to remove asics specific
logic and also allows xf86-video-modesetting to work properly with hw
cursors on this hardware. Default to 64 if the driver doesn't specify
a size.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2014-02-18 13:41:01 -05:00
Alex Deucher 7d5a33b071 drm/radeon: unify bpc handling
We were already storing the bpc (bits per color) information
in radeon_crtc, so just use that everywhere rather than
calculating it everywhere we use it.  This also allows us
to change it in one place if we ever want to override it.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-18 13:41:00 -05:00
Masanari Iida 7a444d1f0b drm/ttm: Fix memory leak in ttm_agp_backend.c
This patch fix a memory leak found by cppcheck.
[drivers/gpu/drm/ttm/ttm_agp_backend.c:129]:
(error) Memory leak: agp_be

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
2014-02-18 14:03:32 +01:00
Dave Airlie c2288d4d38 Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes
Nothing too exciting, mostly fixes for ancient boards, but a pretty important fix for DP on some systems.

Thanks,
* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: fix TTM_PL_TT memtype on pre-nv50
  drm/nv50/disp: use correct register to determine DP display bpp
  drm/nouveau/fb: use correct ram oclass for nv1a hardware
  drm/nv50/gr: add missing nv_error parameter priv
  drm/nouveau: fix ENG_RUNLIST register address
  drm/nv4c/bios: disallow retrieving from prom on nv4x igp's
  drm/nv4c/vga: decode register is in a different place on nv4x igp's
  drm/nv4c/mc: nv4x igp's have a different msi rearm register
  drm/nouveau: set irq_enabled manually
2014-02-18 16:22:40 +10:00
Dave Airlie 42738c2b39 Merge tag 'drm-intel-fixes-2014-02-14' of ssh://git.freedesktop.org/git/drm-intel into drm-fixes
3 fixes plus 1 prep patch, all four cc: stable. Jani will take over from
here and the plan is that he'll do 3.14-fixes for the entire release just
to work things out a bit.

* tag 'drm-intel-fixes-2014-02-14' of ssh://git.freedesktop.org/git/drm-intel:
  drm/i915/dp: add native aux defer retry limit
  drm/i915/dp: increase native aux defer retry timeout
  drm/i915: Prevent MI_DISPLAY_FLIP straddling two cachelines on IVB
  drm/i915: Add intel_ring_cachline_align()
2014-02-18 16:21:49 +10:00
Dave Airlie 3f0606cbd9 Merge branch 'tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-fixes
fix for leak in tda998x

* 'tda998x-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox:
  drm/i2c: tda998x: Fix memory leak in tda998x_encoder_init error path.
2014-02-18 16:20:17 +10:00
Ilia Mirkin 34d5950818 drm/nouveau: fix TTM_PL_TT memtype on pre-nv50
Commit a55409066 ("drm/nv50-: map TTM_PL_SYSTEM through a BAR for CPU
access") made it possible to work with tiled memory. However
mem->mm_node is not a nouveau_mem for AGP-using pre-NV50 cards, but a
drm_mm_node, as created by the ttm_bo_manager_func. As such, extend the
untiled check to explicitly include all pre-nv50 cards.

Reported-by: Ronald <ronald645@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74613
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Tested-by: Ronald Uitermark <ronald645@gmail.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-02-18 10:37:18 +10:00
Ilia Mirkin a7f1c1e65b drm/nv50/disp: use correct register to determine DP display bpp
Commit 0a0afd282f ("drm/nv50-/disp: move DP link training to core and
train from supervisor") added code that uses the wrong register for
computing the display bpp, used for bandwidth calculation. Adjust to use
the same register as used by exec_clkcmp and nv50_disp_intr_unk20_2_dp.

Reported-by: Torsten Wagner <torsten.wagner@gmail.com>
Reported-by: Michael Gulick <mgulick@mathworks.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67628
Cc: stable@vger.kernel.org # 3.9+
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-02-18 10:37:12 +10:00
Emil Velikov 95ca5b550a drm/nouveau/fb: use correct ram oclass for nv1a hardware
commit 8613e7314a
Author: Ben Skeggs <bskeggs@redhat.com>
Date:   Mon Oct 21 08:50:25 2013 +1000

    drm/nouveau/fb: remove ram oclass argument from base fb constructor

Introduced a unfortunate regression by using nv10 ram oclass for nv1a
hardware, causing corruption and eventually system lockup.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74866
Reported-by: John F. Godfrey <jfgodfrey@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Cc: stable@vger.kernel.org # 3.13+
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-02-18 10:37:08 +10:00
Ilia Mirkin a8c13aacdc drm/nv50/gr: add missing nv_error parameter priv
Commit ea7dce901 ("drm/nv50/gr: print mpc trap name when it's not an mp
trap") added an nv_error call that was missing the priv parameter. This
causes GPFs if the error is ever hit.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-02-18 10:37:02 +10:00
Alexandre Courbot bf787d7cdf drm/nouveau: fix ENG_RUNLIST register address
Address of the ENG_RUNLIST register should be 0x002284 + (engine * 8),
not 0x002284 + (engine * 4).

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-02-18 10:36:58 +10:00
Ilia Mirkin 5ac607ec40 drm/nv4c/bios: disallow retrieving from prom on nv4x igp's
Suggested-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-02-18 10:36:52 +10:00
Ilia Mirkin b71313e14b drm/nv4c/vga: decode register is in a different place on nv4x igp's
Suggested-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-02-18 10:36:49 +10:00
Ilia Mirkin fa8c9ac72f drm/nv4c/mc: nv4x igp's have a different msi rearm register
See https://bugs.freedesktop.org/show_bug.cgi?id=74492

Reported-by: Ronald <ronald645@gmail.com>
Suggested-by: Marcin Kościelnicki <koriakin@0x04.net>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-02-18 10:36:45 +10:00
Ilia Mirkin 7d3428cd4b drm/nouveau: set irq_enabled manually
Since commit 0fa9061ae8 ("drm/nouveau/mc: handle irq-related setup
ourselves"), drm_device->irq_enabled remained unset. This is needed in
order to properly wait for a vblank event in the generic drm code.

See https://bugs.freedesktop.org/show_bug.cgi?id=74195

Reported-by: Jan Janecek <janjanjanx@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-02-18 10:36:35 +10:00
Dave Jones 71c68c4fc9 drm/i2c: tda998x: Fix memory leak in tda998x_encoder_init error path.
Commit 6ae668cc19 (drm/i2c: tda998x: check the CEC device creation)
introduced a memory leak in the error path of tda998x_encoder_init

Picked up by the nightly Coverity scan. CID 1174076

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-02-13 19:40:24 +00:00
Jani Nikula f51a44b9a6 drm/i915/dp: add native aux defer retry limit
Retrying indefinitely places too much trust on the aux implementation of
the sink devices.

Reported-by: Daniel Martin <consume.noise@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71267
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org
Tested-by: Theodore Ts'o <tytso@mit.edu>
Tested-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 16:12:42 +01:00
Jani Nikula 04eada25d1 drm/i915/dp: increase native aux defer retry timeout
Give more slack to sink devices before retrying on native aux
defer. AFAICT the 100 us timeout was not based on the DP spec.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org (on Jani's request)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 16:05:33 +01:00
Thomas Hellstrom 36e952c1ed drm/vmwgfx: Fix command defines and checks
Make sure all guest-backed object commands are properly packed.
Have the command verifier treat uninitialized command entries as invalid
rather than dereferencing NULL pointers.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-02-12 19:31:45 +01:00
Thomas Hellstrom b055211d94 drm/vmwgfx: Fix possible integer overflow
Cc: stable@vger.kernel.org
Reported-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-02-12 19:30:45 +01:00
Thomas Hellstrom 4fbd9d2ec2 drm/vmwgfx: Remove stray const
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-02-12 14:16:44 +01:00
Dan Carpenter b2ad9881d6 drm/vmwgfx: unlock on error path in vmw_execbuf_process()
There is a missing unlock on error here.

Fixes: 30f82d816d ('drm/vmwgfx: Reemit context bindings when necessary v2')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
2014-02-12 12:22:25 +01:00
Charmaine Lee 857aea1c57 drm/vmwgfx: Get maximum mob size from register SVGA_REG_MOB_MAX_SIZE
This patch queries the register SVGA_REG_MOB_MAX_SIZE for the
maximum size of a single mob.

Signed-off-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
2014-02-12 12:17:00 +01:00
Thomas Hellstrom 8e67bbbc51 drm/vmwgfx: Fix a couple of sparse warnings and errors
Introduced with 3.14-rc1

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-02-12 12:01:11 +01:00
Dmitry Osipenko b189153790 drm/tegra: Add guard to avoid double disable/enable of RGB outputs
Add guard to check whether RGB output is already enabled in the way it's
done for HDMI output. Fixes possible hang on trying to disable output twice
(first time during driver probe and second on fb registering).

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-02-12 07:50:38 +01:00
Erik Faye-Lund 89e6e8c85f gpu: host1x: do not check previously handled gathers
When patching gathers, we don't need to check against
gathers with lower indices than the current one, as
they are guaranteed to already have been handled.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-By: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-02-12 07:50:37 +01:00