diff options
author | ray <ray@FreeBSD.org> | 2014-09-25 13:08:31 +0000 |
---|---|---|
committer | ray <ray@FreeBSD.org> | 2014-09-25 13:08:31 +0000 |
commit | 878cc3db14db5693933866536918632fa012edaf (patch) | |
tree | 2fcc678cff07b4279646f9c883c2e23494349305 /sys/dev | |
parent | 5f1a68aedeab1bf4def3824ecbbce6c4734ad583 (diff) | |
download | FreeBSD-src-878cc3db14db5693933866536918632fa012edaf.zip FreeBSD-src-878cc3db14db5693933866536918632fa012edaf.tar.gz |
MFC r268981
Remove #ifdef-s to reduce difference to upstream.
Pointed by: kib
Approved by: re (glebius)
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/drm2/drm_fb_helper.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/sys/dev/drm2/drm_fb_helper.c b/sys/dev/drm2/drm_fb_helper.c index 5c35e5b..05f616e 100644 --- a/sys/dev/drm2/drm_fb_helper.c +++ b/sys/dev/drm2/drm_fb_helper.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include <dev/drm2/drm_fb_helper.h> #include <dev/drm2/drm_crtc_helper.h> -#if defined(__FreeBSD__) #include <sys/kdb.h> @@ -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; } |