Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 273817c6 authored by Noralf Trønnes's avatar Noralf Trønnes Committed by Gerrit - the friendly Code Review server
Browse files

drm/debugfs: Fix framebuffer debugfs file init

The introduction of: drm/framebuffer: Add framebuffer debugfs file
broke vgem. That patch assumed that all drivers had initialized the
dev->mode_config.fb_lock mutex which happens in drm_mode_config_init().
vgem doesn't need to call drm_mode_config_init().

Fix this by only creating the framebuffer debugfs file for modesetting
drivers.

Fixes: 45d58b40292b ("drm/framebuffer: Add framebuffer debugfs file")
Patch-mainline: 20171113231201.26177-1-noralf@tronnes.org @ 13/11/17, 11:12 p.m.
Link: https://patchwork.freedesktop.org/patch/msgid/20171113231201.26177-1-noralf@tronnes.org


Suggested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
[stalek@codeaurora.org:
1. add missing change due to code conflict
2. drop function call change due to conflict.].

Change-Id: I8a6afb8a47c0f85b03b6148377fb6d120a77c099
Signed-off-by: default avatarShubham Talekar <stalek@codeaurora.org>
parent 76f1be5f
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -164,11 +164,13 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,
		return ret;
	}

	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
		ret = drm_client_debugfs_init(minor);
		if (ret) {
			DRM_ERROR("Failed to create client debugfs file\n");
			return ret;
		}
	}

	if (dev->driver->debugfs_init) {
		ret = dev->driver->debugfs_init(minor);