Deleted Added
sdiff udiff text old ( 248061 ) new ( 259016 )
full compact
1/*
2 * Copyright (c) 2006-2009 Red Hat Inc.
3 * Copyright (c) 2006-2008 Intel Corporation
4 * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
5 *
6 * DRM framebuffer helper functions
7 *
8 * Permission to use, copy, modify, distribute, and sell this software and its

--- 15 unchanged lines hidden (view full) ---

24 * OF THIS SOFTWARE.
25 *
26 * Authors:
27 * Dave Airlie <airlied@linux.ie>
28 * Jesse Barnes <jesse.barnes@intel.com>
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/dev/drm2/drm_fb_helper.c 248061 2013-03-08 18:15:07Z dumbbell $");
33
34#include <dev/drm2/drmP.h>
35#include <dev/drm2/drm_crtc.h>
36#include <dev/drm2/drm_fb_helper.h>
37#include <dev/drm2/drm_crtc_helper.h>
38
39static DRM_LIST_HEAD(kernel_fb_helper_list);
40
41/* simple single crtc case helper function */
42int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
43{
44 struct drm_device *dev = fb_helper->dev;
45 struct drm_connector *connector;
46

--- 164 unchanged lines hidden (view full) ---

211
212 return true;
213}
214
215static int
216fb_get_options(const char *connector_name, char **option)
217{
218
219 return (1);
220}
221
222static int drm_fb_helper_parse_command_line(struct drm_fb_helper *fb_helper)
223{
224 struct drm_fb_helper_connector *fb_helper_conn;
225 int i;
226

--- 660 unchanged lines hidden (view full) ---

887#endif
888
889int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
890 int preferred_bpp)
891{
892 int new_fb = 0;
893 int crtc_count = 0;
894 int i;
895#if 0
896 struct fb_info *info;
897#endif
898 struct drm_fb_helper_surface_size sizes;
899 int gamma_size = 0;
900
901 memset(&sizes, 0, sizeof(struct drm_fb_helper_surface_size));
902 sizes.surface_depth = 24;
903 sizes.surface_bpp = 32;
904 sizes.fb_width = (unsigned)-1;
905 sizes.fb_height = (unsigned)-1;
906
907 /* if driver picks 8 or 16 by default use that

--- 60 unchanged lines hidden (view full) ---

968 sizes.fb_height = sizes.surface_height = 768;
969 }
970
971 /* push down into drivers */
972 new_fb = (*fb_helper->funcs->fb_probe)(fb_helper, &sizes);
973 if (new_fb < 0)
974 return new_fb;
975
976#if 0
977 info = fb_helper->fbdev;
978#endif
979
980 /* set the fb pointer */
981 for (i = 0; i < fb_helper->crtc_count; i++) {
982 fb_helper->crtc_info[i].mode_set.fb = fb_helper->fb;
983 }
984
985#if 0
986 if (new_fb) {
987 info->var.pixclock = 0;
988 if (register_framebuffer(info) < 0) {
989 return -EINVAL;
990 }
991
992 printf("fb%d: %s frame buffer device\n", info->node,
993 info->fix.id);
994

--- 6 unchanged lines hidden (view full) ---

1001 if (list_empty(&kernel_fb_helper_list)) {
1002 printf("drm: registered panic notifier\n");
1003 atomic_notifier_chain_register(&panic_notifier_list,
1004 &paniced);
1005 }
1006 if (new_fb)
1007 list_add(&fb_helper->kernel_fb_list, &kernel_fb_helper_list);
1008#endif
1009
1010 return 0;
1011}
1012
1013#if 0
1014void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
1015 uint32_t depth)
1016{
1017 info->fix.type = FB_TYPE_PACKED_PIXELS;

--- 554 unchanged lines hidden ---