Commit graph

427364 commits

Author SHA1 Message Date
Daniel Vetter 93110be696 drm/doc: Overview documentation for drm_mm.c
kerneldoc polish will follow in the next patch.

Hopefully documenting the lru scan support a bit better spurs someone
to give this a shot in the ttm eviction code. At least in i915 it
helped quite a lot with memory thrashing on platforms where eviction
was (we've fixed that too meanwhile) fairly expensive.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:36 +01:00
Daniel Vetter 79d1154478 drm/mm: Remove MM_UNUSED_TARGET
This was missed in

commit c700c67bae
Author: David Herrmann <dh.herrmann@gmail.com>
Date:   Sat Jul 27 13:39:28 2013 +0200

    drm/mm: remove unused API

Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:35 +01:00
Daniel Vetter 3a05700dc8 drm/doc: Update copyright
I've done quite a bit of cleanups, clarifications and mostly
integrating kerneldoc. So I guess I should add myself.

Also split up the copyright notices per holder to make it clear which
year ranges are covered.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:35 +01:00
Daniel Vetter 39cc344acd drm/doc: Add PRIME function references
For giant hilarity the DocBook reference overview is only generated
when in a level 2 section, not in a level 3 section. So we need to
move this up a bit as a side-by-side section to the main PRIME
documentation.

Whatever.

To have a complete set of references add the missing kerneldoc for all
functions exported to modules with the exception of the file private
init/destroy functions - drivers have no business calling those, so
let's just drop the EXPORT_SYMBOL instead.

Also reflow the function parameters to align correctly and break at 80
chars - my OCD couldn't stand them while writing the kerneldoc ;-)

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:34 +01:00
Daniel Vetter 251261db7f drm/doc: Clarify PRIME documentation
PRIME fds aren't actually GEM fds but are (like the modeset API)
independent of the underlying buffer manager, as long as that one uses
uint32_t as handles. So move that entire section out of the GEM
section and reword it a bit to clarify which parts of PRIME are
generic, and which are the mandatory pieces for GEM drivers to
correctly implement the GEM lifetime rules. The rewording mostly
consists of not mixing up GEM, PRIME and DRM.

I've considered adding some blurbs to the GEM object lifetime section
about interactions with dma-bufs, but then dropped that. As long as
drivers use the right helpers they should have this all implemented
correctly and hence can be regarded as an implementation detail of the
PRIME/GEM helpers. So no need to confuse driver writers with those
tricky interactions.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:33 +01:00
Daniel Vetter 2d123f4636 drm/docs: Include hdmi infoframe helper reference
Thierry created such nice kerneldocs, it's a shame we've left them
lingering!

For the fun of it also add a bit of kerneldoc to the header so that we
can also include that. Just in case someone adds kerneldoc in there.

Cc: Thierry Reding <thierry.reding@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:32 +01:00
Daniel Vetter 4c6e2dfe08 drm/doc: Hide legacy horrors better
By consolidating them all into one section at the very end. And to
make double-sure that no one gets confused start with a stern warning
against any use of them. And prefix all subsections with "Legacy".

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:32 +01:00
Daniel Vetter aa4cd9100e drm/doc: Document drm_helper_resume_force_mode
Stumbled over while reviewing all occurences in the DRM doc talking
about suspend/resume.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:31 +01:00
Daniel Vetter e1f8ebdcc2 drm/doc: No more drm perf counters
Those all died with

commit 0111be4218
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Fri Oct 4 14:53:41 2013 +0300

    drm: Kill drm perf counter leftovers

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:30 +01:00
Daniel Vetter 1aa12258d6 drm/doc: Remove the "command submissin and fencing" section
This should be done in the driver chapter instead.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:29 +01:00
Daniel Vetter 4c5acf3cc8 drm/doc: Move the vma offset manager to the right spot
Currently it's sitting in the mode setting helper section, which isn't
quite right. Looks much better in the memory management section next
to TTM and GEM.

Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:29 +01:00
Daniel Vetter 3519f70ee7 drm/doc: Reorganize driver documentation
Split up the DocBook into the core drm part and a 2nd part for
driver documentation. As an example add a very (very!) basic
skeleton for i915.

v1: Typo fixes from Dieter.

Cc: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:28 +01:00
Daniel Vetter 00153aebc2 drm/doc: Remove <term> from rendernode docs
The stylesheet doesn't allow this in normal paragraphs.

Cc: David Herrmann <dh.herrmann@gmail.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:27 +01:00
Daniel Vetter 89d61fc0f5 drm/doc: Clean up and integrate kerneldoc for drm_gem.c
Fairly incomplete, but at least a start.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:27 +01:00
Daniel Vetter fc66811ce1 drm/doc: Fix up kerneldoc in drm_edid.c
v2: Also do s/RETURNS/Returns/, less yelling in docs is always good.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:26 +01:00
Daniel Vetter 065a5027dc drm/doc: Clarify the dumb object interfaces
- This is _not_ a generic interface to create gem objects, but just an
  interface to make early boot services (like boot splash) with a
  generic KMS userspace driver possible. Hence it's better to move
  the documentation for this from the GEM section to the KMS section,
  next to the creation of framebuffer objects.

- Make it really clear that the returned handle isn't necessarily a
  GEM object (it can also be e.g. a TTM handle when running on top of
  vmwgfx).

- Add a paragraph to make it clear that this is just for unaccelarated
  userspace - gpu drivers need to have their own buffer object
  creation ioctl which is hardware specific.

v2: Clarify that the documentation doesn't just apply to GEM-based
drivers only but is now generally valid, as suggested by David.

v3: Polish the intro sentence a bit and one s/objects/handles/ for
clarification, both suggested by Laurent.

v4: More text polish from Laurent's review.

v5: More typo fixes from Dieter.

Cc: Dieter Nützel <Dieter@nuetzel-hh.de>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 12:48:25 +01:00
Dave Airlie 786a7828bc Merge branch 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux into drm-next
this is the second pull request for 3.15 radeon changes. Highlights this time:
- Better VRAM usage
- VM page table rework
- Enabling different UVD clocks again
- Some general cleanups and improvements

* 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux:
  drm/radeon: remove struct radeon_bo_list
  drm/radeon: drop non blocking allocations from sub allocator
  drm/radeon: remove global vm lock
  drm/radeon: use normal BOs for the page tables v4
  drm/radeon: further cleanup vm flushing & fencing
  drm/radeon: separate gart and vm functions
  drm/radeon: fix VCE suspend/resume
  drm/radeon: fix missing bo reservation
  drm/radeon: limit how much memory TTM can move per IB according to VRAM usage
  drm/radeon: validate relocations in the order determined by userspace v3
  drm/radeon: add buffers to the LRU list from smallest to largest
  drm/radeon: deduplicate code in radeon_gem_busy_ioctl
  drm/radeon: track memory statistics about VRAM and GTT usage and buffer moves v2
  drm/radeon: add a way to get and set initial buffer domains v2
  drm/radeon: use variable UVD clocks
  drm/radeon: cleanup the fence ring locking code
  drm/radeon: improve ring lockup detection code v2
2014-03-05 14:52:19 +10:00
Christian König df0af4403a drm/radeon: remove struct radeon_bo_list
Just move all fields into radeon_cs_reloc, removing unused/duplicated fields.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-03-04 14:34:34 +01:00
Dave Airlie 4d33f3aa1c Merge tag 'drm-intel-next-2014-02-14' of ssh://git.freedesktop.org/git/drm-intel into drm-next
- Fix the execbuf rebind performance regression due to topic/ppgtt (Chris).
- Fix up the connector cleanup ordering for sdvod i2c and dp aux devices (Imre).
- Try to preserve the firmware modeset config on driver load. And a bit of prep
  work for smooth takeover of the fb contents (Jesse).
- Prep cleanup for larger gtt address spaces on bdw (Ben).
- Improve our vblank_wait code to make hsw modesets faster (Paulo).
- Display debugfs file (Jesse).
- DRRS prep work from Vandana Kannan.
- pipestat interrupt handler to fix a few races around vblank/pageflip handling
  on byt (Imre).
- Improve display fuse handling for display-less SKUs (Damien).
- Drop locks while stalling for the gpu when serving pagefaults to improve
  interactivity (Chris).
- And as usual piles of other improvements and small fixes all over.

* tag 'drm-intel-next-2014-02-14' of ssh://git.freedesktop.org/git/drm-intel: (65 commits)
  drm/i915: fix NULL deref in the load detect code
  drm/i915: Only bind each object rather than for every execbuffer
  drm/i915: Directly return the vma from bind_to_vm
  drm/i915: Simplify i915_gem_object_ggtt_unpin
  drm/i915: Allow blocking in the PDE alloc when running low on gtt space
  drm/i915: Don't allocate context pages as mappable
  drm/i915: Handle set_cache_level errors in the status page setup
  drm/i915: Don't pin the status page as mappable
  drm/i915: Don't set PIN_MAPPABLE for legacy ringbuffers
  drm/i915: Handle set_cache_level errors in the pipe control scratch setup
  drm/i915: split PIN_GLOBAL out from PIN_MAPPABLE
  drm/i915: Consolidate binding parameters into flags
  drm/i915: sdvo: add i2c sysfs symlink to the connector's directory
  drm/i915: sdvo: fix error path in sdvo_connector_init
  drm/i915: dp: fix order of dp aux i2c device cleanup
  drm/i915: add unregister callback to connector
  drm/i915: don't reference null pointer at i915_sink_crc
  drm/i915/lvds: Remove dead code from failing case
  drm/i915: don't preserve inherited configs with nothing on v2
  drm/i915/bdw: Split up PPGTT cleanup
  ...
2014-03-04 07:51:41 +10:00
Christian König 4d15264662 drm/radeon: drop non blocking allocations from sub allocator
Not needed any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
2014-03-03 11:26:39 +01:00
Christian König 529364e05b drm/radeon: remove global vm lock
Not needed any more.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-03-03 11:26:27 +01:00
Christian König 6d2f2944e9 drm/radeon: use normal BOs for the page tables v4
No need to make it more complicated than necessary,
just allocate the page tables as normal BO and
flush whenever the address change.

v2: update comments and function name
v3: squash bug fixes, page directory and tables patch
v4: rebased on Mareks changes

Signed-off-by: Christian König <christian.koenig@amd.com>
2014-03-03 11:26:08 +01:00
Christian König fa68834342 drm/radeon: further cleanup vm flushing & fencing
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-03-03 11:03:35 +01:00
Christian König 2280ab57b6 drm/radeon: separate gart and vm functions
Both are complex enough on their own.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-03-03 11:03:34 +01:00
Christian König b03b4e4b6e drm/radeon: fix VCE suspend/resume
Signed-off-by: Christian König <christian.koenig@amd.com>
2014-03-03 11:03:32 +01:00
Christian König f1e3dc708a drm/radeon: fix missing bo reservation
Signed-off-by: Christian König <christian.koenig@amd.com>
2014-03-03 11:03:29 +01:00
Marek Olšák 19dff56a5f drm/radeon: limit how much memory TTM can move per IB according to VRAM usage
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-03-03 11:00:24 +01:00
Marek Olšák c9b7654889 drm/radeon: validate relocations in the order determined by userspace v3
Userspace should set the first 4 bits of drm_radeon_cs_reloc::flags to
a number from 0 to 15. The higher the number, the higher the priority,
which means a buffer with a higher number will be validated sooner.

The old behavior is preserved: Buffers used for write are prioritized over
read-only buffers if the userspace doesn't set the number.

v2: add buffers to buckets directly, then concatenate them
v3: use a stable sort

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-03-03 10:57:19 +01:00
Marek Olšák 4330441a74 drm/radeon: add buffers to the LRU list from smallest to largest
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-03-03 10:57:15 +01:00
Marek Olšák 0bc490a8d9 drm/radeon: deduplicate code in radeon_gem_busy_ioctl
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-03-03 10:57:10 +01:00
Marek Olšák 67e8e3f970 drm/radeon: track memory statistics about VRAM and GTT usage and buffer moves v2
The statistics are:
- VRAM usage in bytes
- GTT usage in bytes
- number of bytes moved by TTM

The last one is actually a counter, so you need to sample it before and after
command submission and take the difference.

This is useful for finding performance bottlenecks. Userspace queries are
also added.

v2: use atomic64_t

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-03-03 10:54:19 +01:00
Marek Olšák bda72d58a2 drm/radeon: add a way to get and set initial buffer domains v2
When passing buffers between processes, the receiving process needs to know
the original buffer domain, so that it doesn't accidentally move the buffer.

v2: reserve the buffer

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-03-03 10:53:01 +01:00
Alex Deucher 14a9579ddb drm/radeon: use variable UVD clocks
Now that Christian fixed the performance problems with
the feedback buffer in mesa, we can enable variable UVD
clocks.  There are multiple UVD power states associated
with different types and numbers of streams.  This uses
the appropriate state based on that information rather
than always using the fastest UVD clocks which saves some
power.  One possible downside is that this may adversely
affect decode benchmarks since these power states target
specific playback requirements rather than maximum
performance.  If that becomes an issue, we can add a
sysfs attribute to force the max UVD state.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2014-02-28 10:53:20 +01:00
Christian König 37615527c5 drm/radeon: cleanup the fence ring locking code
We no longer need to take the ring lock while checking for
a gpu lockup, so just cleanup the code.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-28 10:53:18 +01:00
Christian König aee4aa73a1 drm/radeon: improve ring lockup detection code v2
Use atomics and jiffies_64, so that we don't need to have the
ring mutex locked any more and avoid wrap arounds.

v2: fix some checkpatch warnings

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2014-02-28 10:53:16 +01:00
Dave Airlie 4d538b7919 Merge branch 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux into drm-next
So this is the initial pull request for radeon drm-next 3.15. Highlights:
- VCE bringup including DPM support
- Few cleanups for the ring handling code

* 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux:
  drm/radeon: cleanup false positive lockup handling
  drm/radeon: drop radeon_ring_force_activity
  drm/radeon: drop drivers copy of the rptr
  drm/radeon/cik: enable/disable vce cg when encoding v2
  drm/radeon: add support for vce 2.0 clock gating
  drm/radeon/dpm: properly enable/disable vce when vce pg is enabled
  drm/radeon/dpm: enable dynamic vce state switching v2
  drm/radeon: add vce dpm support for KV/KB
  drm/radeon: enable vce dpm on CI
  drm/radeon: add vce dpm support for CI
  drm/radeon: fill in set_vce_clocks for CIK asics
  drm/radeon/dpm: fetch vce states from the vbios
  drm/radeon/dpm: fill in some initial vce infrastructure
  drm/radeon/dpm: move platform caps fetching to a separate function
  drm/radeon: add callback for setting vce clocks
  drm/radeon: add VCE version parsing and checking
  drm/radeon: add VCE ring query
  drm/radeon: initial VCE support v4
  drm/radeon: fix CP semaphores on CIK
2014-02-27 14:39:30 +10:00
Dave Airlie c48cdd23ea Merge branch 'tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-next
Updates from Jean-Fracois for the TDA998x driver, which are on top of
the fixes you have previously pulled, except these changes aren't
intended for -rc, but the next merge window.

Several of these are issues of correctness - passing more correct HDMI
info packets, not reading registers in older chips documented as write
only (despite appearing to be read/write in later chips).  Others are
code cleanups (using definitions rather than constants where we have
them already in the kernel).

Additional functionality is also added by way of optional support for
the IRQ from the TDA998x, which allows us to avoid busy-waiting for
the EDID reads.

* 'tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox:
  drm/i2c: tda998x: always use the same device for all kernel messages
  drm/i2c: tda998x: adjust the audio clock divider for S/PDIF
  drm/i2c: tda998x: code optimization
  drm/i2c: tda998x: remove the unused variable ca_i2s
  drm/i2c: tda998x: make the audio code more readable
  drm/i2c: tda998x: use irq for connection status and EDID read
  drm/i2c: tda998x: always enable EDID read IRQ
  drm/i2c: tda998x: add DT documentation
  drm/i2c: tda998x: add DT support
  drm/i2c: tda998x: don't read write-only registers
  drm/i2c: tda998x: don't freeze the system at audio startup time
  drm/i2c: tda998x: change probe message origin
  drm/i2c: tda998x: code cleanup
  drm/i2c: tda998x: clean up error chip version checking
  drm/i2c: tda998x: check more I/O errors
  drm/i2c: tda998x: simplify the i2c read/write functions
  drm/i2c: tda998x: use ALSA IEC958 definitions and update audio frequency
  drm/i2c: tda998x: add the active aspect in HDMI AVI frame
  drm/i2c: tda998x: use HDMI constants
2014-02-27 14:36:56 +10:00
Dave Airlie 3e09dcd5bd Merge tag 'drm-intel-next-2014-02-07' of ssh://git.freedesktop.org/git/drm-intel into drm-next
- Yet more steps towards atomic modeset from Ville.
- DP panel power sequencing improvements from Paulo.
- irq code cleanups from Ville.
- 5.4 GHz dp lane clock support for bdw/hsw from Todd.
- Clock readout support for hsw/bdw (aka fastboot) from Jesse.
- Make pipe underruns report at ERROR level (Ville). This is to check our
  improved watermarks code.
- Full ppgtt support from Ben for gen7.
- More fbc fixes and improvements from Ville all over the place, unfortunately
  not yet enabled by default on more platforms.
- w/a cleanups from Ville.
- HiZ stall optimization settings (Chia-I Wu).
- Display register mmio offset refactor patch from Antti.
- RPS improvements for corner-cases from Jeff McGee.

* tag 'drm-intel-next-2014-02-07' of ssh://git.freedesktop.org/git/drm-intel: (166 commits)
  drm/i915: Update rps interrupt limits
  drm/i915: Restore rps/rc6 on reset
  drm/i915: Prevent recursion by retiring requests when the ring is full
  drm/i915: Generate a hang error code
  drm/i915: unify FLIP_DONE macro names
  drm/i915: vlv: s/spin_lock_irqsave/spin_lock/ in irq handler
  drm/i915: factor out valleyview_pipestat_irq_handler
  drm/i915: vlv: don't unmask IIR[DISPLAY_PIPE_A/B_VBLANK] interrupt
  drm/i915: Reorganize display pipe register accesses
  drm/i915: Treat using a purged buffer as a source of EFAULT
  drm/i915: Convert EFAULT into a silent SIGBUS
  drm/i915: release mutex in i915_gem_init()'s error path
  drm/i915: check for oom when allocating private_default_ctx
  drm/i915/vlv: WA to fix Voltage not getting dropped to Vmin when Gfx is power gated.
  drm/i915: Get rid of acthd based guilty batch search
  drm/i915: Use hangcheck score to find guilty context
  drm/i915: Drop WaDisablePSDDualDispatchEnable:ivb for IVB GT2
  drm/i915: Fix IVB GT2 WaDisableDopClockGating and WaDisablePSDDualDispatchEnable
  drm/i915: Don't access snooped pages through the GTT (even for error capture)
  drm/i915: Only print information for filing bug reports once
  ...

Conflicts:
	drivers/gpu/drm/i915/intel_dp.c
2014-02-27 14:36:01 +10:00
Dave Airlie 6ba6b7cdaf drm: DisplayPort AUX framework for v3.15-rc1
This series of patches implements a small framework that abstracts away
 some of the functionality that the DisplayPort AUX channel provides. It
 comes with a set of generic helpers that use the driver implementations
 to reduce code duplication.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJTDhU1AAoJEN0jrNd/PrOh5OoP/1tmkV0cgcMp//M2i0hWptvU
 ifO1SdwsnSMKajM8ytJuW+1e7UBStQg3QzpEwaTcvOuKHqE2WtDksh7yYUaj5Tv/
 SB7n0cS6rxbdIQ9SCFDVHT+A9N/YUeCj8l9BxgabaNnguA4I8Dydp9cfm3fCq835
 cWGf02TXw2H6V5mbNjaBggWSp4iqG/6+QxAn07o+u137kbTlRMO6pBjEflaVBCDP
 rYIJ5q2UgN//wI4e+ESYEyU8Cze5Zaevk+/L4Qg9FNbzGSjeEmfVNLuPdLkZOYV6
 6RSwOgSlZWGjMRsIWHta2u0VDQB/Wr0PjDqx4mWcYyrFJfms5yrc6R4JmQwGRFxi
 ucSkL9Ak1LKK2NLhrfnzL1ogHkU/5EEPV1dDxK7P0Milzg2YUDwhv1zn+ssmtUuQ
 zZrPYJNsG/rdNfA7BeGBpqjLnL93YWQXNbeIx2m/yQIT4YA63jkKgqz5p9NOvkjp
 ++JdGX0By1iOMG9SOOFVIOLorohVnYDqrp+klsIuXVJhw3/bvPLcXejRNPuODRoQ
 aw/8nLwHubDvG2lJVgVFmrlofxcfeIbYsf0AE2wiATRjjZ37+YfCdFOpu2E0cMN1
 mLquAHkpTupYr0SfKW1ofhJuxDcvkir7ud9zpqKRxfUh0xFmnCaaDh48FocWpdSG
 MsPdMJ0g01uzzxlkFqKk
 =SovB
 -----END PGP SIGNATURE-----

Merge tag 'drm/dp-aux-for-3.15-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next

drm: DisplayPort AUX framework for v3.15-rc1

This series of patches implements a small framework that abstracts away
some of the functionality that the DisplayPort AUX channel provides. It
comes with a set of generic helpers that use the driver implementations
to reduce code duplication.

* tag 'drm/dp-aux-for-3.15-rc1' of git://anongit.freedesktop.org/tegra/linux:
  drm/dp: Allow registering AUX channels as I2C busses
  drm/dp: Add DisplayPort link helpers
  drm/dp: Add drm_dp_dpcd_read_link_status()
  drm/dp: Add AUX channel infrastructure
2014-02-27 14:30:08 +10:00
Thierry Reding 88759686c7 drm/dp: Allow registering AUX channels as I2C busses
Implements an I2C-over-AUX I2C adapter on top of the generic drm_dp_aux
infrastructure. It extracts the retry logic from existing drivers, which
should help in porting those drivers to this new helper.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v5:
- move comments partially to to header file
- keep MOT set between I2C messages
- return -EPROTO on short reads

Changes in v4:
- fix typo "bitrate" -> "bit rate"

Changes in v3:
- add back DRM_DEBUG_KMS and DRM_ERROR messages
- embed i2c_adapter within struct drm_dp_aux
- fix typo in comment
2014-02-26 17:21:34 +01:00
Thierry Reding 516c0f7c0a drm/dp: Add DisplayPort link helpers
Add a helper to probe a DP link (read out the supported DPCD revision,
maximum rate, link count and capabilities) as well as power up the DP
link and configure it accordingly.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v5:
- export helpers

Changes in v4:
- fix a couple of typos in comments as pointed out by Alex Deucher

Changes in v3:
- split into drm_dp_link_power_up() and drm_dp_link_configure()
- do not change sink state for DPCD versions earlier than 1.1
- sleep for 1-2 ms after setting local sink to D0 state
- read and write consecutive registers where possible
- read DPCD revision when link is probed
- remove duplicate kerneldoc
2014-02-26 17:21:34 +01:00
Thierry Reding 8d4adc6a58 drm/dp: Add drm_dp_dpcd_read_link_status()
The function reads the link status (6 bytes starting at offset 0x202)
from the DPCD so that it can be conveniently passed to other DPCD
helpers.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-02-26 17:21:33 +01:00
Thierry Reding c197db75ff drm/dp: Add AUX channel infrastructure
This is a superset of the current i2c_dp_aux bus functionality and can
be used to transfer native AUX in addition to I2C-over-AUX messages.

Helpers are provided to read and write the DPCD, either blockwise or
byte-wise. Many of the existing helpers for DisplayPort take a copy of a
portion of the DPCD and operate on that, without a way to write data
back to the DPCD (e.g. for configuration of the link).

Subsequent patches will build upon this infrastructure to provide common
functionality in a generic way.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v5:
- move comments partially to struct drm_dp_aux_msg in header file
- return -EPROTO on short reads in DPCD helpers

Changes in v4:
- fix a typo in a comment

Changes in v3:
- reorder drm_dp_dpcd_writeb() arguments to be more intuitive
- return number of bytes transferred in drm_dp_dpcd_write()
- factor out drm_dp_dpcd_access()
- describe error codes
2014-02-26 17:21:32 +01:00
Linus Torvalds cfbf8d4857 Linux 3.14-rc4 2014-02-23 17:40:03 -08:00
Linus Torvalds 7267342995 ARM: SoC fixes for 3.14-rc
A collection of fixes for ARM platforms. Most are fixes for DTS files,
 mostly from DT conversion on OMAP which is still finding a few issues here
 and there.
 
 There's a couple of small stale code removal patches that we usually
 queue for the next release instead, but they seemed harmless enough to
 bring in now.
 
 Also, a fix for backlight on some PXA platforms, and a cache configuration
 fix for Tegra, etc.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJTCgAlAAoJEIwa5zzehBx3J8MP/jFJWHtLHSeSXeKTLEeBV18J
 /M7OG5hKyI38mImPbdJmCHpcTfExTqWuIkvN+6e7QN5PU1V3YSy5XELPh9UIn7zU
 u+Pmt1C4cG8GFEdf03LqaDc4vdtthKUHGUBxQjrA3ZFrR8XZlzAZrnLKU/HA1VF5
 ynaj1cs4Vpf2CGXjM+2ATr5gVhjTs1yldTkG+lHL99JAlSJe7TD3mrANXBRXVVNC
 2yHGEDpDJf8kkBRQZ91xGcVVFw2YWF1avUi3QQ5WltufI+Rtdu8g7ibhakK/nimU
 AfZ3LidjjiTFIGfEi5/2FBim6Tsxpd6wLlchzA6ksPaQ6hk0EVzRPPNzlarmeRO8
 IF5zUPGPXswBeQURXe+OcZIUI4PGS02tshlIUWFPaFM3mZY2djd8Df8Rg20isjOu
 vUYGSL2UY0uLb8NS97scNS9ouGYDp8lV9pHIYlmf6f3Opv6vsw56rWggSsDQDAOk
 wbA2COTtDXxo1tEgbrmevDiaCc8uCDTHKD+uwbxOMCTwLvHHsafRp85BgcCz1z0L
 bOvTbqVhBPW6T47D1ED+ECBo12DbZwA8pth0JSRaf/Fbp6+aMFXp0/d7Hw+ggAxN
 wgEFq/A0M6v+5Y9azo+GLkgqPdH+7twH6eqD8TRgcQdnZXWIuq9UtaNw9Qx4Uusr
 fX9CS2l8ISXgopnRPZCI
 =i7LS
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "A collection of fixes for ARM platforms.  Most are fixes for DTS
  files, mostly from DT conversion on OMAP which is still finding a few
  issues here and there.

  There's a couple of small stale code removal patches that we usually
  queue for the next release instead, but they seemed harmless enough to
  bring in now.

  Also, a fix for backlight on some PXA platforms, and a cache
  configuration fix for Tegra, etc"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (25 commits)
  MAINTAINERS: add additional ARM BCM281xx/BCM11xxx maintainer
  ARM: tegra: only run PL310 init on systems with one
  ARM: tegra: Add head numbers to display controllers
  ARM: imx6: build pm-imx6q.c independently of CONFIG_PM
  ARM: tegra: fix RTC0 alias for Cardhu
  ARM: dove: dt: revert PMU interrupt controller node
  Documentation: dt: OMAP: Update Overo/Tobi
  ARM: dts: Add support for both OMAP35xx and OMAP36xx Overo/Tobi
  ARM: dts: omap3-tobi: Use the correct vendor prefix
  ARM: dts: omap3-tobi: Fix boot with OMAP36xx-based Overo
  ARM: OMAP2+: Remove legacy macros for zoom platforms
  ARM: OMAP2+: Remove MACH_NOKIA_N800
  ARM: dts: N900: add missing compatible property
  ARM: dts: N9/N950: fix boot hang with 3.14-rc1
  ARM: OMAP1: nokia770: enable tahvo-usb
  ARM: OMAP2+: gpmc: fix: DT ONENAND child nodes not probed when MTD_ONENAND is built as module
  ARM: OMAP2+: gpmc: fix: DT NAND child nodes not probed when MTD_NAND is built as module
  ARM: dts: omap3-gta04: Fix mmc1 properties.
  ARM: dts: omap3-gta04: Fix 'aux' gpio key flags.
  ARM: OMAP2+: add missing ARCH_HAS_OPP
  ...
2014-02-23 17:38:04 -08:00
Linus Torvalds 24c8525840 regulator: Fixes for v3.14
Mostly unexciting driver fixes, plus one fix to lower the severity of
 the log message when we don't use an optional regulator - the fixes for
 ACPI system made this come up more often and it was correctly observed
 that it was causing undue concern for users.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTCXZrAAoJELSic+t+oim9W60P/0pfS2LZfE6O0PSjMBC40QAm
 ZR2JQQNxth8sjwcdF/iy8eAotE/AosuD72l11ktdNSMtDv0EqW/VZtp+Pkb8GpNI
 Xocid5clPVg3C4o9lZCEEDsrksbHjqg318G5O5FeWthSF9hfCmVgTcnPufV8HG4A
 j6HKprscZGlNQ0ZMuOVjyQ7MrRr846CzjG8VoWULkGFAIZOQf3y3SOdZcqxn2MDI
 DWNN4lLdu01RWQ2u5Nt5tKLKKJzuHnWI7lprkfMX46PrSA5XX1EMq6o2rc/eC6wT
 M3syR0+98IAwRIA+Uy6VvwbjZLXcIxTSisjN8Pg0Vv0iV2kTNX67TKuTD0EBrrdW
 Lp0r0iI/CsI9B8/oK49Nnr9ZuMf+ECHqKpWLnocwgwB84LKCXlc3/ktLi2mlsGK8
 UwHTgWYi3NQeGPsi+yZw/mcXi6mfuhPCwnObXCmrPiBtnhLd/u4b2Lkgmte6HLJf
 YrChmWAIhcM2hqI3OqVzFw3K3pxnCgqWktp9y8PNW7b18mq9sEBQbrSKCFrFDuX8
 IkPSFkSEN4uxqJzImMzjQOEPGETzEeaz/p4uhVY6cjgqgfcvRQOvg1DoEwcMdeHE
 YTBLjkPJJOClg2cxNCfCpQImlMn9xZo4ypOk5eg6lpzoxpahAyWkbxFTj5D/Ep3W
 RPCi7VzqV/TNWWTB8c+m
 =yvBG
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "Mostly unexciting driver fixes, plus one fix to lower the severity of
  the log message when we don't use an optional regulator - the fixes
  for ACPI system made this come up more often and it was correctly
  observed that it was causing undue concern for users"

* tag 'regulator-v3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: max14577: Fix invalid return value on DT parse success
  regulator: core: Change dummy supplies error message to a warning
  regulator: s5m8767: Add missing of_node_put
  regulator: s5m8767: Use of_get_child_by_name
  regulator: da9063: Bug fix when setting max voltage on LDOs 5-11
2014-02-23 17:37:25 -08:00
Linus Torvalds b2880eb83d Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fix from Thomas Gleixner:
 "Serialize the registration of a new sched_clock in the currently ARM
  only generic sched_clock facilty to avoid sched_clock havoc"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched_clock: Prevent callers from seeing half-updated data
2014-02-23 14:17:08 -08:00
Linus Torvalds 208937fdcf Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:

 - a bugfix which prevents a divide by 0 panic when the newly introduced
   try_msr_calibrate_tsc() fails

 - enablement of the Baytrail platform to utilize the newfangled msr
   based calibration

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86: tsc: Add missing Baytrail frequency to the table
  x86, tsc: Fallback to normal calibration if fast MSR calibration fails
2014-02-23 14:15:46 -08:00
Linus Torvalds 5fe37fcf01 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fixes from Thomas Gleixner:
 "Another four fixlets to tame the ARM orion irq chip"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip: orion: Fix getting generic chip pointer.
  irqchip: orion: clear stale interrupts in irq_startup
  irqchip: orion: use handle_edge_irq on bridge irqs
  irqchip: orion: clear bridge cause register on init
2014-02-23 14:15:08 -08:00
Linus Torvalds f9b080803e USB fixes for 3.14-rc4
Here are a number of USB fixes for reported issues for 3.14-rc4
 
 The majority of these are for USB gadget, phy, and musb driver issues.
 And there's a few new device ids thrown in for good measure.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iEYEABECAAYFAlMJLmIACgkQMUfUDdst+ylvXQCdGw8XA8m783daSRWNhjtSCZdP
 oq8An1mSq7W4Tj82EO91ulB5C9Q7+W4c
 =BixM
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are a number of USB fixes for reported issues for 3.14-rc4

  The majority of these are for USB gadget, phy, and musb driver issues.
  And there's a few new device ids thrown in for good measure"

* tag 'usb-3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  usb: chipidea: need to mask when writting endptflush and endptprime
  usb: musb: correct use of schedule_delayed_work()
  usb: phy: msm: fix compilation errors when !CONFIG_PM_SLEEP
  usb: gadget: fix NULL pointer dereference
  usb: gadget: printer: using gadget_is_otg to check otg support at runtime
  phy: let phy_provider_register be the last step in registering PHY
  phy-core: Don't allow building phy-core as a module
  phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller
  phy-core: phy_get: Leave error logging to the caller
  phy,phy-bcm-kona-usb2.c: Add dependency on HAS_IOMEM
  usb: musb: correct use of schedule_delayed_work()
  usb: musb: do not sleep in atomic context
  USB: serial: option: blacklist interface 4 for Cinterion PHS8 and PXS8
  USB: EHCI: add delay during suspend to prevent erroneous wakeups
  usb: gadget: bcm63xx_udc: fix build failure on DMA channel code
  usb: musb: do not sleep in atomic context
  usb: gadget: s3c2410_udc: Fix build error
  usb: musb: core: Fix remote-wakeup resume
  usb: musb: host: Fix SuperSpeed hub enumeration
  usb: musb: fix obex in g_nokia.ko causing kernel panic
2014-02-23 10:40:22 -08:00