aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-06-03drm/i915: Reset CSB read pointer in ring initweitee/gfx-patch4Thomas Daniel
A previous commit enabled execlists by default: commit 27401d126b5b ("drm/i915/bdw: Enable execlists by default where supported") This allowed routine testing of execlists which exposed a regression when resuming from suspend. The cause was tracked down the to recent changes to the ring init sequence: commit 35a57ffbb108 ("drm/i915: Only init engines once") During a suspend/resume cycle the hardware Context Status Buffer write pointer is reset. However since the recent changes to the init sequence the software CSB read pointer is no longer reset. This means that context status events are not handled correctly and new contexts are not written to the ELSP, resulting in an apparent GPU hang. Pending further changes to the ring init code, just move the ring->next_context_status_buffer initialization into gen8_init_common_ring to fix this regression. v2: Moved init into gen8_init_common_ring rather than context_enable after feedback from Daniel Vetter. Updated commit msg to reflect this and also cite commits related to the regression. Fixed bz link to correct bug. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88096 Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Dave Gordon <david.s.gordon@intel.com> Signed-off-by: Thomas Daniel <thomas.daniel@intel.com> Reviewed-by: Dave Gordon <david.s.gordon@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit c0a03a2e4c4e954d9acffd3ce3521e64654c9dc8) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-06-03drm/i915/bdw: Enable execlists by default where supportedThomas Daniel
Execlist support in the i915 driver is now considered good enough for the feature to be enabled by default on Gen8 and later and routinely tested. Adjusted i915 parameters structure initialization to reflect this and updated the comment in intel_sanitize_enable_execlists(). There's still work to do before we can let the wider massive onto it, but there's still time left before the 3.20 cutoff. v2: Update the MODULE_PARM_DESC too. Issue: VIZ-2020 Signed-off-by: Thomas Daniel <thomas.daniel@intel.com> [danvet: Add note that there's still some work left to do.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 27401d126b5b1c8dd4df98bbb60b09ff2b3d5e60) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-06-01fs: aufs: fix a build error for archs which doesn't support MUTEX_SPIN_ON_OWNERKevin Hao
For struct mutex, the member "owner" only exist when either DEBUG_MUTEXES or MUTEX_SPIN_ON_OWNER is enabled. The SMP is a necessary condition, but not a sufficiency condition for MUTEX_SPIN_ON_OWNER. So we would get build error on arch such as mpis due to SMP is enabled and both DEBUG_MUTEXES and MUTEX_SPIN_ON_OWNER are disabled. Replace the SMP with MUTEX_SPIN_ON_OWNER to fix it. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-06-01fs: yaffs2: kill f_dentry usesKevin Hao
The macro f_dentry was already killed by commit 78d28e651f97 ("kill f_dentry macro"). So we should kill all the uses of this macro. Signed-off-by: Kevin Hao <kexin.hao@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-22intel_idle: Add support for the Airmont Core in the Cherrytrail and Braswell ↵Len Brown
SOCs Support C-states for the Airmont core in the Cherrytrail and Braswell SOCs. The states are similar to those of Silvermont in Baytrail, except both flavors of C6 states are faster. Signed-off-by: Len Brown <len.brown@intel.com> Cc: Kumar P Mahesh <mahesh.kumar.p@intel.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> (cherry picked from commit cab07a5652d1d124b505c2b7ed21c6823295c5d7) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-22intel_idle: Update support for Silvermont Core in Baytrail SOCLen Brown
On some Silvermont-Core/Baytrail-SOC systems, C1E latency is higher than original specifications. Although C1E is still enumerated in CPUID.MWAIT.EDX, we delete the state from intel_idle to avoid latency impact. Under some conditions, the latency of the C6N-BYT and C6S-BYT states may exceed the specified values of 40 and 140 usec, respectively. Increase those values to 300 and 500 usec; to assure that the hardware does not violate constraints that may be set by the Linux PM_QOS sub-system. Also increase the C7-BYT target residency to 4.0 ms from 1.5 ms. Signed-off-by: Len Brown <len.brown@intel.com> Cc: Kumar P Mahesh <mahesh.kumar.p@intel.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: <stable@vger.kernel.org> (cherry picked from commit d7ef76717322c8e2df7d4360b33faa9466cb1a0d) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-22intel_idle: Add ->enter_freeze callbacksRafael J. Wysocki
Add an ->enter_freeze callback routine, intel_idle_freeze(), to the intel_idle driver and point the ->enter_freeze callback pointers of all of the driver's state objects to it. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> (cherry picked from commit 5fe2e52720e7a62da956d8aa81eadf6959c7acc8) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-22intel_idle: support additional Broadwell modelLen Brown
Signed-off-by: Len Brown <len.brown@intel.com> (cherry picked from commit bea57077e44ec9c1e6d3a3c142c8a3c0289e290d) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-22PM / sleep: Make it possible to quiesce timers during suspend-to-idleRafael J. Wysocki
The efficiency of suspend-to-idle depends on being able to keep CPUs in the deepest available idle states for as much time as possible. Ideally, they should only be brought out of idle by system wakeup interrupts. However, timer interrupts occurring periodically prevent that from happening and it is not practical to chase all of the "misbehaving" timers in a whack-a-mole fashion. A much more effective approach is to suspend the local ticks for all CPUs and the entire timekeeping along the lines of what is done during full suspend, which also helps to keep suspend-to-idle and full suspend reasonably similar. The idea is to suspend the local tick on each CPU executing cpuidle_enter_freeze() and to make the last of them suspend the entire timekeeping. That should prevent timer interrupts from triggering until an IO interrupt wakes up one of the CPUs. It needs to be done with interrupts disabled on all of the CPUs, though, because otherwise the suspended clocksource might be accessed by an interrupt handler which might lead to fatal consequences. Unfortunately, the existing ->enter callbacks provided by cpuidle drivers generally cannot be used for implementing that, because some of them re-enable interrupts temporarily and some idle entry methods cause interrupts to be re-enabled automatically on exit. Also some of these callbacks manipulate local clock event devices of the CPUs which really shouldn't be done after suspending their ticks. To overcome that difficulty, introduce a new cpuidle state callback, ->enter_freeze, that will be guaranteed (1) to keep interrupts disabled all the time (and return with interrupts disabled) and (2) not to touch the CPU timer devices. Modify cpuidle_enter_freeze() to look for the deepest available idle state with ->enter_freeze present and to make the CPU execute that callback with suspended tick (and the last of the online CPUs to execute it with suspended timekeeping). Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> (cherry picked from commit 124cf9117c5f93cc5b324530b7e105b09c729d5d) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-22PM / sleep: Re-implement suspend-to-idle handlingRafael J. Wysocki
In preparation for adding support for quiescing timers in the final stage of suspend-to-idle transitions, rework the freeze_enter() function making the system wait on a wakeup event, the freeze_wake() function terminating the suspend-to-idle loop and the mechanism by which deep idle states are entered during suspend-to-idle. First of all, introduce a simple state machine for suspend-to-idle and make the code in question use it. Second, prevent freeze_enter() from losing wakeup events due to race conditions and ensure that the number of online CPUs won't change while it is being executed. In addition to that, make it force all of the CPUs re-enter the idle loop in case they are in idle states already (so they can enter deeper idle states if possible). Next, drop cpuidle_use_deepest_state() and replace use_deepest_state checks in cpuidle_select() and cpuidle_reflect() with a single suspend-to-idle state check in cpuidle_idle_call(). Finally, introduce cpuidle_enter_freeze() that will simply find the deepest idle state available to the given CPU and enter it using cpuidle_enter(). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> (cherry picked from commit 3810631332465d967ba5e27ea2c7dff2c9afac6c) Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-21drm/i915: New offset for reading frequencies on CHV.Deepak S
Use new Sideband offset to read max/min/gaur freq based on the SKU it is running on. Based on the Number of EU, we read different bits to identify the max frequencies at which system can run. v2: reuse mask definitions & INTEL_INFO() to get device info (Ville) v3: add break in switch conditions (Ville) Signed-off-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 095acd5f8739aa8322820d460e617898baf092df) Signed-off-by: cheah, vincent beng keat <vincent.beng.keat.cheah@intel.com> Conflicts: drivers/gpu/drm/i915/i915_reg.h (cherry picked from commit cf3329c09d1c90542d7c6998de3882fd7b2e4bc0) Signed-off-by: cheah, vincent beng keat <vincent.beng.keat.cheah@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-21drm/i915/chv: Populate total EU count on CherryviewDeepak S
Starting with Cherryview, devices may have a varying number of EU for a given ID due to creative fusing. Punit support different frequency for different fuse data. We use this patch to help get total eu enabled and read the right offset to get RP0 Based upon a patch from Jeff, but reworked to only store eu_total and avoid sending info to userspace v2: Format register definitions (Jani) Signed-off-by: Deepak S <deepak.s@linux.intel.com> Acked-by: Jeff McGee <jeff.mcgee@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 693d11c34053450a7d2c6590d3815156572b700c) Signed-off-by: cheah, vincent beng keat <vincent.beng.keat.cheah@intel.com> (cherry picked from commit 2ca6bbf2f7aa2709c989598e1a5c1bb5c4176fb8) Signed-off-by: cheah, vincent beng keat <vincent.beng.keat.cheah@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-19arm64: psci: move psci firmware calls out of lineWill Deacon
An arm64 allmodconfig fails to build with GCC 5 due to __asmeq assertions in the PSCI firmware calling code firing due to mcount preambles breaking our assumptions about register allocation of function arguments: /tmp/ccDqJsJ6.s: Assembler messages: /tmp/ccDqJsJ6.s:60: Error: .err encountered /tmp/ccDqJsJ6.s:61: Error: .err encountered /tmp/ccDqJsJ6.s:62: Error: .err encountered /tmp/ccDqJsJ6.s:99: Error: .err encountered /tmp/ccDqJsJ6.s:100: Error: .err encountered /tmp/ccDqJsJ6.s:101: Error: .err encountered This patch fixes the issue by moving the PSCI calls out-of-line into their own assembly files, which are safe from the compiler's meddling fingers. Reported-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Armin Kuter <akuster@mvista.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-15drm/i915: Only wait for required lanes in vlv_wait_port_ready()Ville Syrjälä
Currently vlv_wait_port_ready() waits for all four lanes on the appropriate channel. This no longer works on CHV when the unused lanes may be power gated. So pass in a mask of lanes that the caller is expecting to be ready. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Deepak S<deepak.s@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 9b6de0a1552175620ced3a7a7a552d4e7a379538) Signed-off-by: cheah, vincent beng keat <vincent.beng.keat.cheah@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-15Revert "drm/i915: Hack to tie both common lanes together on chv"Ville Syrjälä
With recent hardware/firmware there don't appear to be any glitches on the other PHY when we toggle the cmnreset for the other PHY. So detangle the cmnlane power wells from one another and let them be controlled independently. This reverts commit 3dd7b97458e8aa2d8985b46622d226fa635071e7. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 71849b67e788ca8899982df7adf21f61f44cb474) Signed-off-by: cheah, vincent beng keat <vincent.beng.keat.cheah@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-15drm/i915: Work around DISPLAY_PHY_CONTROL register corruption on CHVVille Syrjälä
Sometimes (exactly when is a bit unclear) DISPLAY_PHY_CONTROL appears to get corrupted. The values I've managed to read from it seem to have some pattern but vary quite a lot. The corruption doesn't seem to just happen when the register is accessed, but can also happen spontaneosly during modeset. When this happens during a modeset things go south and the display doesn't light up. I've managed to hit the problemn when toggling HDMI on port D on and off. When things get corrupted the display doesn't light up, but as soon as I manually write the correct value to the register the display comes up. First I was suspicious that we ourselves accidentally overwrite it with garbage, but didn't catch anything with the reg_rw tracepoint. Also I sprinkled check all over the modeset path to see exactly when the corruption happens, and eg. the read back value was fine just before intel_dp_set_m(), and corrupted immediately after it. I also made my check function repair the register value whenever it was wrong, and with this approach the corruption repeated several times during the modeset operation, always seeming to trigger in the same exact calls to the check function, while other calls to the function never caught anything. So far I've not seen this problem occurring when carefully avoiding all read accesses to DISPLAY_PHY_CONTROL. Not sure if that's just pure luck or an actual workaround, but we can hope it works. So let's avoid reading the register and instead track the desired value of the register in dev_priv. v2: Read out the power well state to determine initial register value v3: Use DPIO_CHx names instead of raw numbers Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 70722468872b0752abaff54d34ed16af0d95cb9f) Signed-off-by: cheah, vincent beng keat <vincent.beng.keat.cheah@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-15drm/i915: Implement chv display PHY lane stagger setupVille Syrjälä
Set up the chv display PHY lane stagger registers according to "Programming Guide for 1273 CHV eDP/DP/HDMI Display PHY" v1.04 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Deepak S <deepak.s@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 2e523e98bb593950de2c749d4ceb45cc20313c1a) Signed-off-by: cheah, vincent beng keat <vincent.beng.keat.cheah@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-05-06drm/i915/chv: Remove DPIO force latency causing interpair skew issueweitee/gfx-patchClint Taylor
Latest version of the "CHV DPIO programming notes" no longer requires writes to TX DW 11 to fix a +2UI interpair skew issue. The current code from April 2014 was actually causing additional skew issues between all TMDS pairs. ver2: added same treatment to intel_dp.c based on Ville's testing. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> (cherry picked from commit af8fcb9c58f1b2f02ddc04ba64710aaa52da00db) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Fix chv cdclk supportVille Syrjälä
The specs seem to be full of misinformation wrt. the Punit register 0x36. Some versions still show the old VLV bit layout, some the new layout, and all of them seem to tell us nonsense about the cdclk value encoding. Testing on actual hardware has shown that we simply need to program the desired CCK divider into the Punit register using the new layout of the bits. Doing that, the status bit change to indicate the same value, and the CCK 0x6b register also changes accordingly to indicate that CCK is now using the new divider. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman@linux.intel.com> Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohan.marimuthu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 9d0d3fdaae08e9221070dda32348116c2a3235ed) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Increase the range of sideband address.Deepak S
Looks like latest BSW/CHV production system has sideband address > 128. Use u32 data types to cover new offset/address range :) Signed-off-by: Deepak S <deepak.s@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 707b6e3d3cfaf8e6a3a4f2c381e0b354848771c2) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Disable DDR DVFS on CHVVille Syrjälä
DDR DVFS introduces massive memory latencies which can't be handled by the PND deadline stuff. Instead the watermarks will need to be programmed to compensate for the latency and the deadlines will need to be programmed to tight fixed values. That means DDR DVFS can only be enabled if the display FIFOs are large enough, and that pretty much means we have to manually repartition them to suit the needs of the moment. That's a lot of change, so in the meantime let's just disable DDR DVFS to get the display(s) to be stable. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit fc1ac8dee1fe3d3155e8622e4d8e9130d88bc65b) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com> Conflicts: drivers/gpu/drm/i915/i915_reg.h
2015-05-06drm/i915: Enable the maxfifo PM5 mode when appropriate on CHVVille Syrjälä
CHV has a new knob in Punit to select between some memory power savings modes PM2 and PM5. We can allow the deeper PM5 when maxfifo mode is enabled, so let's do so in the hopes for moar power savings. v2: Put the thing into a separate function to avoid churn later v3: Don't break VLV Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman@linux.intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Arun R Murthy <arun.r.murthy@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit cfb41411fce52a8e8b6c1f0bd253d4ca7bfcbd0d) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Program PFI credits for VLVVidya Srinivas
PFI credit programming is required when CD clock (related to data flow from display pipeline to end display) is greater than CZ clock (related to data flow from memory to display plane). This programming should be done when all planes are OFF to avoid intermittent hangs while accessing memory even from different Gfx units (not just display). If cdclk/czclk >=1, PFI credits could be set as any number. To get better performance, larger PFI credit can be assigned to PND. Otherwise if cdclk/czclk<1, the default PFI credit of 8 should be set. v2: - Change log to lower log level instead of DRM_ERROR - Change function name to valleyview_program_pfi_credits - Move program PFI credits to modeset_init instead of intel_set_mode - Change magic numbers to logical constants [vsyrjala v3: - only program in response to cdclk update - program the credits also when cdclk<czclk - add CHV bits v4: - Change CHV cdclk<czclk credits to 12 (Vijay)] Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Gajanan Bhat <gajanan.bhat@intel.com> Signed-off-by: Vandana Kannan <vandana.kannan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 1e69cd74af22cce3b882b155bef295ff68a40566) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Rewrite VLV/CHV watermark codeVille Syrjälä
Assuming the PND deadline mechanism works reasonably we should do memory requests as early as possible so that PND has schedule the requests more intelligently. Currently we're still calculating the watermarks as if VLV/CHV are identical to g4x, which isn't the case. The current code also seems to calculate insufficient watermarks and hence we're seeing some underruns, especially on high resolution displays. To fix it just rip out the current code and replace is with something that tries to utilize PND as efficiently as possible. We now calculate the WM watermark to trigger when the FIFO still has 256us worth of data. 256us is the maximum deadline value supoorted by PND, so issuing memory requests earlier would mean we probably couldn't utilize the full FIFO as PND would attempt to return the data at least in at least 256us. We also clamp the watermark to at least 8 cachelines as that's the magic watermark that enabling trickle feed would also impose. I'm assuming it matches some burst size. In theory we could just enable trickle feed and ignore the WM values, except trickle feed doesn't work with max fifo mode anyway, so we'd still need to calculate the SR watermarks. It seems cleaner to just disable trickle feed and calculate all watermarks the same way. Also trickle feed wouldn't account for the 256us max deadline value, thoguh that may be a moot point in non-max fifo mode sicne the FIFOs are fairly small. On VLV max fifo mode can be used with either primary or sprite planes. So the code now also checks all the planes (apart from the cursor) when calculating the SR plane watermark. We don't have to worry about the WM1 watermarks since we're using the PND deadline scheme which means the hardware ignores WM1 values. v2: Use plane->state->fb instead of plane->fb Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit ae80152ddad252f33893b92dd69f00cc53c5949f) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Make sure PND deadline mode is enabled on VLV/CHVVille Syrjälä
Poke at the CBR1_VLV register during init_clock_gating to make sure the PND deadline scheme is used. The hardware has two modes of operation wrt. watermarks: 1) PND deadline mode: - memory request deadline is calculated from actual FIFO level * DDL - WM1 watermark values are unused (AFAIK) - WM watermark level defines when to start fetching data from memory (assuming trickle feed is not used) 2) backup mode - deadline is based on FIFO status, DDL is unused - FIFO split into three regions with WM and WM1 watermarks, each part specifying a different FIFO status We want to use the PND deadline mode, so let's make sure the chicken bit is in the correct position on init. Also take the opportunity to refactor the shared code between VLV and CHV to a shared function. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit c6beb13ef33ae9430953deaa51db18a9e14277af) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Read out display FIFO size on VLV/CHVVille Syrjälä
VLV/CHV have similar DSPARB registers as older platforms, just more of them due to more planes. Add a bit of code to read out the current FIFO split from the registers. Will be useful later when we improve the WM calculations. v2: Add display_mmio_offset to DSPARB Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit b500472026e40ef2a4827a5973dc5424c98ede92) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Pass plane to vlv_compute_drain_latency()Ville Syrjälä
Now that we have drm_planes for the cursor and primary we can move the pixel_size handling into vlv_compute_drain_latency() and just pass the appropriate plane to it. v2: Check plane->state->fb instead of plane->fb Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> (v1) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> [danvet: Resolve conflict with Matt's s/plane->fb/plane->state->fb/ patch.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 883a3d2f65212388b1577ebc020648fc95fa5d72) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com> Conflicts: drivers/gpu/drm/i915/intel_pm.c
2015-05-06drm/i915: Reorganize VLV DDL setupVille Syrjälä
Introduce struct vlv_wm_values to house VLV watermark/drain latency values. We start by using it when computing the drain latency values. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 0018fda1e4d5c076decc0dcf396ea4e3d3faa444) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com> Conflicts: drivers/gpu/drm/i915/intel_pm.c
2015-05-06drm/i915: Hide VLV DDL precision handlingVille Syrjälä
Move the DDL precision handling into vlv_compute_drain_latency() so the callers don't have to duplicate the same code to deal with it. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 341c526f43fdd2d85450bf5f72927a82dded4ee5) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com> Conflicts: drivers/gpu/drm/i915/intel_pm.c
2015-05-06drm/i915: Simplify VLV drain latency computationVille Syrjälä
The current drain lantency computation relies on hardcoded limits to determine when the to use the low vs. high precision multiplier. Rewrite the code to use a more straightforward approach. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit abfc00b545ba2c4dee1dcb124be59f34df3ed7d9) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Kill DRAIN_LATENCY_PRECISION_* definesVille Syrjälä
Kill the silly DRAIN_LATENCY_PRECISION_* defines and just use the raw number instead. v2: Move the sprite 32/16 -> 16/8 preision multiplier change to another patch (Jesse) Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 120305166aa8da2e8166d7ac1adce30194e6e24f) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Reduce CHV DDL multiplier to 16/8Ville Syrjälä
Apparently we must yet halve the DDL drain latency from what we're using currently. This little nugget is not in any spec, but came down through the grapevine. This makes the displays a bit more stable. Not quite fully stable but at least they don't fall over immediately on driver load. v2: Update high_precision in valleyview_update_sprite_wm() too (Jesse) Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit edf605601403194fdded0f8fd6305955d4ba009d) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Allow pixel clock up to 95% of cdclk on CHVVille Syrjälä
Supposedly CHV can sustain a pixel clock of up to 95% of cdclk, as opposed to the 90% limit that was used old older platforms. Update the cdclk selection code to allow for this. This will allow eg. HDMI 4k modes with their 297MHz pixel clock while still respecting the 320 MHz cdclk limit on CHV. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman@linux.intel.com> Reviewed-by: Yogesh Mohan Marimuthu <yogesh.mohan.marimuthu@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 6cca31950a5df57d89d9cb4f846c96dab902adf9) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
2015-05-06drm/i915: Reduce CHV DPLL min vco frequency to 4.8 GHzVille Syrjälä
The current minimum vco frequency leaves us with a gap in our supported frequencies at 233-243 MHz. Your typical 2560x1440@60 display wants a pixel clock of 241.5 MHz, which is just withing that gap. Reduce the allowed vco min frequency to 4.8GHz to reduce the gap to 233-240 MHz, and thus allow such displays to work. 4.8 GHz is actually the documented (at least in some docs) limit of the PLL, and we just picked 4.86 GHz originally because that was the lowest value produced by the PLL spreadsheet, which obviously didn't consider 2560x1440 displays. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> (cherry picked from commit 17fe10218be4663b0be1cf27805c32741eae48a8) Signed-off-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com> Conflicts: drivers/gpu/drm/i915/intel_display.c
2015-05-05Revert "intel_idle: Add support for the Airmont Core in the Cherrytrail and ↵Bruce Ashfield
Braswell SOCs" This reverts commit 4edc52a55f82ea26b59e801e6907c49bd1615fb1.
2015-05-05Revert "dmaengine: dw: Split device_control"Bruce Ashfield
This reverts commit 468bad4f7a6f428d010f53d7d9a2c5772ee3552d.
2015-05-05Revert "dmaengine: dw: provide DMA capabilities"Bruce Ashfield
This reverts commit 931304a6567e6d47914b43ff9af1be697c0dbd8a.
2015-05-05Revert "ACPI: Introduce has_acpi_companion()"Bruce Ashfield
This reverts commit 423e98721e048f6c7b925a75448f6c4ecb2b5b69.
2015-05-05Revert "x86/irq, ACPI: Implement ACPI driver to support IOAPIC hotplug"Bruce Ashfield
This reverts commit 934f85e8bfdbab9f3910d03f670799331f870444.
2015-04-28dmaengine: dw: don't handle interrupt when dmaengine is not usedJie Yang
When dma controller is not used by any user and set off, we should disble interrupt handler, at least the interrupt reset part, for some subsystem, e.g. ADSP, may use the dma in its own logic, here reset the interrupt may make this subsystem work abnormally. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> (cherry picked from commit 94b3eed7b8a4311f56a86b36430e9068b596ada4) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28dmaengine: dw: define DW_DMA_MAX_NR_MASTERSAndy Shevchenko
Instead of using magic number in the code the patch provides DW_DMA_MAX_NR_MASTERS constant. While here, restrict the reading of data width array by amount of the actual number of AHB masters. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> (cherry picked from commit d8ded50f8b26a224df48f9f93e49440c6a39b77f) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28dmaengine: dw: provide DMA capabilitiesAndy Shevchenko
The new DMAEngine requirement is to provide what the DMA controller can do, such as directions, bus widths, and residue granularity. The patch sets those properties for the DesignWare DMA controller driver. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> (cherry picked from commit 029a40e97d0db269f4a7fc02b0f29f627f628309) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28dmaengine: dw: Split device_controlMaxime Ripard
Split the device_control callback of the DesignWare DMA driver to make use of the newly introduced callbacks, that will eventually be used to retrieve slave capabilities. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> (cherry picked from commit a4b0d348f60122eb45c50b3e79a8edaec6fee534) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28i2c: i801: Use managed pcim_* PCI device initialization and reservationJarkko Nikula
Simplifies the code a bit and makes easier to disable PCI device on driver detach by removing the pcim_pin_device() call in the future if needed. Reason why i2c-i801.c doesn't ever call pci_disable_device() was because it made some systems to hang during power-off. See commit d6fcb3b9cf77 ("[PATCH] i2c-i801.c: don't pci_disable_device() after it was just enabled") and http://marc.info/?l=linux-kernel&m=115160053309535&w=2 Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> (cherry picked from commit fef220da43d8537ed7d11da4db17b958cd779887) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28i2c: i801: Remove pci_enable_device() call from i801_resume()Jarkko Nikula
Since pci_disable_device() is not called from i801_suspend() and power state is set already it means that subsequent pci_enable_device() calls do practically nothing but monotonically increase struct pci_dev enable_cnt. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> (cherry picked from commit f85da3f5de6f354bc26eb84c013b41a8b8558c5e) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28i2c: i801: Use managed devm_* memory and irq allocationJarkko Nikula
This simplifies the error and remove paths. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> (cherry picked from commit 1621c59d94d13380015fb5131acc6c14ecd1c797) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28i2c: i801: Remove i801_driver forward declarationJarkko Nikula
struct pci_driver i801_driver forward declaration is needed only for accessing the name field. Remove it and use dev_driver_string() instead. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> (cherry picked from commit 256493c58625530a958296724b92b344f3271b2f) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28i2c: i801: Don't break user-visible stringsJarkko Nikula
It makes more difficult to grep these error prints from sources if they are split to multiple source lines. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> (cherry picked from commit 9cbbf3dc994797f49cd30607a16182ca6c87863f) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28ACPI: Introduce has_acpi_companion()Rafael J. Wysocki
Now that the ACPI companions of devices are represented by pointers to struct fwnode_handle, it is not quite efficient to check whether or not an ACPI companion of a device is present by evaluating the ACPI_COMPANION() macro. For this reason, introduce a special static inline routine for that, has_acpi_companion(), and update the code to use it where applicable. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> (cherry picked from commit ca5b74d2675a44f54aacb919c1cf022463e2f738) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
2015-04-28i2c: designware: Suppress error message if platform_get_irq() < 0Alexey Brodkin
With -EPROBE_DEFER, this message is confusing and we hope for a centralized printout in the future anyhow. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Christian Ruppert <christian.ruppert@alitech.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> (cherry picked from commit b20d386485e25934aef8aa24cbc8c2f51a2cb9cf) Signed-off-by: Ng Wei Tee <wei.tee.ng@intel.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>