- May 19, 2016
-
-
git://anongit.freedesktop.org/drm-intelDave 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()
-
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:
Arnd Bergmann <arnd@arndb.de> Fixes: a8ad0bd8 ("drm: Remove unused drm_device from drm_gem_object_lookup()") Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463587653-3035181-6-git-send-email-arnd@arndb.de
-
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:
Arnd Bergmann <arnd@arndb.de> Fixes: a8ad0bd8 ("drm: Remove unused drm_device from drm_gem_object_lookup()") Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463587653-3035181-4-git-send-email-arnd@arndb.de
-
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:
Jon Hunter <jonathanh@nvidia.com> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463585856-16606-1-git-send-email-jonathanh@nvidia.com
-
- May 18, 2016
-
-
Daniel Vetter authored
When debugfs or sysfs registration failed, we failed to clean up the idr registration. Reorder to fix this. Cc: Dave Airlie <airlied@gmail.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Reviewed-by:
Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462539302-27764-1-git-send-email-daniel.vetter@ffwll.ch
-
Chris Wilson authored
Whilst looking at the fallout from using connector references for atomic, I noticed that there is an early return buried in drm_atomic_set_crtc_for_connector() that if hit could cause us to leak a reference on the connector. Fixes: d2307dea (drm/atomic: use connector references (v3)) Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Stone <daniels@collabora.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462535265-13058-1-git-send-email-chris@chris-wilson.co.uk
-
- May 17, 2016
-
-
Lyude authored
During boot, MST hotplugs are generally expected (even if no physical hotplugging occurs) and result in DRM's connector topology changing. This means that using num_connector from the current mode configuration can lead to the number of connectors changing under us. This can lead to some nasty scenarios in fbcon: - We allocate an array to the size of dev->mode_config.num_connectors. - MST hotplug occurs, dev->mode_config.num_connectors gets incremented. - We try to loop through each element in the array using the new value of dev->mode_config.num_connectors, and end up going out of bounds since dev->mode_config.num_connectors is now larger then the array we allocated. fb_helper->connector_count however, will always remain consistent while we do a modeset in fb_helper. Note: This is just polish for 4.7, Dave Airlie's drm_connector refcounting fixed these bugs for real. But it's good enough duct-tape for stable kernel backporting, since backporting the refcounting changes is way too invasive. Cc: stable@vger.kernel.org Signed-off-by:
Lyude <cpaul@redhat.com> [danvet: Clarify why we need this. Also remove the now unused "dev" local variable to appease gcc.] Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463065021-18280-3-git-send-email-cpaul@redhat.com
-
Lyude authored
During boot time, MST devices usually send a ton of hotplug events irregardless of whether or not any physical hotplugs actually occurred. Hotplugs mean connectors being created/destroyed, and the number of DRM connectors changing under us. This isn't a problem if we use fb_helper->connector_count since we only set it once in the code, however if we use num_connector from struct drm_mode_config we risk it's value changing under us. On top of that, there's even a chance that dev->mode_config.num_connector != fb_helper->connector_count. If the number of connectors happens to increase under us, we'll end up using the wrong array size for memcpy and start writing beyond the actual length of the array, occasionally resulting in kernel panics. Note: This is just polish for 4.7, Dave Airlie's drm_connector refcounting fixed these bugs for real. But it's good enough duct-tape for stable kernel backporting, since backporting the refcounting changes is way too invasive. Cc: stable@vger.kernel.org Signed-off-by:
Lyude <cpaul@redhat.com> [danvet: Clarify why we need this.] Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463065021-18280-2-git-send-email-cpaul@redhat.com
-
Gerd Hoffmann authored
Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463072816-11788-1-git-send-email-kraxel@redhat.com
-
Dan Carpenter authored
Smatch warns that the if statement isn't indented. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20160512195457.GA19095@mwanda
-
Noralf Trønnes authored
Add drm_fb_cma_create_with_funcs() for drivers that need to set the dirty() callback. Signed-off-by:
Noralf Trønnes <noralf@tronnes.org> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463077523-23959-3-git-send-email-noralf@tronnes.org
-
Noralf Trønnes authored
drm_framebuffer_init() uses const for the drm_framebuffer_funcs argument so use that on drm_fb_cma_alloc() and drm_fbdev_cma_create_with_funcs() as well. Cc: laurent.pinchart@ideasonboard.com Signed-off-by:
Noralf Trønnes <noralf@tronnes.org> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463077523-23959-2-git-send-email-noralf@tronnes.org
-
Daniel Vetter authored
It's unused, and really this helper should only look at the state structure and nothing else. Note that this conflicts with a patch from Dave that adds refcounting to drm_connectors. It's not yet clear whether the check Dave adds for connector != NULL is really needed or the right check. v2: Fix commmit message (Laurent). Cc: Dave Airlie <airlied@gmail.com> Acked-by:
Thierry Reding <thierry.reding@gmail.com> Acked-by:
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-3-git-send-email-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
It's unused, and really this helper should only look at the state structure and nothing else. v2: Fix commit message (Laurent). v3: Rebase onto mtk driver merge. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Mark Yao <mark.yao@rock-chips.com> Acked-by:
Thierry Reding <thierry.reding@gmail.com> Acked-by:
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by:
Eric Anholt <eric@anholt.net> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-2-git-send-email-daniel.vetter@ffwll.ch
-
Daniel Vetter authored
It's unused, and really this helper should only look at the state structure and nothing else. v2: Rebase on top of rockchip changes v3: Drop unrelated hunk, spotted by Laurent. v4: Rebase onto mtk driver merge. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Mark Yao <mark.yao@rock-chips.com> Acked-by:
Thierry Reding <thierry.reding@gmail.com> Acked-by:
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by:
Eric Anholt <eric@anholt.net> Signed-off-by:
Daniel Vetter <daniel.vetter@intel.com> Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-1-git-send-email-daniel.vetter@ffwll.ch
-
Chris Wilson authored
drm_gem_object_lookup() has never required the drm_device for its file local translation of the user handle to the GEM object. Let's remove the unused parameter and save some space. Signed-off-by:
Chris Wilson <chris@chris-wilson.co.uk> Cc: dri-devel@lists.freedesktop.org Cc: Dave Airlie <airlied@redhat.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> [danvet: Fixup kerneldoc too.] Signed-off-by:
Daniel Vetter <daniel.vetter@ffwll.ch>
-
https://github.com/evelikov/linuxDave Airlie authored
Not the biggest fan of doing it this way, but what the hell. * 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux: (22 commits) drm/vmwgfx: add extern C guard for the UAPI header drm/virgl: add extern C guard for the UAPI header drm/via: add extern C guard for the UAPI header drm/vc4: add extern C guard for the UAPI header drm/tegra: add extern C guard for the UAPI header drm/sis: add extern C guard for the UAPI header drm/savage: add extern C guard for the UAPI header drm/radeon: add extern C guard for the UAPI header drm/r128: add extern C guard for the UAPI header drm/qxl: add extern C guard for the UAPI header drm/omap: add extern C guard for the UAPI header drm/nouveau: drop drm/ prefix from include drm/nouveau: add extern C guard for the UAPI header drm/msm: add extern C guard for the UAPI header drm/mga: add extern C guard for the UAPI header drm/i915: add extern C guard for the UAPI header drm/i810: add extern C guard for the UAPI header drm/exynos: add extern C guard for the UAPI header drm/etnaviv: add extern C guard for the UAPI header drm: add extern C guard for the UAPI headers ...
-
git://anongit.freedesktop.org/drm-intelDave Airlie authored
I kinda hoped that I could still sneak in Noralf's drm_simple_display_pipe, since there's intereset by others now (for tilcdc at least). But it wasn't ready by a hair. Oh well. Otherwise random stuff plus prep patches from Noralf. * tag 'topic/drm-misc-2016-05-13' of git://anongit.freedesktop.org/drm-intel: drm/atomic: Add drm_atomic_helper_best_encoder() drm/atomic: Don't skip drm_bridge_*() calls if !drm_encoder_helper_funcs drm/fb-cma-helper: Hook up to DocBook and fix some docs drm/fb-helper: Remove mention of CONFIG_FB_DEFERRED_IO in docs drm/sti: include linux/seq_file.h where needed drm/tegra: Use lockless gem BO free callback drm/exynos: Use lockless gem BO free callback drm: Make drm_encoder_helper_funcs optional
-
Dave Airlie authored
Merge branch 'topic-arcpgu-updates' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux into drm-next Please pull this mini-series that allows ARC PGU to use dedicated memory location as framebuffer backing storage. * 'topic-arcpgu-updates' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux: ARC: [axs10x] Specify reserved memory for frame buffer drm/arcpgu: use dedicated memory area for frame buffer
-
- May 13, 2016
-
-
Emil Velikov authored
Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Brian Paul <brianp@vmware.com> Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Acked-by:
Sinclair Yeh <syeh@vmware.com>
-
Emil Velikov authored
Cc: Dave Airlie <airlied@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Cc: Eric Anholt <eric@anholt.net> Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Cc: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Acked-by:
Thierry Reding <treding@nvidia.com>
-
Emil Velikov authored
Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Acked-by:
Tomi Valkeinen <tomi.valkeinen@ti.com>
-
Emil Velikov authored
Similar to the rest of the DRM UAPI - these are to be imported unmodified into libdrm. In current form that's impossible. Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Acked-by:
Ben Skeggs <bskeggs@redhat.com>
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Acked-by:
Ben Skeggs <bskeggs@redhat.com>
-
Emil Velikov authored
Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robdclark@gmail.com> (over irc)
-
Emil Velikov authored
Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Cc: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Acked-by:
Daniel Vetter <daniel.vetter@intel.com>
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Acked-by:
Daniel Vetter <daniel.vetter@ffwll.ch>
-
Emil Velikov authored
Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Acked-by:
Christian Gmeiner <christian.gmeiner@gmail.com> Acked-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Emil Velikov authored
Signed-off-by:Emil Velikov <emil.l.velikov@gmail.com>
-
Emil Velikov authored
Signed-off-by:
Emil Velikov <emil.l.velikov@gmail.com> Acked-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-