From 1cfd4708f424794f1e13dd7ce32053c497790b83 Mon Sep 17 00:00:00 2001 From: ray Date: Thu, 25 Sep 2014 13:08:31 +0000 Subject: [PATCH] MFC r268981 Remove #ifdef-s to reduce difference to upstream. Pointed by: kib Approved by: re (glebius) Sponsored by: The FreeBSD Foundation git-svn-id: svn://svn.freebsd.org/base/stable/10@272104 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/dev/drm2/drm_fb_helper.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/sys/dev/drm2/drm_fb_helper.c b/sys/dev/drm2/drm_fb_helper.c index 5c35e5b7e..05f616ed7 100644 --- a/sys/dev/drm2/drm_fb_helper.c +++ b/sys/dev/drm2/drm_fb_helper.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__FreeBSD__) #include @@ -76,7 +75,6 @@ vt_kms_postswitch(void *arg) return (0); } -#endif static DRM_LIST_HEAD(kernel_fb_helper_list); @@ -941,10 +939,8 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, struct fb_info *info; struct drm_fb_helper_surface_size sizes; int gamma_size = 0; -#if defined(__FreeBSD__) struct vt_kms_softc *sc; device_t kdev; -#endif memset(&sizes, 0, sizeof(struct drm_fb_helper_surface_size)); sizes.surface_depth = 24; @@ -1021,7 +1017,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, if (new_fb < 0) return new_fb; -#if defined(__FreeBSD__) sc = malloc(sizeof(struct vt_kms_softc), DRM_MEM_KMS, M_WAITOK | M_ZERO); sc->fb_helper = fb_helper; @@ -1036,14 +1031,12 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, info->fb_stride = fb_helper->fb->pitches[0]; info->fb_priv = sc; info->enter = &vt_kms_postswitch; -#endif /* set the fb pointer */ for (i = 0; i < fb_helper->crtc_count; i++) { fb_helper->crtc_info[i].mode_set.fb = fb_helper->fb; } -#if defined(__FreeBSD__) if (new_fb) { device_t fbd; int ret; @@ -1059,30 +1052,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, DRM_ERROR("Failed to attach fbd device: %d\n", ret); #endif } -#else - if (new_fb) { - info->var.pixclock = 0; - if (register_framebuffer(info) < 0) { - return -EINVAL; - } - - printf("fb%d: %s frame buffer device\n", info->node, - info->fix.id); - - } else { - drm_fb_helper_set_par(info); - } - - /* Switch back to kernel console on panic */ - /* multi card linked list maybe */ - if (list_empty(&kernel_fb_helper_list)) { - printf("drm: registered panic notifier\n"); - atomic_notifier_chain_register(&panic_notifier_list, - &paniced); - } - if (new_fb) - list_add(&fb_helper->kernel_fb_list, &kernel_fb_helper_list); -#endif return 0; } -- 2.45.0