public inbox for dri-devel@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/debugfs: Fix framebuffer debugfs file init
@ 2017-11-13 23:12 Noralf Trønnes
  2017-11-14  7:45 ` Dave Airlie
  0 siblings, 1 reply; 3+ messages in thread
From: Noralf Trønnes @ 2017-11-13 23:12 UTC (permalink / raw)
  To: dri-devel, intel-gfx

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(-)

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) {
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/debugfs: Fix framebuffer debugfs file init
  2017-11-13 23:12 [PATCH] drm/debugfs: Fix framebuffer debugfs file init Noralf Trønnes
@ 2017-11-14  7:45 ` Dave Airlie
  2017-11-14 10:11   ` Jani Nikula
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Airlie @ 2017-11-14  7:45 UTC (permalink / raw)
  To: Noralf Trønnes; +Cc: intel-gfx@lists.freedesktop.org, dri-devel

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.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/debugfs: Fix framebuffer debugfs file init
  2017-11-14  7:45 ` Dave Airlie
@ 2017-11-14 10:11   ` Jani Nikula
  0 siblings, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2017-11-14 10:11 UTC (permalink / raw)
  To: Dave Airlie, Noralf Trønnes
  Cc: intel-gfx@lists.freedesktop.org, dri-devel

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

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-14 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-13 23:12 [PATCH] drm/debugfs: Fix framebuffer debugfs file init Noralf Trønnes
2017-11-14  7:45 ` Dave Airlie
2017-11-14 10:11   ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox