drm_crtc.c (522171951761153172c75b94ae1f4bc9ab631745) drm_crtc.c (b3c6c8bfe378309f8185d591579a3cb3aa2fe2e8)
1/*
2 * Copyright (c) 2006-2008 Intel Corporation
3 * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
4 * Copyright (c) 2008 Red Hat Inc.
5 *
6 * DRM core CRTC related functions
7 *
8 * Permission to use, copy, modify, distribute, and sell this software and its

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

414 crtc->funcs->atomic_destroy_state(crtc, crtc->state);
415
416 kfree(crtc->name);
417
418 memset(crtc, 0, sizeof(*crtc));
419}
420EXPORT_SYMBOL(drm_crtc_cleanup);
421
1/*
2 * Copyright (c) 2006-2008 Intel Corporation
3 * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
4 * Copyright (c) 2008 Red Hat Inc.
5 *
6 * DRM core CRTC related functions
7 *
8 * Permission to use, copy, modify, distribute, and sell this software and its

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

414 crtc->funcs->atomic_destroy_state(crtc, crtc->state);
415
416 kfree(crtc->name);
417
418 memset(crtc, 0, sizeof(*crtc));
419}
420EXPORT_SYMBOL(drm_crtc_cleanup);
421
422/**
423 * drm_display_info_set_bus_formats - set the supported bus formats
424 * @info: display info to store bus formats in
425 * @formats: array containing the supported bus formats
426 * @num_formats: the number of entries in the fmts array
427 *
428 * Store the supported bus formats in display info structure.
429 * See MEDIA_BUS_FMT_* definitions in include/uapi/linux/media-bus-format.h for
430 * a full list of available formats.
431 */
432int drm_display_info_set_bus_formats(struct drm_display_info *info,
433 const u32 *formats,
434 unsigned int num_formats)
435{
436 u32 *fmts = NULL;
437
438 if (!formats && num_formats)
439 return -EINVAL;
440
441 if (formats && num_formats) {
442 fmts = kmemdup(formats, sizeof(*formats) * num_formats,
443 GFP_KERNEL);
444 if (!fmts)
445 return -ENOMEM;
446 }
447
448 kfree(info->bus_formats);
449 info->bus_formats = fmts;
450 info->num_bus_formats = num_formats;
451
452 return 0;
453}
454EXPORT_SYMBOL(drm_display_info_set_bus_formats);
455
456static int drm_encoder_register_all(struct drm_device *dev)
457{
458 struct drm_encoder *encoder;
459 int ret = 0;
460
461 drm_for_each_encoder(encoder, dev) {
462 if (encoder->funcs->late_register)
463 ret = encoder->funcs->late_register(encoder);

--- 3598 unchanged lines hidden ---
422static int drm_encoder_register_all(struct drm_device *dev)
423{
424 struct drm_encoder *encoder;
425 int ret = 0;
426
427 drm_for_each_encoder(encoder, dev) {
428 if (encoder->funcs->late_register)
429 ret = encoder->funcs->late_register(encoder);

--- 3598 unchanged lines hidden ---