Module Name:    src
Committed By:   riastradh
Date:           Thu Jul 24 21:36:39 UTC 2014

Modified Files:
        src/sys/external/bsd/drm2/dist/drm: drm_fb_helper.c
        src/sys/external/bsd/drm2/dist/include/drm: drm_fb_helper.h

Log Message:
Expose drm fb helpers for ddb enter/exit.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c
cvs rdiff -u -r1.5 -r1.6 \
    src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c
diff -u src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c:1.6 src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c:1.7
--- src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c:1.6	Wed Jul 16 20:56:24 2014
+++ src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c	Thu Jul 24 21:36:39 2014
@@ -173,7 +173,6 @@ static int drm_fb_helper_parse_command_l
 }
 #endif
 
-#ifndef __NetBSD__		/* XXX fb info */
 static void drm_fb_helper_save_lut_atomic(struct drm_crtc *crtc, struct drm_fb_helper *helper)
 {
 	uint16_t *r_base, *g_base, *b_base;
@@ -208,9 +207,16 @@ static void drm_fb_helper_restore_lut_at
  * drm_fb_helper_debug_enter - implementation for ->fb_debug_enter
  * @info: fbdev registered by the helper
  */
+#ifndef __NetBSD__
 int drm_fb_helper_debug_enter(struct fb_info *info)
 {
-	struct drm_fb_helper *helper = info->par;
+	return drm_fb_helper_debug_enter_fb(info->par);
+}
+#endif
+
+int
+drm_fb_helper_debug_enter_fb(struct drm_fb_helper *helper)
+{
 	struct drm_crtc_helper_funcs *funcs;
 	int i;
 
@@ -257,9 +263,16 @@ static struct drm_framebuffer *drm_mode_
  * drm_fb_helper_debug_leave - implementation for ->fb_debug_leave
  * @info: fbdev registered by the helper
  */
+#ifndef __NetBSD__
 int drm_fb_helper_debug_leave(struct fb_info *info)
 {
-	struct drm_fb_helper *helper = info->par;
+	return drm_fb_helper_debug_leave_fb(info->par);
+}
+#endif
+
+int
+drm_fb_helper_debug_leave_fb(struct drm_fb_helper *helper)
+{
 	struct drm_crtc *crtc;
 	struct drm_crtc_helper_funcs *funcs;
 	struct drm_framebuffer *fb;
@@ -287,7 +300,6 @@ int drm_fb_helper_debug_leave(struct fb_
 	return 0;
 }
 EXPORT_SYMBOL(drm_fb_helper_debug_leave);
-#endif
 
 /**
  * drm_fb_helper_restore_fbdev_mode - restore fbdev configuration

Index: src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h
diff -u src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.5 src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.6
--- src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.5	Thu Jul 24 21:18:40 2014
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h	Thu Jul 24 21:36:39 2014
@@ -139,6 +139,8 @@ int drm_fb_helper_single_add_all_connect
 int drm_fb_helper_debug_enter(struct fb_info *info);
 int drm_fb_helper_debug_leave(struct fb_info *info);
 #endif
+int drm_fb_helper_debug_enter_fb(struct drm_fb_helper *fb_helper);
+int drm_fb_helper_debug_leave_fb(struct drm_fb_helper *fb_helper);
 struct drm_display_mode *
 drm_has_preferred_mode(struct drm_fb_helper_connector *fb_connector,
 			int width, int height);

Reply via email to