Skip to contentSkip to conversation

drm/sti: fix compositor debugfs creation

PATCH Superseded Vincent Abriou 1 participant 1 message Sep 15, 2016

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/sti: fix compositor debugfs creation

Fix typo and issue while creating the vid and mixer debugfs entries.

---
 drivers/gpu/drm/sti/sti_compositor.c | 8 ++++++--
 drivers/gpu/drm/sti/sti_compositor.h | 4 ++--
 drivers/gpu/drm/sti/sti_crtc.c       | 2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)
drivers/gpu/drm/sti/sti_compositor.c +6 -2
index f0c6f0a..b077f88 100644
@@ -55,8 +55,8 @@ struct sti_compositor_data stih416_compositor_data = {
 	},
 };
 
-int sti_compositor_debufs_init(struct sti_compositor *compo,
-			       struct drm_minor *minor)
+int sti_compositor_debugfs_init(struct sti_compositor *compo,
+				struct drm_minor *minor)
 {
 	int ret = 0, i;
 
@@ -64,12 +64,16 @@ int sti_compositor_debufs_init(struct sti_compositor *compo,
 		ret = vid_debugfs_init(compo->vid[i], minor);
 		if (ret)
 			return ret;
+		if (i == (STI_MAX_VID - 1))
+			break;
 	}
 
 	for (i = 0; compo->mixer[i]; i++) {
 		ret = sti_mixer_debugfs_init(compo->mixer[i], minor);
 		if (ret)
 			return ret;
+		if (i == (STI_MAX_MIXER - 1))
+			break;
 	}
 
 	return 0;
drivers/gpu/drm/sti/sti_compositor.h +2 -2
index c9e7e3b..2952a2d 100644
@@ -79,7 +79,7 @@ struct sti_compositor {
 	struct notifier_block vtg_vblank_nb[STI_MAX_MIXER];
 };
 
-int sti_compositor_debufs_init(struct sti_compositor *compo,
-			       struct drm_minor *minor);
+int sti_compositor_debugfs_init(struct sti_compositor *compo,
+				struct drm_minor *minor);
 
 #endif
drivers/gpu/drm/sti/sti_crtc.c +1 -1
index bc1b186..e992bed 100644
@@ -338,7 +338,7 @@ static int sti_crtc_late_register(struct drm_crtc *crtc)
 	struct sti_compositor *compo = dev_get_drvdata(mixer->dev);
 
 	if (drm_crtc_index(crtc) == 0)
-		return sti_compositor_debufs_init(compo, crtc->dev->primary);
+		return sti_compositor_debugfs_init(compo, crtc->dev->primary);
 
 	return 0;
 }
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel