Date: Thu, 25 Sep 2014 13:08:31 +0000 (UTC) From: Aleksandr Rybalko <ray@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r272104 - stable/10/sys/dev/drm2 Message-ID: <201409251308.s8PD8WAn064329@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ray Date: Thu Sep 25 13:08:31 2014 New Revision: 272104 URL: http://svnweb.freebsd.org/changeset/base/272104 Log: MFC r268981 Remove #ifdef-s to reduce difference to upstream. Pointed by: kib Approved by: re (glebius) Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/drm2/drm_fb_helper.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/drm_fb_helper.c ============================================================================== --- stable/10/sys/dev/drm2/drm_fb_helper.c Thu Sep 25 11:38:26 2014 (r272103) +++ stable/10/sys/dev/drm2/drm_fb_helper.c Thu Sep 25 13:08:31 2014 (r272104) @@ -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 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 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 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_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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409251308.s8PD8WAn064329>