Deleted Added
full compact
fbd.c (259016) fbd.c (259777)
1/*-
2 * Copyright (c) 2013 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Aleksandr Rybalko under sponsorship from the
6 * FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*-
2 * Copyright (c) 2013 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Aleksandr Rybalko under sponsorship from the
6 * FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $FreeBSD: head/sys/dev/fb/fbd.c 259016 2013-12-05 22:38:53Z ray $
29 * $FreeBSD: head/sys/dev/fb/fbd.c 259777 2013-12-23 18:09:10Z ray $
30 */
31
32/* Generic framebuffer */
33/* TODO unlink from VT(9) */
34/* TODO done normal /dev/fb methods */
35
36#include <sys/cdefs.h>
30 */
31
32/* Generic framebuffer */
33/* TODO unlink from VT(9) */
34/* TODO done normal /dev/fb methods */
35
36#include <sys/cdefs.h>
37__FBSDID("$FreeBSD: head/sys/dev/fb/fbd.c 259016 2013-12-05 22:38:53Z ray $");
37__FBSDID("$FreeBSD: head/sys/dev/fb/fbd.c 259777 2013-12-23 18:09:10Z ray $");
38
39#include <sys/param.h>
40#include <sys/systm.h>
41#include <sys/bus.h>
42#include <sys/conf.h>
43#include <sys/kernel.h>
44#include <sys/malloc.h>
45#include <sys/module.h>

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

250 return (EINVAL);
251 }
252 info->fb_flags |= FB_FLAG_NOMMAP;
253 info->wr1 = &vt_fb_indir_wr1;
254 info->wr2 = &vt_fb_indir_wr2;
255 info->wr4 = &vt_fb_indir_wr4;
256 info->copy = &vt_fb_indir_copy;
257 } else if (info->fb_vbase != 0) {
38
39#include <sys/param.h>
40#include <sys/systm.h>
41#include <sys/bus.h>
42#include <sys/conf.h>
43#include <sys/kernel.h>
44#include <sys/malloc.h>
45#include <sys/module.h>

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

250 return (EINVAL);
251 }
252 info->fb_flags |= FB_FLAG_NOMMAP;
253 info->wr1 = &vt_fb_indir_wr1;
254 info->wr2 = &vt_fb_indir_wr2;
255 info->wr4 = &vt_fb_indir_wr4;
256 info->copy = &vt_fb_indir_copy;
257 } else if (info->fb_vbase != 0) {
258 if (info->fb_pbase == 0)
258 if (info->fb_pbase == 0) {
259 info->fb_flags |= FB_FLAG_NOMMAP;
259 info->fb_flags |= FB_FLAG_NOMMAP;
260 } else {
261 if (info->fb_mmap == NULL)
262 info->fb_mmap = &fb_mmap;
263 }
260 info->wr1 = &vt_fb_mem_wr1;
261 info->wr2 = &vt_fb_mem_wr2;
262 info->wr4 = &vt_fb_mem_wr4;
263 info->copy = &vt_fb_mem_copy;
264 } else
265 return (ENXIO);
266
264 info->wr1 = &vt_fb_mem_wr1;
265 info->wr2 = &vt_fb_mem_wr2;
266 info->wr4 = &vt_fb_mem_wr4;
267 info->copy = &vt_fb_mem_copy;
268 } else
269 return (ENXIO);
270
271 if (info->fb_ioctl == NULL)
272 info->fb_ioctl = &fb_ioctl;
273
274
267 return (0);
268}
269
270
271static int
272fb_init(struct fb_list_entry *entry, int unit)
273{
274 struct fb_info *info;
275
276 info = entry->fb_info;
277 entry->fb_si = make_dev(&fb_cdevsw, unit, UID_ROOT, GID_WHEEL,
278 0600, "fb%d", unit);
279 entry->fb_si->si_drv1 = info;
275 return (0);
276}
277
278
279static int
280fb_init(struct fb_list_entry *entry, int unit)
281{
282 struct fb_info *info;
283
284 info = entry->fb_info;
285 entry->fb_si = make_dev(&fb_cdevsw, unit, UID_ROOT, GID_WHEEL,
286 0600, "fb%d", unit);
287 entry->fb_si->si_drv1 = info;
288 info->fb_cdev = entry->fb_si;
280
281 return (0);
282}
283
284int
285fbd_list()
286{
287 struct fb_list_entry *entry;

--- 180 unchanged lines hidden ---
289
290 return (0);
291}
292
293int
294fbd_list()
295{
296 struct fb_list_entry *entry;

--- 180 unchanged lines hidden ---