1. 02 Sep, 2013 4 commits
    • Kristian Høgsberg's avatar
      drm/i915: Support render nodes · 10ba5012
      Kristian Høgsberg authored
      Enable support for drm render nodes for i915 by flagging the ioctls that
      are safe and just needed for rendering.
      
      v2: mark reg_read, set_caching and get_caching (ickle, danvet)
      Signed-off-by: default avatarKristian Høgsberg <krh@bitplanet.net>
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      10ba5012
    • David Herrmann's avatar
      drm: fix DRM_IOCTL_MODE_GETFB handle-leak · 101b96f3
      David Herrmann authored
      DRM_IOCTL_MODE_GETFB is used to retrieve information about a given
      framebuffer ID. It is a read-only helper and was thus declassified for
      unprivileged access in:
      
        commit a14b1b42
        Author: Mandeep Singh Baines <mandeep.baines@gmail.com>
        Date:   Fri Jan 20 12:11:16 2012 -0800
      
            drm: remove master fd restriction on mode setting getters
      
      However, alongside width, height and stride information,
      DRM_IOCTL_MODE_GETFB also passes back a handle to the underlying buffer of
      the framebuffer. This handle allows users to mmap() it and read or write
      into it. Obviously, this should be restricted to DRM-Master.
      
      With the current setup, *any* process with access to /dev/dri/card0 (which
      means any process with access to hardware-accelerated rendering) can
      access the current screen framebuffer and modify it ad libitum.
      
      For backwards-compatibility reasons we want to keep the
      DRM_IOCTL_MODE_GETFB call unprivileged. Besides, it provides quite useful
      information regarding screen setup. So we simply test whether the caller
      is the current DRM-Master and if not, we return 0 as handle, which is
      always invalid. A following DRM_IOCTL_GEM_CLOSE on this handle will fail
      with EINVAL, but we accept this. Users shouldn't test for errors during
      GEM_CLOSE, anyway. And it is still better as a failing MODE_GETFB call.
      
      v2: add capable(CAP_SYS_ADMIN) check for compatibility with i-g-t
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      101b96f3
    • Rob Clark's avatar
      drm/msm: convert to drm_bridge · a3376e3e
      Rob Clark authored
      Drop the msm_connector base class, and special calls to base class
      methods from the encoder, and use instead drm_bridge.  This allows for a
      cleaner division between the hdmi (and in future dsi) blocks, from the
      mdp block.
      Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      a3376e3e
    • Sean Paul's avatar
      drm: Add drm_bridge · 3b336ec4
      Sean Paul authored
      This patch adds the notion of a drm_bridge. A bridge is a chained
      device which hangs off an encoder. The drm driver using the bridge
      should provide the association between encoder and bridge. Once a
      bridge is associated with an encoder, it will participate in mode
      set, and dpms (via the enable/disable hooks).
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: default avatarRob Clark <robdclark@gmail.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      3b336ec4
  2. 01 Sep, 2013 3 commits
    • Dave Airlie's avatar
      drm/nouveau: fix up 32-bit ioctls and device wake up. · 2254f637
      Dave Airlie authored
      Noticed by kbuild test robot.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      2254f637
    • Dave Airlie's avatar
      drm/tegra: fix up page flip flags. · a5b6f74e
      Dave Airlie authored
      This was one level away from where I'd grepped.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      a5b6f74e
    • Dave Airlie's avatar
      Merge branch 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux into drm-next · 9c725e5b
      Dave Airlie authored
      Alex writes:
      This is the radeon drm-next request.  Big changes include:
      - support for dpm on CIK parts
      - support for ASPM on CIK parts
      - support for berlin GPUs
      - major ring handling cleanup
      - remove the old 3D blit code for bo moves in favor of CP DMA or sDMA
      - lots of bug fixes
      
      [airlied: fix up a bunch of conflicts from drm_order removal]
      
      * 'drm-next-3.12' of git://people.freedesktop.org/~agd5f/linux: (898 commits)
        drm/radeon/dpm: make sure dc performance level limits are valid (CI)
        drm/radeon/dpm: make sure dc performance level limits are valid (BTC-SI) (v2)
        drm/radeon: gcc fixes for extended dpm tables
        drm/radeon: gcc fixes for kb/kv dpm
        drm/radeon: gcc fixes for ci dpm
        drm/radeon: gcc fixes for si dpm
        drm/radeon: gcc fixes for ni dpm
        drm/radeon: gcc fixes for trinity dpm
        drm/radeon: gcc fixes for sumo dpm
        drm/radeonn: gcc fixes for rv7xx/eg/btc dpm
        drm/radeon: gcc fixes for rv6xx dpm
        drm/radeon: gcc fixes for radeon_atombios.c
        drm/radeon: enable UVD interrupts on CIK
        drm/radeon: fix init ordering for r600+
        drm/radeon/dpm: only need to reprogram uvd if uvd pg is enabled
        drm/radeon: check the return value of uvd_v1_0_start in uvd_v1_0_init
        drm/radeon: split out radeon_uvd_resume from uvd_v4_2_resume
        radeon kms: fix uninitialised hotplug work usage in r100_irq_process()
        drm/radeon/audio: set up the sads on DCE3.2 asics
        drm/radeon: fix handling of variable sized arrays for router objects
        ...
      
      Conflicts:
      	drivers/gpu/drm/i915/i915_dma.c
      	drivers/gpu/drm/i915/i915_gem_dmabuf.c
      	drivers/gpu/drm/i915/intel_pm.c
      	drivers/gpu/drm/radeon/cik.c
      	drivers/gpu/drm/radeon/ni.c
      	drivers/gpu/drm/radeon/r600.c
      9c725e5b
  3. 30 Aug, 2013 33 commits