1. 16 3月, 2014 10 次提交
    • D
      Merge branch 'drm-anon' into drm-next · afab4463
      David Herrmann 提交于
      afab4463
    • D
      drm: init TTM dev_mapping in ttm_bo_device_init() · 44d847b7
      David Herrmann 提交于
      With dev->anon_inode we have a global address_space ready for operation
      right from the beginning. Therefore, there is no need to do a delayed
      setup with TTM. Instead, set dev_mapping during initialization in
      ttm_bo_device_init() and remove any "if (dev_mapping)" conditions.
      
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Ben Skeggs <bskeggs@redhat.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
      Cc: Alex Deucher <alexdeucher@gmail.com>
      Cc: Thomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      44d847b7
    • D
      drm: use anon-inode instead of relying on cdevs · 6796cb16
      David Herrmann 提交于
      DRM drivers share a common address_space across all character-devices of a
      single DRM device. This allows simple buffer eviction and mapping-control.
      However, DRM core currently waits for the first ->open() on any char-dev
      to mark the underlying inode as backing inode of the device. This delayed
      initialization causes ugly conditions all over the place:
        if (dev->dev_mapping)
          do_sth();
      
      To avoid delayed initialization and to stop reusing the inode of the
      char-dev, we allocate an anonymous inode for each DRM device and reset
      filp->f_mapping to it on ->open().
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      6796cb16
    • D
      drm: add pseudo filesystem for shared inodes · 31bbe16f
      David Herrmann 提交于
      Our current DRM design uses a single address_space for all users of the
      same DRM device. However, there is no way to create an anonymous
      address_space without an underlying inode. Therefore, we wait for the
      first ->open() callback on a registered char-dev and take-over the inode
      of the char-dev. This worked well so far, but has several drawbacks:
       - We screw with FS internals and rely on some non-obvious invariants like
         inode->i_mapping being the same as inode->i_data for char-devs.
       - We don't have any address_space prior to the first ->open() from
         user-space. This leads to ugly fallback code and we cannot allocate
         global objects early.
      
      As pointed out by Al-Viro, fs/anon_inode.c is *not* supposed to be used by
      drivers for anonymous inode-allocation. Therefore, this patch follows the
      proposed alternative solution and adds a pseudo filesystem mount-point to
      DRM. We can then allocate private inodes including a private address_space
      for each DRM device at initialization time.
      
      Note that we could use:
        sysfs_get_inode(sysfs_mnt->mnt_sb, drm_device->dev->kobj.sd);
      to get access to the underlying sysfs-inode of a "struct device" object.
      However, most of this information is currently hidden and it's not clear
      whether this address_space is suitable for driver access. Thus, unless
      linux allows anonymous address_space objects or driver-core provides a
      public inode per device, we're left with our own private internal mount
      point.
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      31bbe16f
    • D
      drm/gem: dont init "ret" in drm_gem_mmap() · a8469aa8
      David Herrmann 提交于
      There is no need to initialize this variable, so drop it. Otherwise, the
      compiler won't warn if we use it unintialized.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      a8469aa8
    • D
      drm/crtc: add sanity checks to create_dumb() · b28cd41f
      David Herrmann 提交于
      Lets make sure some basic expressions are always true:
        bpp != NULL
        width != NULL
        height != NULL
        stride = bpp * width < 2^32
        size = stride * height < 2^32
        PAGE_ALIGN(size) < 2^32
      
      At least the udl driver doesn't check for multiplication-overflows, so
      lets just make sure it will never happen. These checks allow drivers to do
      any 32bit math without having to test for mult-overflows themselves.
      
      The two divisions might hurt performance a bit, but dumb_create() is only
      used for scanout-buffers, so that should be fine. We could use 64bit math
      to avoid the divisions, but that may be slow on 32bit machines.. Or maybe
      there should just be a "safe_mult32()" helper, which currently doesn't
      exist (I think?).
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      b28cd41f
    • D
      drm/gem: free vma-node during object-cleanup · 77472347
      David Herrmann 提交于
      All drivers currently need to clean up the vma-node manually. There is no
      fancy logic involved so lets just clean it up unconditionally. The
      vma-manager correctly catches multiple calls so we are fine.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      77472347
    • D
      drm/gem: fix indentation · 16d2831d
      David Herrmann 提交于
      Remove double-whitespace and wrong indentation.
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      16d2831d
    • D
      drm/udl: fix Bpp calculation in dumb_create() · 2b932d8e
      David Herrmann 提交于
      Probably a typo.. we obviously need "(bpp + 7) / 8" instead of
      "(bpp + 1) / 8". Unlikely to be hit in any sane code, but lets be safe.
      Use DIV_ROUND_UP() to avoid the problem entirely and make the core more
      readable.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      2b932d8e
    • D
      drm/udl: fix error-path when damage-req fails · 06c99161
      David Herrmann 提交于
      We need to call dma_buf_end_cpu_access() in case a damage-request.
      Unlikely, but might happen during device unplug.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDavid Herrmann <dh.herrmann@gmail.com>
      06c99161
  2. 05 3月, 2014 1 次提交
    • D
      Merge branch 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux into drm-next · 786a7828
      Dave Airlie 提交于
      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
      786a7828
  3. 04 3月, 2014 2 次提交
    • C
      drm/radeon: remove struct radeon_bo_list · df0af440
      Christian König 提交于
      Just move all fields into radeon_cs_reloc, removing unused/duplicated fields.
      Signed-off-by: NChristian König <christian.koenig@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      df0af440
    • D
      Merge tag 'drm-intel-next-2014-02-14' of ssh://git.freedesktop.org/git/drm-intel into drm-next · 4d33f3aa
      Dave Airlie 提交于
      - 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
        ...
      4d33f3aa
  4. 03 3月, 2014 13 次提交
  5. 28 2月, 2014 3 次提交
  6. 27 2月, 2014 8 次提交
    • D
      Merge branch 'drm-next-3.15' of git://people.freedesktop.org/~deathsimple/linux into drm-next · 4d538b79
      Dave Airlie 提交于
      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
      4d538b79
    • D
      Merge branch 'tda998x-devel' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-next · c48cdd23
      Dave Airlie 提交于
      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
      c48cdd23
    • D
      Merge tag 'drm-intel-next-2014-02-07' of ssh://git.freedesktop.org/git/drm-intel into drm-next · 3e09dcd5
      Dave Airlie 提交于
      - 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
      3e09dcd5
    • D
      Merge tag 'drm/dp-aux-for-3.15-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next · 6ba6b7cd
      Dave Airlie 提交于
      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
      6ba6b7cd
    • T
      drm/dp: Allow registering AUX channels as I2C busses · 88759686
      Thierry Reding 提交于
      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: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NThierry 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
      88759686
    • T
      drm/dp: Add DisplayPort link helpers · 516c0f7c
      Thierry Reding 提交于
      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: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NThierry 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
      516c0f7c
    • T
      drm/dp: Add drm_dp_dpcd_read_link_status() · 8d4adc6a
      Thierry Reding 提交于
      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: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      8d4adc6a
    • T
      drm/dp: Add AUX channel infrastructure · c197db75
      Thierry Reding 提交于
      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: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NThierry 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
      c197db75
  7. 24 2月, 2014 3 次提交
    • L
      Linux 3.14-rc4 · cfbf8d48
      Linus Torvalds 提交于
      cfbf8d48
    • L
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 72673429
      Linus Torvalds 提交于
      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
        ...
      72673429
    • L
      Merge tag 'regulator-v3.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 24c85258
      Linus Torvalds 提交于
      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
      24c85258