Deleted Added
full compact
drm_fb_helper.c (274049) drm_fb_helper.c (277487)
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>
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 274049 2014-11-03 14:35:07Z dumbbell $");
32__FBSDID("$FreeBSD: head/sys/dev/drm2/drm_fb_helper.c 277487 2015-01-21 16:10:37Z kib $");
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
39#include <sys/kdb.h>
40#include <sys/param.h>

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

197 for (i = 0; i < crtc->gamma_size; i++)
198 helper->funcs->gamma_get(crtc, &r_base[i], &g_base[i], &b_base[i], i);
199}
200
201static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc)
202{
203 uint16_t *r_base, *g_base, *b_base;
204
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
39#include <sys/kdb.h>
40#include <sys/param.h>

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

197 for (i = 0; i < crtc->gamma_size; i++)
198 helper->funcs->gamma_get(crtc, &r_base[i], &g_base[i], &b_base[i], i);
199}
200
201static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc)
202{
203 uint16_t *r_base, *g_base, *b_base;
204
205 if (crtc->funcs->gamma_set == NULL)
206 return;
207
205 r_base = crtc->gamma_store;
206 g_base = r_base + crtc->gamma_size;
207 b_base = g_base + crtc->gamma_size;
208
209 crtc->funcs->gamma_set(crtc, r_base, g_base, b_base, 0, crtc->gamma_size);
210}
211#endif
212

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

1220
1221 if (can_clone) {
1222 DRM_DEBUG_KMS("can clone using command line\n");
1223 return true;
1224 }
1225
1226 /* try and find a 1024x768 mode on each connector */
1227 can_clone = true;
208 r_base = crtc->gamma_store;
209 g_base = r_base + crtc->gamma_size;
210 b_base = g_base + crtc->gamma_size;
211
212 crtc->funcs->gamma_set(crtc, r_base, g_base, b_base, 0, crtc->gamma_size);
213}
214#endif
215

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

1223
1224 if (can_clone) {
1225 DRM_DEBUG_KMS("can clone using command line\n");
1226 return true;
1227 }
1228
1229 /* try and find a 1024x768 mode on each connector */
1230 can_clone = true;
1228 dmt_mode = drm_mode_find_dmt(fb_helper->dev, 1024, 768, 60);
1231 dmt_mode = drm_mode_find_dmt(fb_helper->dev, 1024, 768, 60, false);
1229
1230 for (i = 0; i < fb_helper->connector_count; i++) {
1231
1232 if (!enabled[i])
1233 continue;
1234
1235 fb_helper_conn = fb_helper->connector_info[i];
1236 list_for_each_entry(mode, &fb_helper_conn->connector->modes, head) {

--- 280 unchanged lines hidden ---
1232
1233 for (i = 0; i < fb_helper->connector_count; i++) {
1234
1235 if (!enabled[i])
1236 continue;
1237
1238 fb_helper_conn = fb_helper->connector_info[i];
1239 list_for_each_entry(mode, &fb_helper_conn->connector->modes, head) {

--- 280 unchanged lines hidden ---