aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-09-23drm/radeon/dpm/btc: filter clocks based on voltage/clk dep tablesAlex Deucher1-0/+34
Filter out mclk and sclk levels higher than listed in the clk voltage dependency tables. Supporting these clocks will require additional driver tweaking that isn't supported yet. See bug: https://bugs.freedesktop.org/show_bug.cgi?id=68235 Signed-off-by: Alex Deucher <[email protected]>
2013-09-23drm/radeon/dpm: fetch the max clk from voltage dep tables helperAlex Deucher2-0/+19
This patch adds a helper function to fetch the max clock from the voltage clock dependecy tables. Clocks above that level tend to be unstable and will require additional driver tweaks in order to work properly. This patch implemented the helper function to fetch the max clocks from the dependency tables. The following patches implement the per-asic clock filtering. See bug: https://bugs.freedesktop.org/show_bug.cgi?id=68235 Signed-off-by: Alex Deucher <[email protected]>
2013-09-23drm/radeon: fix missed variable sized accessAlex Deucher1-1/+1
I missed this when I fixed up this file. Noticed-by: Mathias Fröhlich <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-09-20drm/radeon: Make r100_cp_ring_info() and radeon_ring_gfx() safe (v2)Alex Ivanov2-6/+10
Prevent NULL pointer dereference in case when radeon_ring_fini() did it's job. Reading of r100_cp_ring_info and radeon_ring_gfx debugfs entries will lead to a KP if ring buffer was deallocated, e.g. on failed ring test. Seen on PA-RISC machine having "radeon: ring test failed (scratch(0x8504)=0xCAFEDEAD)" issue. v2: agd5f: add some parens around ring->ready check Signed-off-by: Alex Ivanov <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-09-20drm/radeon/cik: Add tiling mode index for 1D tiled depth/stencil surfacesMichel Dänzer1-0/+2
CIK uses a different index for 1D DST surfaces compared to SI. Expose the new index so libdrm_radeon can use it properly for userspace drivers. Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-09-20drm/radeon/cik: Fix encoding of number of banks in tiling configuration infoMichel Dänzer1-4/+2
There are multiple valid values, not just 0 or 1. Required to properly support 2D tiling in the userspace drivers. Cc: [email protected] Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-09-20drm/radeon/cik: Fix printing of client name on VM protection faultMichel Dänzer1-3/+4
The string is encoded from the MSB to the LSB of the register. Cc: [email protected] Signed-off-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-09-20drm/radeon: additional gcc fixes for radeon_atombios.cAlex Deucher1-23/+43
Newer versions of gcc seem to wander off into the weeds when dealing with variable sizes arrays in structs. Rather than indexing the arrays, use pointer arithmetic. Fix up spread spectrum tables. See bugs: https://bugs.freedesktop.org/show_bug.cgi?id=66932 https://bugs.freedesktop.org/show_bug.cgi?id=66972 https://bugs.freedesktop.org/show_bug.cgi?id=66945 Signed-off-by: Alex Deucher <[email protected]>
2013-09-20drm/radeon: avoid UVD corruption on AGP cards using GPU gartAlex Deucher1-1/+1
If the user has forced the driver to use the internal GPU gart rather than AGP on an AGP card, force the buffers to vram as well. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Dieter Nützel <[email protected]> Cc: [email protected]
2013-09-20Merge branch 'msm-fixes-3.12' of ↵Dave Airlie7-45/+107
git://people.freedesktop.org/~robclark/linux into drm-fixes A couple small msm fixes. Plus drop of set_need_resched(). * 'msm-fixes-3.12' of git://people.freedesktop.org/~robclark/linux: drm/msm: drop unnecessary set_need_resched() drm/msm: fix potential NULL pointer dereference drm/msm: workaround for missing irq drm/msm: return -EBUSY if bo still active drm/msm: fix return value check in ERR_PTR() drm/msm: fix cmdstream size check drm/msm: hangcheck harder drm/msm: handle read vs write fences
2013-09-20Merge branch 'exynos-drm-fixes' of ↵Dave Airlie3-6/+8
git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Just small fixes, and code cleanups. * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: fix return value check in lowlevel_buffer_allocate() drm/exynos: Fix address space warnings in exynos_drm_fbdev.c drm/exynos: Fix address space warning in exynos_drm_buf.c drm/exynos: Remove redundant OF dependency
2013-09-20Merge tag 'drm-intel-fixes-2013-09-19' of ↵Dave Airlie9-74/+122
git://people.freedesktop.org/~danvet/drm-intel into drm-fixes Some more dealock fixes around pageflips and gpu hangs, fixes for hsw hangs when doing modesets/dpms. And a few minor things to rectify issues with our modeset state tracking which the checker spotted. * tag 'drm-intel-fixes-2013-09-19' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: Don't enable the cursor on a disable pipe drm/i915: do not update cursor in crtc mode set drm/i915: kill set_need_resched drm/i915/dvo: set crtc timings again for panel fixed modes drm/i915/sdvo: Robustify the dtd<->drm_mode conversions drm/i915/sdvo: Fully translate sync flags in the dtd->mode conversion drm/i915: Use proper print format for debug prints drm/i915: fix wait_for_pending_flips vs gpu hang deadlock drm/i915: Track pfit enable state separately from size
2013-09-20Revert "drm: mark context support as a legacy subsystem"Dave Airlie4-72/+39
This reverts commit 7c510133d93dd6f15ca040733ba7b2891ed61fd1. Well looks like not enough digging was done, libdrm_nouveau before 2.4.33 used contexts, 292da616fe1f936ca78a3fa8e1b1b19883e343b6 nouveau: pull in major libdrm rewrite got rid of them, Reported-by: Paul Zimmerman <[email protected]> Reported-by: Mikael Pettersson <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-09-19drm/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 <[email protected]> Cc: Konstantin Khlebnikov <[email protected]> Cc: Dave Airlie <[email protected]> Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-09-19drm, ttm Fix uninitialized warningPrarit Bhargava1-1/+1
Fix uninitialized warning. drivers/gpu/drm/ttm/ttm_object.c: In function ‘ttm_base_object_lookup’: drivers/gpu/drm/ttm/ttm_object.c:213:10: error: ‘base’ may be used uninitialized in this function [-Werror=maybe-uninitialized] kref_put(&base->refcount, ttm_release_base); ^ drivers/gpu/drm/ttm/ttm_object.c:221:26: note: ‘base’ was declared here struct ttm_base_object *base; Signed-off-by: Prarit Bhargava <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: David Herrmann <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-09-19drm/ttm: fix the tt_populated check in ttm_tt_destroy()Ben Skeggs1-1/+1
After a vmalloc failure in ttm_dma_tt_alloc_page_directory(), ttm_dma_tt_init() will call ttm_tt_destroy() to cleanup, and end up inside the driver's unpopulate() hook when populate() has never yet been called. On nouveau, the first issue to be hit because of this is that dma_address[] may be a NULL pointer. After working around this, ttm_pool_unpopulate() may potentially hit the same issue with the pages[] array. It seems to make more sense to avoid calling unpopulate on already unpopulated TTMs than to add checks to all the implementations. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Thomas Hellstrom <[email protected]> Cc: [email protected] Cc: Jerome Glisse <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-09-19Merge branch 'drm-nouveau-next' of ↵Dave Airlie4-27/+36
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes A couple of bios parser fixes (one for ancient chips, another for new ones - important in Optimus configs). Another to make sure KMS is enabled on certain Optimus configs, and a TTM failure path fix. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/ttm: prevent double-free in nouveau_sgdma_create_ttm() failure path drm/nouveau/bios/init: fix thinko in INIT_CONFIGURE_MEM drm/nouveau/kms: enable for non-vga pci classes drm/nouveau/bios/init: stub opcode 0xaa
2013-09-18drm/i915: Don't enable the cursor on a disable pipeVille Syrjälä1-2/+4
On HSW enabling a plane on a disabled pipe may hang the entire system. And there's no good reason for doing it ever, so just don't. v2: Move the crtc active checks to intel_crtc_cursor_{set,move} to avoid confusing people during modeset Cc: [email protected] Signed-off-by: Ville Syrjälä <[email protected]> Tested-by: Paulo Zanoni <[email protected]> Reviewed-by: Paulo Zanoni <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-09-18drm/i915: do not update cursor in crtc mode setJani Nikula1-9/+0
The cursor is disabled before crtc mode set in crtc disable (and we assert this is the case), and enabled afterwards in crtc enable. Do not update it in crtc mode set. On HSW enabling a plane on a disabled pipe may hang the entire system. And there's no good reason for doing it ever, so just don't. v2: Add note about HSW hangs - vsyrjala Cc: [email protected] Suggested-by: Ville Syrjälä <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Tested-by: Paulo Zanoni <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-09-18drm/nouveau/ttm: prevent double-free in nouveau_sgdma_create_ttm() failure pathBen Skeggs1-3/+1
TTM calls the destructor on its own already... Signed-off-by: Ben Skeggs <[email protected]>
2013-09-18drm/nouveau/bios/init: fix thinko in INIT_CONFIGURE_MEMBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <[email protected]>
2013-09-18drm/nouveau/kms: enable for non-vga pci classesBen Skeggs2-21/+17
Signed-off-by: Ben Skeggs <[email protected]>
2013-09-18drm/nouveau/bios/init: stub opcode 0xaaBen Skeggs1-2/+17
Signed-off-by: Ben Skeggs <[email protected]>
2013-09-16drm/exynos: fix return value check in lowlevel_buffer_allocate()Wei Yongjun1-2/+2
In case of error, the function drm_prime_pages_to_sg() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2013-09-16drm/exynos: Fix address space warnings in exynos_drm_fbdev.cSachin Kamat1-2/+3
Silences the following warnings: drivers/gpu/drm/exynos/exynos_drm_fbdev.c:102:40: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/exynos/exynos_drm_fbdev.c:102:40: expected void [noderef] <asn:2>*kvaddr drivers/gpu/drm/exynos/exynos_drm_fbdev.c:102:40: got void * drivers/gpu/drm/exynos/exynos_drm_fbdev.c:107:48: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/exynos/exynos_drm_fbdev.c:107:48: expected void [noderef] <asn:2>*kvaddr drivers/gpu/drm/exynos/exynos_drm_fbdev.c:107:48: got void * Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2013-09-16drm/exynos: Fix address space warning in exynos_drm_buf.cSachin Kamat1-1/+2
Fixes the following warning: drivers/gpu/drm/exynos/exynos_drm_buf.c:66:29: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/exynos/exynos_drm_buf.c:66:29: expected void [noderef] <asn:2>*kvaddr drivers/gpu/drm/exynos/exynos_drm_buf.c:66:29: got void * Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2013-09-16drm/exynos: Remove redundant OF dependencySachin Kamat1-1/+1
Now that DRM_EXYNOS depends on OF, we do not need individual drivers to depend on it. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2013-09-16drm/msm: drop unnecessary set_need_resched()Rob Clark1-1/+0
This was inherited from i915/udl, and not actually needed. Signed-off-by: Rob Clark <[email protected]>
2013-09-16Merge branch 'drm-fixes-3.12' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie16-61/+62
into drm-fixes A few more radeon fixes. A fix for UVD on AGP cards, a fix for non-full screen scaling on laptop panels with DP bridge chips, and a bunch of dpm fixes. * 'drm-fixes-3.12' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: avoid UVD corruptions on AGP cards drm/radeon: fix panel scaling with eDP and LVDS bridges drm/radeon/dpm: rework auto performance level enable drm/radeon: Fix hmdi typo drm/radeon/dpm/rs780: fix force_performance state for same sclks drm/radeon/dpm/rs780: don't enable sclk scaling if not required drm/radeon/dpm/rs780: add some sanity checking to sclk scaling drm/radeon/dpm/rs780: use drm_mode_vrefresh()
2013-09-15drm/radeon: avoid UVD corruptions on AGP cardsChristian König1-3/+5
Putting everything into VRAM seems to help. Signed-off-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-09-15drm/radeon: fix panel scaling with eDP and LVDS bridgesAlex Deucher1-3/+31
We were using the wrong set_properly callback so we always ended up with Full scaling even if something else (Center or Full aspect) was selected. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2013-09-15drm/radeon/dpm: rework auto performance level enableAlex Deucher11-47/+9
Calling force_performance_level() from set_power_state() doesn't work on some asics because the current power state pointer has not been properly updated at that point. Move the calls to force_performance_level() out of the asic specific set_power_state() functions and into the main power state sequence. Fixes dpm resume on SI. Signed-off-by: Alex Deucher <[email protected]>
2013-09-15drm/radeon: Fix hmdi typoDamien Lespiau3-3/+3
I keep making that one, so checked if I was the only one. Apparently not. Cc: Alex Deucher <[email protected]> Signed-off-by: Damien Lespiau <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-09-15drm/radeon/dpm/rs780: fix force_performance state for same sclksAlex Deucher1-2/+4
If the low and high sclks within a power state are the same, there no need to enable sclk scaling. Enabling sclk scaling can cause display stability issues on some boards. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2013-09-15drm/radeon/dpm/rs780: don't enable sclk scaling if not requiredAlex Deucher1-0/+3
If the low and high sclks are the same, there is no need to enable sclk scaling. This causes display stability issues on certain boards. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=60857 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Reviewed-by: Christian König <[email protected]>
2013-09-15drm/radeon/dpm/rs780: add some sanity checking to sclk scalingAlex Deucher1-0/+6
Since the clock scaling is based on fb divider adjustments, make sure the other pll parameters are the same. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2013-09-15drm/radeon/dpm/rs780: use drm_mode_vrefresh()Alex Deucher1-3/+1
Rather than open coding it. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Christian König <[email protected]>
2013-09-16drm/udl: rip out set_need_reschedDaniel Vetter1-1/+0
This very much looks like copypasta from drm/i915's fault handler. It was used there to duct-tape over issues around gpu reset handling. Since that can't ever happen for udl and there's seemingly no other reason for this just drop it. Reported-by: Peter Zijlstra <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2013-09-16Merge branch 'drm-fixes-3.12' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie37-170/+729
into drm-fixes Radeon drm fixes for 3.12. All over the place (display, dpm, uvd, etc.). Also adds a couple more berlin pci ids. * 'drm-fixes-3.12' of git://people.freedesktop.org/~agd5f/linux: (25 commits) drm/radeon/dpm: add bapm callback for kb/kv drm/radeon/dpm: add bapm callback for trinity drm/radeon/dpm: add infrastructure to properly handle bapm drm/radeon/dpm: handle bapm on kb/kv drm/radeon/dpm: handle bapm on trinity drm/radeon: expose DPM thermal thresholds through sysfs drm/radeon: simplify driver data retrieval drm/radeon/atom: workaround vbios bug in transmitter table on rs880 (v2) drm/radeon/dpm: fix fallback for empty UVD clocks drm/radeon: add command submission tracepoint drm/radeon: remove stale radeon_fence_retire tracepoint drm/radeon/r6xx: add a stubbed out set_uvd_clocks callback drm/radeon: fix typo in PG flags drm/radeon: add some additional berlin pci ids drm/radeon/cik: update gpu_init for an additional berlin gpu drm/radeon: add spinlocks for indirect register accesss drm/radeon: protect concurrent smc register access with a spinlock drm/radeon: dpm updates for KV drm/radeon: signedness bug in kv_dpm.c drm/radeon: clean up r600_free_extended_power_table() ...
2013-09-12drm/i915: kill set_need_reschedDaniel Vetter1-7/+4
This is just a remnant from the old days when our reset handling was horribly racy, suffered from terribly locking issues and often happily live-locked. Those days are now gone so we can drop the hacks and just rip the reschedule-point out. Reported-by: Peter Zijlstra <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Linux Kernel Mailing List <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-09-12drm/msm: fix potential NULL pointer dereferenceWei Yongjun1-1/+2
The dereference to 'pdata' should be moved below the NULL test. Signed-off-by: Wei Yongjun <[email protected]>
2013-09-12drm/ast: fix the ast open key functionDave Airlie1-1/+1
When porting from UMS I mistyped this from the wrong place, AST noticed and pointed it out, so we should fix it to be like the X.org driver. Reported-by: Y.C. Chen <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2013-09-12drm/i915/dvo: set crtc timings again for panel fixed modesDaniel Vetter1-0/+2
Yet another regression due to commit 135c81b8c3c9a70d7b55758c9c2a247a4abb7b64 Author: Daniel Vetter <[email protected]> Date: Sun Jul 21 21:37:09 2013 +0200 drm/i915: clean up crtc timings computation I'm starting to wonder whether this was worth it ... v2: Actually make it compile. Cc: Jesse Barnes <[email protected]> Cc: Ville Syrjälä <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-09-12drm/i915/sdvo: Robustify the dtd<->drm_mode conversionsDaniel Vetter1-29/+34
We've failed to properly clear out the flags when converting a dtd to a drm mode. For more paranoia just memset the entire structure (and drop the now redundant clears). Also since commit 135c81b8c3c9a70d7b55758c9c2a247a4abb7b64 Author: Daniel Vetter <[email protected]> Date: Sun Jul 21 21:37:09 2013 +0200 drm/i915: clean up crtc timings computation we don't update the crtc timings any more properly, so do that again. v2: Remove more redundant clearing, spotted by Ville. v3: Actually make it compile. Oops. v4: Use a temporary structure to fill in the mode and copy it over with drm_mode_copy. This will ensure we don't clobber the mode list or id. Suggested by Ville. Cc: Rodrigo Vivi <[email protected]> Cc: Jesse Barnes <[email protected]> Cc: Ville Syrjälä <[email protected]> Reported-by: Ville Syrjälä <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> [danvet: Use the = {}; structure clearing instead of memset as suggested by Ville.] Signed-off-by: Daniel Vetter <[email protected]>
2013-09-11drm/msm: workaround for missing irqRob Clark1-2/+5
Occasionally we seem to miss an IRQ from the ME (microengine). I'm not entirely sure the root cause, but for now we can unwedge things by retiring from the hangcheck timer. Signed-off-by: Rob Clark <[email protected]>
2013-09-11drm/msm: return -EBUSY if bo still activeRob Clark3-18/+44
When we CPU_PREP a bo with NOSYNC flag (for example, to implement PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE), an -EBUSY return indicates to userspace that the bo is still busy. Previously it was incorrectly returning 0 in this case. And while we're in there throw in an bit of extra sanity checking in case userspace tries to wait for a bogus fence. Signed-off-by: Rob Clark <[email protected]>
2013-09-11drm/msm: fix return value check in ERR_PTR()Wei Yongjun1-2/+2
In case of error, the function drm_prime_pages_to_sg() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <[email protected]>
2013-09-11drm/radeon/dpm: add bapm callback for kb/kvAlex Deucher3-0/+22
This adds the enable_bapm callback for kb/kv. Signed-off-by: Alex Deucher <[email protected]>
2013-09-11drm/radeon/dpm: add bapm callback for trinityAlex Deucher4-0/+17
This adds the enable_bapm callback for trinity. Signed-off-by: Alex Deucher <[email protected]>
2013-09-11drm/radeon/dpm: add infrastructure to properly handle bapmAlex Deucher2-1/+12
bapm is a pm feature for sharing the power budget between the GPU and the CPU on APUs. It needs to be enabled or disabled in certain circumstances. For now, disable it when on battery and enable it when on AC power. Signed-off-by: Alex Deucher <[email protected]>