1. 13 3月, 2014 2 次提交
    • D
      drm/doc: Repleace LOCKING kerneldoc sections in drm_modes.c · 63951385
      Daniel Vetter 提交于
      There's not really any value in stating that no locking is needed. And
      even if the comment is useful, a check for the right mutex at the
      beginning of the function is better since that can't be ingored as
      easily as a bit of documentation.
      
      Note that drm_mode_probed_add in drm_crtc.c is also changed, the next
      patch will move this into drm_modes.c
      
      v2: Don't add locking WARN_ONs where it is not strictly required (i.e.
      the two functions to validate/prune mode lists).
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      63951385
    • D
      drm/kms: rip out drm_mode_connector_detach_encoder · 69fa5293
      Daniel Vetter 提交于
      It's only used by imx, and that one gets it wrong - there's no need
      to deteach the encoder before removing it.
      
      And really, neither current drm modesetting code nor all the userspace
      we have can handle dynamic changes in the set of possible encoders for
      a given connector. So let's just remove this before someone starts
      doing something really nasty with it.
      
      As a plus, one less kerneldoc comment to write.
      
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      69fa5293
  2. 13 2月, 2014 1 次提交
  3. 14 1月, 2014 1 次提交
  4. 18 12月, 2013 1 次提交
  5. 06 11月, 2013 3 次提交
  6. 23 10月, 2013 1 次提交
  7. 01 10月, 2013 6 次提交
  8. 04 9月, 2013 1 次提交
  9. 02 9月, 2013 2 次提交
    • D
      drm: fix DRM_IOCTL_MODE_GETFB handle-leak · 101b96f3
      David Herrmann 提交于
      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: NDavid Herrmann <dh.herrmann@gmail.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      101b96f3
    • S
      drm: Add drm_bridge · 3b336ec4
      Sean Paul 提交于
      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: NSean Paul <seanpaul@chromium.org>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      3b336ec4
  10. 30 8月, 2013 2 次提交
  11. 21 8月, 2013 2 次提交
  12. 19 8月, 2013 1 次提交
  13. 28 6月, 2013 1 次提交
    • D
      drm: add hotspot support for cursors. · 4c813d4d
      Dave Airlie 提交于
      So it looks like for virtual hw cursors on QXL we need to inform
      the "hw" device what the cursor hotspot parameters are. This
      makes sense if you think the host has to draw the cursor and interpret
      clicks from it. However the current modesetting interface doesn't support
      passing the hotspot information from userspace.
      
      This implements a new cursor ioctl, that takes the hotspot info as well,
      userspace can try calling the new interface and if it gets -ENOSYS it means
      its on an older kernel and can just fallback.
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      4c813d4d
  14. 25 6月, 2013 2 次提交
    • D
      drm: fix fb leak in setcrtc · 5cef29aa
      Daniel Vetter 提交于
      Drivers are allowed (actually have to) disable unrelated crtcs in
      their ->set_config callback (when we steal all the connectors from
      that crtc). If they do that they'll clear crtc->fb to NULL.
      
      Which results in a refcount leak, since the drm core is keeping track
      of that reference.
      
      To fix this track the old fb of all crtcs and adjust references for
      all of them. Of course, since we only hold an additional reference for
      the fb for the current crtc we need to increase refcounts before we
      drop the old one.
      
      This approach has the benefit that it inches us a bit closer to an
      atomic modeset world, where we want to update the config of all crtcs
      in one step.
      
      This regression has been introduce in the framebuffer refcount
      conversion, specifically in
      
      commit b0d12325
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Tue Dec 11 01:07:12 2012 +0100
      
          drm: refcounting for crtc framebuffers
      Reported-by: NRussell King <linux@arm.linux.org.uk>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      5cef29aa
    • D
      drm: check that ->set_config properly updates the fb · cc85e121
      Daniel Vetter 提交于
      Historically drm lacked fb refcounting, so the updating of crtc->fb
      was done by the lower levels at a point convenient to get their own
      refcounting (e.g. refcounts for the underlying gem bo, pinning
      refcounts) right. With the introduction of refcounted fbs the drm core
      handled the fb refcounts, but still relied on drivers to update the
      crtc->fb pointer (this approach required the least invasive changes in
      drivers).
      
      Enforce this contract with a WARN_ON.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      cc85e121
  15. 17 6月, 2013 3 次提交
  16. 11 6月, 2013 4 次提交
  17. 13 5月, 2013 1 次提交
  18. 03 5月, 2013 1 次提交
  19. 30 4月, 2013 2 次提交
    • V
      drm: Kill user_modes list and the associated ioctls · c55b6b3d
      Ville Syrjälä 提交于
      There is no way to use modes added to the user_modes list. We never
      look at the contents of said list in the kernel, and the only operations
      userspace can do are attach and detach. So the only "benefit" of this
      interface is wasting kernel memory.
      
      Fortunately it seems no real user space application ever used these
      ioctls. So just kill them.
      
      Also remove the prototypes for the non-existing drm_mode_addmode_ioctl()
      and drm_mode_rmmode_ioctl() functions.
      
      v2: Use drm_noop instead of completely removing the ioctls
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      c55b6b3d
    • V
      drm: Silence some sparse warnings · ea9cbb06
      Ville Syrjälä 提交于
      drivers/gpu/drm/drm_pci.c:155:5: warning: symbol 'drm_pci_set_busid' was not declared. Should it be static?
      drivers/gpu/drm/drm_pci.c:197:5: warning: symbol 'drm_pci_set_unique' was not declared. Should it be static?
      drivers/gpu/drm/drm_pci.c:269:5: warning: symbol 'drm_pci_agp_init' was not declared. Should it be static?
      
      drivers/gpu/drm/drm_crtc.c:181:1: warning: symbol 'drm_get_dirty_info_name' was not declared. Should it be static?
      drivers/gpu/drm/drm_crtc.c:1123:5: warning: symbol 'drm_mode_group_init' was not declared. Should it be static?
      
      drivers/gpu/drm/drm_modes.c:918:6: warning: symbol 'drm_mode_validate_clocks' was not declared. Should it be static?
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      ea9cbb06
  20. 22 4月, 2013 1 次提交
  21. 16 4月, 2013 1 次提交
  22. 12 4月, 2013 1 次提交