Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
imx-fb.c
Go to the documentation of this file.
1 /*
2  * i.MX drm driver
3  *
4  * Copyright (C) 2012 Sascha Hauer, Pengutronix
5  *
6  * Based on Samsung Exynos code
7  *
8  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (at your option) any later version.
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  */
20 #include <linux/module.h>
21 #include <drm/drmP.h>
22 #include <drm/drm_crtc.h>
23 #include <drm/drm_crtc_helper.h>
24 #include <drm/drm_gem_cma_helper.h>
25 #include <drm/drm_fb_cma_helper.h>
26 
27 #include "imx-drm.h"
28 
29 static struct drm_mode_config_funcs imx_drm_mode_config_funcs = {
30  .fb_create = drm_fb_cma_create,
31 };
32 
34 {
35  dev->mode_config.min_width = 64;
36  dev->mode_config.min_height = 64;
37 
38  /*
39  * set max width and height as default value(4096x4096).
40  * this value would be used to check framebuffer size limitation
41  * at drm_mode_addfb().
42  */
43  dev->mode_config.max_width = 4096;
44  dev->mode_config.max_height = 4096;
45 
46  dev->mode_config.funcs = &imx_drm_mode_config_funcs;
47 }