1. May 19, 2016
    • Dave Airlie's avatar
      Merge tag 'topic/drm-misc-2016-05-18' of git://anongit.freedesktop.org/drm-intel into drm-next · 24e04d72
      Dave Airlie authored
      Update drm-misc pull with a few more fixes included, plus the two from
      Arnd for the fallout from the drm_gem_object_lookup() refactor that I
      failed to spot :(
      
      * tag 'topic/drm-misc-2016-05-18' of git://anongit.freedesktop.org/drm-intel:
        drm: remove unused dev variables
        drm: mediatek: fixup drm_gem_object_lookup API change
        drm/tegra: Fix crash caused by reference count imbalance
        drm: Fix error handling in drm_connector_register
        drm: Avoid connector reference imbalance on error path
        drm/fb_helper: Fix references to dev->mode_config.num_connector
        drm/i915/fbdev: Fix num_connector references in intel_fb_initial_config()
        qxl: catch qxlfb_create_pinned_object failures
        drm/exynos/hdmi: add a missing tab
        drm/fb-cma-helper: Add function drm_fb_cma_create_with_funcs()
        drm/fb-cma-helper: Use const for drm_framebuffer_funcs argument
        drm: Drop connector argument from __drm_atomic_helper_connector_destroy_state
        drm: Drop plane argument from __drm_atomic_helper_plane_destroy_state
        drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_state
        drm: Remove unused drm_device from drm_gem_object_lookup()
      24e04d72
    • Arnd Bergmann's avatar
      drm: remove unused dev variables · c6740c9c
      Arnd Bergmann authored
      
      
      After drm_gem_object_lookup() was changed along with all its callers,
      we have several drivers that have unused variables:
      
      drm/armada/armada_crtc.c: In function 'armada_drm_crtc_cursor_set':
      drm/armada/armada_crtc.c:900:21: error: unused variable 'dev' [-Werror=unused-variable]
      drm/nouveau/nouveau_gem.c: In function 'validate_init':
      drm/nouveau/nouveau_gem.c:371:21: error: unused variable 'dev' [-Werror=unused-variable]
      drm/nouveau/nv50_display.c: In function 'nv50_crtc_cursor_set':
      drm/nouveau/nv50_display.c:1308:21: error: unused variable 'dev' [-Werror=unused-variable]
      drm/radeon/radeon_cs.c: In function 'radeon_cs_parser_relocs':
      drm/radeon/radeon_cs.c:77:21: error: unused variable 'ddev' [-Werror=unused-variable]
      
      This fixes all the instances I found with ARM randconfig builds so far.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: a8ad0bd8
      
       ("drm: Remove unused drm_device from drm_gem_object_lookup()")
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463587653-3035181-6-git-send-email-arnd@arndb.de
      c6740c9c
    • Arnd Bergmann's avatar
      drm: mediatek: fixup drm_gem_object_lookup API change · de4ae068
      Arnd Bergmann authored
      
      
      The drm_gem_object_lookup() function prototype changed while this
      driver was added, so it fails to build now:
      
      drivers/gpu/drm/mediatek/mtk_drm_gem.c: In function 'mtk_drm_gem_dumb_map_offset':
      drivers/gpu/drm/mediatek/mtk_drm_gem.c:142:30: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
        obj = drm_gem_object_lookup(dev, file_priv, handle);
      
      This fixes the new caller as well.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Fixes: a8ad0bd8
      
       ("drm: Remove unused drm_device from drm_gem_object_lookup()")
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463587653-3035181-4-git-send-email-arnd@arndb.de
      de4ae068
    • Jon Hunter's avatar
      drm/tegra: Fix crash caused by reference count imbalance · 280dc0e1
      Jon Hunter authored
      Commit d2307dea ("drm/atomic: use connector references (v3)") added
      reference counting for DRM connectors and this caused a crash when
      exercising system suspend on Tegra114 Dalmore.
      
      The Tegra DSI driver implements a Tegra specific function,
      tegra_dsi_connector_duplicate_state(), to duplicate the connector state
      and destroys the state using the generic helper function,
      drm_atomic_helper_connector_destroy_state(). Following commit
      d2307dea ("drm/atomic: use connector references (v3)") there is
      now an imbalance in the connector reference count because the Tegra
      function to duplicate state does not take a reference when duplicating
      the state information. However, the generic helper function to destroy
      the state information assumes a reference has been taken and during
      system suspend, when the connector state is destroyed, this leads to a
      crash because we attempt to put the reference for an object that has
      already been freed.
      
      Fix this by calling __drm_atomic_helper_connector_duplicate_state() from
      tegra_dsi_connector_duplicate_state() to ensure that we take a reference
      on a connector if crtc is set. Note that this will also copy the
      connector state a 2nd time, but this should be harmless.
      
      By fixing tegra_dsi_connector_duplicate_state() to take a reference,
      although a crash was no longer seen, it was then observed that after
      each system suspend-resume cycle, the reference would be one greater
      than before the suspend-resume cycle. Following commit d2307dea
      ("drm/atomic: use connector references (v3)"), it was found that we
      also need to put the reference when calling the function
      tegra_dsi_connector_reset() before freeing the state. Fix this by
      updating tegra_dsi_connector_reset() to call the function
      __drm_atomic_helper_connector_destroy_state() in order to put the
      reference for the connector.
      
      Fixes: d2307dea
      
       ("drm/atomic: use connector references (v3)")
      
      Signed-off-by: default avatarJon Hunter <jonathanh@nvidia.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463585856-16606-1-git-send-email-jonathanh@nvidia.com
      280dc0e1
  2. May 18, 2016
  3. May 17, 2016
  4. May 13, 2016