Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 09:52:25 UTC 2021

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:
Restore drm_fb_helper_debug_{enter,leave}_fb

the non-fbinfo versions of the same function now that I see why
they exist, and that they are not a mangled diff

Author: Maya Rashish <m...@netbsd.org>


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c
cvs rdiff -u -r1.12 -r1.13 \
    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.22 src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c:1.23
--- src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c:1.22	Sun Dec 19 09:46:33 2021
+++ src/sys/external/bsd/drm2/dist/drm/drm_fb_helper.c	Sun Dec 19 09:52:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_fb_helper.c,v 1.22 2021/12/19 09:46:33 riastradh Exp $	*/
+/*	$NetBSD: drm_fb_helper.c,v 1.23 2021/12/19 09:52:24 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2006-2009 Red Hat Inc.
@@ -30,7 +30,7 @@
  *      Jesse Barnes <jesse.bar...@intel.com>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.22 2021/12/19 09:46:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_fb_helper.c,v 1.23 2021/12/19 09:52:24 riastradh Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -144,7 +144,6 @@ static DEFINE_MUTEX(kernel_fb_helper_loc
  * fbdev shadow buffer and call drm_fbdev_generic_setup() instead.
  */
 
-#ifndef __NetBSD__
 static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc)
 {
 	uint16_t *r_base, *g_base, *b_base;
@@ -164,9 +163,8 @@ static void drm_fb_helper_restore_lut_at
  * drm_fb_helper_debug_enter - implementation for &fb_ops.fb_debug_enter
  * @info: fbdev registered by the helper
  */
-int drm_fb_helper_debug_enter(struct fb_info *info)
+int drm_fb_helper_debug_enter_fb(struct drm_fb_helper *helper)
 {
-	struct drm_fb_helper *helper = info->par;
 	const struct drm_crtc_helper_funcs *funcs;
 	struct drm_mode_set *mode_set;
 
@@ -200,9 +198,8 @@ EXPORT_SYMBOL(drm_fb_helper_debug_enter)
  * drm_fb_helper_debug_leave - implementation for &fb_ops.fb_debug_leave
  * @info: fbdev registered by the helper
  */
-int drm_fb_helper_debug_leave(struct fb_info *info)
+int drm_fb_helper_debug_leave_fb(struct drm_fb_helper *helper)
 {
-	struct drm_fb_helper *helper = info->par;
 	struct drm_client_dev *client = &helper->client;
 	struct drm_device *dev = helper->dev;
 	struct drm_crtc *crtc;
@@ -239,7 +236,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_unlocked - 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.12 src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.13
--- src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h:1.12	Sun Dec 19 01:03:32 2021
+++ src/sys/external/bsd/drm2/dist/include/drm/drm_fb_helper.h	Sun Dec 19 09:52:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_fb_helper.h,v 1.12 2021/12/19 01:03:32 riastradh Exp $	*/
+/*	$NetBSD: drm_fb_helper.h,v 1.13 2021/12/19 09:52:25 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2006-2009 Red Hat Inc.
@@ -283,10 +283,8 @@ int drm_fb_helper_ioctl(struct fb_info *
 
 int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
 int drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper, int bpp_sel);
-#ifndef __NetBSD__		/* XXX fb info */
-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 *);
+int drm_fb_helper_debug_leave_fb(struct drm_fb_helper *);
 
 void drm_fb_helper_lastclose(struct drm_device *dev);
 void drm_fb_helper_output_poll_changed(struct drm_device *dev);

Reply via email to