aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)AuthorFilesLines
2013-11-08drm/radeon: update cik_gpu_init() for hawaiiAlex Deucher2-0/+18
This adds the hawaii asic specific configuration details. Signed-off-by: Alex Deucher <[email protected]>
2013-11-08drm/radeon: add Hawaii chip familyAlex Deucher2-0/+2
Hawaii is a new CI-based dGPU. Signed-off-by: Alex Deucher <[email protected]>
2013-11-08drm/radeon: fix-up some float to fixed conversion thinkosAlex Deucher2-19/+5
Spotted by Brad Smith when porting to OpenBSD. Noticed-by: Brad Smith <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-08drm/radeon: use HDP_MEM_COHERENCY_FLUSH_CNTL for sdma as wellAlex Deucher1-28/+12
The new HDP flush method doesn't seem to work reliably on sDMA either, so use the old method here too. Signed-off-by: Alex Deucher <[email protected]>
2013-11-08drm/radeon/kms: add crtc_disable function for legacy crtcIlija Hadzic1-0/+21
To plug the VRAM memory leak (see previous patch for details) we must unpin the frame buffer when disabling the CRTC. This warrants the addition of disable function for legacy CRTC, which puts the CRTC in DPMS-OFF state and unpins the frame buffer if there is one associated with the CRTC. Signed-off-by: Ilija Hadzic <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-08drm/radeon/kms: unpin fb in atombios crtc disableIlija Hadzic1-0/+15
When drm_helper_disable_unused_functions calls disable function of the CRTC, it also sets the crtc->fb pointer to NULL. This can later (when the mode on that CRTC is setup again from user space) cause ***_do_set_base functions to "think" that there is no old buffer and skip the unpinning code. Consequently, the buffer that has been NULL-ified in drm_helper_disable_unused_functions will never be unpinned causing a leak in VRAM. This patch plugs the leak by unpinning the frame buffer in crtc_disable function. Signed-off-by: Ilija Hadzic <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-08drm/radeon/audio: fix missing multichannel PCM SAD in some casesAnssi Hannula3-15/+45
The current code writing SADs to the audio registers seems to assume that there is at most a single SAD per audio format. However, that is not the case. Especially for PCM it is somewhat common for sinks to have two SADs, one for 8-channel and one for 2-channel audio, which may have different supported sample rates (i.e. the sink supports stereo audio at higher sample rates than multichannel audio). Because of this, only the 2-channel SAD may be used if it appears before the 8-channel SAD. Unless other SADs require otherwise, this may cause the ALSA HDA driver to allow stereo playback only. Fix the code to pick the PCM SAD with the highest number of channels, while merging the rate masks of PCM SADs with lower amount of channels into the additional stereo rate mask byte. Technically there are even more cases to handle (multiple non-PCM SADs of the same type, more than two PCM SADs with varying channel counts, etc), but those have not actually been encountered in the field and handling them would be non-trivial. Example affected EDID from Onkyo TX-SR674 specifying 192kHz stereo support and 96kHz 8-channel support (and other 8-channel compressed formats): 00ffffffffffff003dcb010000000001 ffff0103800000780a0dc9a057479827 12484c00000001010101010101010101 010101010101011d8018711c1620582c 2500c48e2100009e011d007251d01e20 6e285500c48e2100001e000000fc0054 582d53523637342020202020000000fd 00313d0f2e08000a202020202020019b 02032f724f8504030f0e07069413121e 1d1615012f097f070f1f071707503707 503f07c0834f000066030c00ffff808c 0ad08a20e02d10103e9600c48e210000 18011d80d0721c1620102c2580c48e21 00009e011d00bc52d01e20b8285540c4 8e2100001e8c0ad090204031200c4055 00c48e210000180000000000000000a8 Signed-off-by: Anssi Hannula <[email protected]> Tested-by: Andre Heider <[email protected]> Cc: Rafał Miłecki <[email protected]> Acked-by: Rafał Miłecki <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2013-11-08drm/i915: Mask the vblank interrupt on bdw by defaultDaniel Vetter1-8/+8
Reported-by: Ville Syrjälä <[email protected]> Cc: Ville Syrjälä <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915: Wire up cpu fifo underrun reporting support for bdwDaniel Vetter2-1/+26
HW engineers have listened and given us again a real interrupt with masking and status regs. Yay! For consistency with other platforms call the #define FIFO_UNDERRUN. Eventually we also might need to have some enable/disable functions for bdw display interrupts, but for now open-coding seems to be good enough. Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915: Optimize gen8_enable|disable_vblank functionsDaniel Vetter1-12/+6
Let's cache the IMR value like on other platforms. This is needed to implement the underrun reporting since then we'll have two places that change the same register at runtime. Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915: Wire up pipe CRC support for bdwDaniel Vetter1-0/+4
The layout of the CRC registers is the same as on hsw, only the interrupt handling has changed a bit. So trivial to wire up, yay! Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915: Wire up PCH interrupts for bdwDaniel Vetter1-0/+16
Gives us hotplug, gmbus, dp aux and south errors (underrun reporting!). Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915: Wire up port A aux channelDaniel Vetter2-3/+19
Useful for dp aux to work better. Also stop enabling the port A hotplug event - eDP panels are expected to fire that interupt and we're not really ready to deal with them. This is consistent with how we handle port A on ilk-hsw. The more important bit is that we must delay the enabling of hotplug interrupts until all the encoders are fully set up. But we need irq support earlier than that, hence hotplug interrupts can only be enabled in the ->hpd_irq_setup callback. v2: Drop the _HOTPLUG, it isn't (Ville). Cc: Ville Syrjälä <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915: Fix up the bdw pipe interrupt enable listsDaniel Vetter2-9/+10
- Pipe underrun can't just be enabled, we need some support code like on ilk-hsw to make this happen. So drop it for now. - CRC error is a special mode of the CRC hardware that we don't use, so again drop it. Real CRC support for bdw will be added later. - All the other error bits are about faults, so rename the #define and adjust the output. v2: Use pipe_name as pointed out by Ville. Ville's comment was on a previous patch, but it was easier to squash in here. Cc: Ville Syrjälä <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915: Optimize pipe irq handling on bdwDaniel Vetter2-25/+20
We have a per-pipe bit in the master irq control register, so use it. This allows us to drop the masks for aggregate interrupt bits and be a bit more explicit in the code. It also removes one indentation level. Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Take render error interrupt out of the maskDaniel Vetter1-2/+1
The handling of the error interrupts isn't wired up at all. And it hasn't been ever since ilk happened, so don't bother. Reviewed-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Add BDW PCH check firstBen Widawsky1-5/+5
Early platforms use the same PCH as HSW, and to avoid triggering the !ULT, and !HSW warnings, simply put it first in the search. Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915: Use hsw_crt_get_config on BDWVille Syrjälä1-6/+5
Broadwell should also use hsw_crt_get_config(). Just move the function pointer assignment to the if HAS_DDI block we already have there. Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Change dp aux timeout to 600us on DDIABen Widawsky1-1/+7
Cc: Art Runyan <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Enable trickle feed on BroadwellVille Syrjälä2-2/+2
Like on HSW, trickle feed should always be enabled on BDW. Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: WaSingleSubspanDispatchOnAALinesAndPointsBen Widawsky2-0/+4
Implement WaSingleSubspanDispatchOnAALinesAndPoints BDW-A workaround. Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: conservative SBE VUE cache modeBen Widawsky2-0/+5
Hold vertex data in cache until last reference BDW-A workaround Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Limit SDE poly depth FIFO to 2Ben Widawsky2-0/+4
BDW-A workaround BDW Bug #1899155 Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Sampler power bypass disableBen Widawsky2-0/+3
BDW-A workaround. BDW Bug #1899812 Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08ddrm/i915/bdw: Disable centroid pixel perf optimizationBen Widawsky2-0/+7
BDW-A workaround BDW Bug #1899532 v2: WARN on when not using preliminary HW support Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Jesse Barnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: BWGTLB clock gate disableBen Widawsky2-0/+3
Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Jesse Barnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Implement edp PSR workaroundsBen Widawsky2-0/+18
This implements a workaround for PSR dealing with some vblank issue. WaPsrDPAMaskVBlankInSRD && WaPsrDPRSUnmaskVBlankInSRD v2: forgot to git add bogus whitespace fix v3: Update with workaround names. Use for_each_pipe() and CHICKEN_PIPESL_1(pipe) macro (Ville) Cc: Art Runyan <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Jesse Barnes <[email protected]> [danvet: Kill redundant IS_BDW check and remove the copious amount of uneeded lines added.] Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Disable semaphoresBen Widawsky1-0/+6
We've done insufficient testing on them thus far, so keep them disabled until we do test. v2: Use WARN when not enabling preliminary HW support as this should only be disabled for that case. v3: Rip out the now useless (and really noisy) DRM_INFO output. Cc: Jesse Barnes <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Jesse Barnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Create a separate BDW rps enableBen Widawsky1-0/+75
This is mostly what we have for HSW with the exceptions of: no writes: GEN6_RC1_WAKE_RATE_LIMIT GEN6_RC6pp_WAKE_RATE_LIMIT GEN6_RC1e_THRESHOLD GEN6_RC6p_THRESHOLD GEN6_RC6pp_THRESHOLD GEN6_RP_DOWN_TIMEOUT - use 1s instead of 1.28s Don't try to overclock, or program ring/IA frequency tables since we don't quite have sufficient docs yet. NOTE: These values do not reflect the changes made recently by Chris. Since we have no evidence yet what the proper way to tweak for this platform is, I think it is good to go, and can be optimized by Chris, or whomever, later. Cc: Chris Wilson <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> [danvet: Drop spurious hunk and drop TODO - having per-platform rps register frobbing code is in my opinion preferred, now that all the infrastructure functions are extracted.] Reviewed-by: Jesse Barnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Broadwell has a max port clock of 300Mhz on HDMIDamien Lespiau1-1/+1
Just like HSW. This means we can scan out a mode with a 300Mhz pixel clock with a depth of 24 bits, but only a 200Mhz one with a 36bits depth. Signed-off-by: Damien Lespiau <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Don't wait for c0 threads on forcewakeBen Widawsky1-1/+2
It's no longer a required workaround on BDW. Signed-off-by: Ben Widawsky <[email protected]> [danvet: Move compile fix from a later patch to this one.] Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Use HSW formula for ring freq scalingBen Widawsky1-1/+4
The current formula we use for HSW is not what is in current docs. However, changing to the HSW formula on my HSW does not improve power usage, and decreases performance by about 5% in limited xonotic testing. For gen8, until we know otherwise, or run experiments, let's use the HSW formula - which should be the same used in the Windows driver (and thus help make an apples-applies comparison) on gen8. v2: Use >= 8 instead of > 7 to be consistent with all other gen checks. Signed-off-by: Ben Widawsky <[email protected]> (v1) Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Support eDP PSRBen Widawsky3-4/+5
Broadwell PSR support is a superset of Haswell. With this simple register base calculation, everything that worked on HSW for eDP PSR should work on BDW. Note that Broadwell provides additional PSR support. This is not addressed at this time. v2: Make the HAS_PSR include BDW v3: Use the correct offset (I had incorrectly used one from my faulty brain) (Art!) v4: It helps if you git add v5: Be explicit about not setting min link entry time for BDW. This should be no functional change over v4 (Jani) Reviewed-by: Art Runyan <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Use The GT mailbox for IPS enable/disableBen Widawsky3-11/+28
v2: Squash in fixup from Ben to synchronize the GT mailbox commands. CC: Art Runyan <[email protected]> Reviewed-by: Art Runyan <[email protected]> Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Add Broadwell display FIFO limitsVille Syrjälä2-9/+25
Broadwell has bigger display FIFOs than Haswell. Otherwise the two are very similar. v2: Fix FBC WM_LP shift for BDW v3: Rebase on top of the big Haswell wm rework. Signed-off-by: Ville Syrjälä <[email protected]> (v2) Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: check DPD on port D when setting the DDI buffersPaulo Zanoni1-1/+6
Use the eDP values on platforms where port D is eDP. This doesn't affect Haswell since it uses the same DDI buffer values for eDP and DP. Reviewed-by: Art Runyan <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: BDW also has only 2 FDI lanesPaulo Zanoni1-1/+1
So treat it like Haswell. Reviewed-by: Art Runyan <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: add support for BDW DP voltage swings and pre-emphasisPaulo Zanoni2-3/+63
They're not the same as the Haswell ones. Reviewed-by: Art Runyan <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> Reviewed-by: Todd Previte <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: add BDW DDI buf translations for eDPPaulo Zanoni1-3/+32
Broadwell has different DDI buffer translations for eDP and DP, so add support for the missing eDP and keep Haswell the same. A future patch addresses the suggestion from Art to check for eDP on port D and use the eDP values there, too. v2: Make checkpatch happy. Reviewed-by: Art Runyan <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> (v1) Reviewed-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Add BDW DDI buffer translation valuesArt Runyan1-5/+48
Many of the DDI buffer translation values have changed for BDW. Add new translation tables and selection between HSW and BDW. v2: s/BUG/WARN/ to avoid breaking future GENs. v3: Rebase on top of the hdmi translation table changes. v4: Fix up the multiline comment while at it. Signed-off-by: Art Runyan <[email protected]> (v2) Reviewed-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Implement WaSwitchSolVfFArbitrationPriorityBen Widawsky1-0/+6
GEN8 also needs this workaround. Signed-off-by: Ben Widawsky <[email protected]> [danvet: Add a generic comment that we need to recheck all these w/a.] Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Use pipe CSC on BroadwellVille Syrjälä2-2/+2
Route cursor and sprite data through the pipe CSC unit on BDW. Primary plane data is already sent through the pipe CSC. Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Ben Widawsky <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: get the correct LCPLL frequency on BroadwellPaulo Zanoni2-7/+21
v2: Rebased onto Paulo's MHz->kHz change. v3: Rebased on top of the Haswell pc8+ adjustements. v4: Use the exact 337.5MHz clock, should have been done as part of v2. Reviewed-by: Jani Nikula <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> (v1) Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Broadwell has PIPEMISCPaulo Zanoni2-2/+43
And it inherits some bits from the previous TRANS_CONF (aka PIPE_CONF on previous gens). v2: Rebase on to of the pipe config bpp handling rework. v3: Rebased on top of the pipe_config->dither refactoring. v4: Drop the read-modify-write cycle for PIPEMISC, similarly to how we now also build up PIPECONF completely ourselves - keeping around random stuff set by the BIOS just isn't a good idea. I've checked BDW BSpec and we already set all relevant bits. Signed-off-by: Paulo Zanoni <[email protected]> (v1) Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: on Broadwell, the panel fitter is on the pipePaulo Zanoni1-5/+7
So you can use the panel fitter while the power well is disabled and you also don't need to set the "pipe" bit. v2: Rebased on top of Jesse's pfit refactor, which moved pfit state into the pipe_config. v3: Rebase on top of the latest Haswell/panel fitter rework, which neatly resolves a FIXME we have in this patch here: v4: Rebase on top of the new power domain framework. Signed-off-by: Paulo Zanoni <[email protected]> (v1) Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: pretend we have LPT LP on BroadwellPaulo Zanoni1-0/+6
The platforms we currently have all have LPT LP on them. As such, we have no way to identify the new WPT PCH that will ship with Broadwell. NOTE: For all purposes relevant to the driver that this point, LPT and WPT are equivalent. Therefore there should be no need to actually change this for some time. v2: Don't assign dev_priv->num_pch_pll any more. v3: Rebase on top of the PCH detection changes for virtualized enviroments. v4: Wrote commit message Signed-off-by: Paulo Zanoni <[email protected]> (v1) Signed-off-by: Daniel Vetter <[email protected]> (v3) Signed-off-by: Ben Widawsky <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Broadwell also has the "power down well"Paulo Zanoni2-3/+8
Just like Haswell, but with the small twist that the panel fitter for pipe A is now also in the always-on power well. v2: Use the new HAS_POWER_WELL macro. v3: Rebase on top of intel_using_power_well patches. v4: This time actually update the PFIT check correctly so that the pipe A pfit is in the always-on domain. v5: Rebase on top of the VGA power domain addition. v6: Rebase on top of the new power domain infrastructure. Also pimp the commit message a bit while at it. v7: Use IS_BROADWELL instead of IS_GEN8 (Ville). Signed-off-by: Paulo Zanoni <[email protected]> (v1) Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: add Broadwell sprite/plane/cursor checksPaulo Zanoni2-3/+3
Just make Broadwell follow the same code paths as Haswell here, instead of running code for the even-older platforms. v2: Shuffle around Ben's vma prep work. Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> (v1) Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: Broadwell has 3 pipesDamien Lespiau1-2/+2
v2: Rebase (Paulo Zanoni) v3: Rebase on top of num_pipes having moved to intel_device_info. Signed-off-by: Damien Lespiau <[email protected]> (v1) Signed-off-by: Paulo Zanoni <[email protected]> (v2) Signed-off-by: Daniel Vetter <[email protected]>
2013-11-08drm/i915/bdw: add IS_BROADWELL macroPaulo Zanoni1-0/+1
For now it's just equivalent to IS_GEN8, but in the future we might want to change that (e.g., on Gen 7 we have IS_VALLEYVIEW, IS_IVYBRIDGE and IS_HASWELL). Signed-off-by: Paulo Zanoni <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>