diff mbox

drm/debugfs: Fix framebuffer debugfs file init

Message ID 20171113231201.26177-1-noralf@tronnes.org (mailing list archive)
State New, archived
Headers show

Commit Message

Noralf Trønnes Nov. 13, 2017, 11:12 p.m. UTC
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")
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/drm_debugfs.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Dave Airlie Nov. 14, 2017, 7:45 a.m. UTC | #1
On 14 November 2017 at 09:12, Noralf Trønnes <noralf@tronnes.org> wrote:
> 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")
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>

Reviewed-by: Dave Airlie <airlied@redhat.com>

Can someone pushed this to drm-misc, I think it's blocking the intel CI ppl.

Dave.
Jani Nikula Nov. 14, 2017, 10:11 a.m. UTC | #2
On Tue, 14 Nov 2017, Dave Airlie <airlied@gmail.com> wrote:
> On 14 November 2017 at 09:12, Noralf Trønnes <noralf@tronnes.org> wrote:
>> 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")
>> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
>> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
>
> Reviewed-by: Dave Airlie <airlied@redhat.com>
>
> Can someone pushed this to drm-misc, I think it's blocking the intel CI ppl.

Pushed, thanks for the patch and review.

On the one hand, we badly need to have CI running on non-Intel drm core
patches too. On the other hand, I'm still not sure if we're producing
good enough results yet to expose to all of drm. The false negatives are
too frequent I fear.

BR,
Jani.


>
> Dave.
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index 550f29de6c1f..b2482818fee8 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -158,10 +158,12 @@  int drm_debugfs_init(struct drm_minor *minor, int minor_id,
 		}
 	}
 
-	ret = drm_framebuffer_debugfs_init(minor);
-	if (ret) {
-		DRM_ERROR("Failed to create framebuffer debugfs file\n");
-		return ret;
+	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+		ret = drm_framebuffer_debugfs_init(minor);
+		if (ret) {
+			DRM_ERROR("Failed to create framebuffer debugfs file\n");
+			return ret;
+		}
 	}
 
 	if (dev->driver->debugfs_init) {