1/* 2 * Copyright �� 2006-2007 Intel Corporation 3 * Copyright (c) 2006 Dave Airlie <airlied@linux.ie> 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, --- 14 unchanged lines hidden (view full) --- 23 * 24 * Authors: 25 * Eric Anholt <eric@anholt.net> 26 * Dave Airlie <airlied@linux.ie> 27 * Jesse Barnes <jesse.barnes@intel.com> 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/drm2/i915/intel_lvds.c 254797 2013-08-24 16:50:47Z dumbbell $"); |
32 33#include <dev/drm2/drmP.h> 34#include <dev/drm2/drm.h> 35#include <dev/drm2/drm_crtc.h> 36#include <dev/drm2/drm_edid.h> 37#include <dev/drm2/i915/i915_drm.h> 38#include <dev/drm2/i915/i915_drv.h> 39#include <dev/drm2/i915/intel_drv.h> --- 185 unchanged lines hidden (view full) --- 225 */ 226#define ACCURACY 12 227#define FACTOR (1 << ACCURACY) 228 u32 ratio = source * FACTOR / target; 229 return (FACTOR * ratio + FACTOR/2) / FACTOR; 230} 231 232static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, |
233 const struct drm_display_mode *mode, |
234 struct drm_display_mode *adjusted_mode) 235{ 236 struct drm_device *dev = encoder->dev; 237 struct drm_i915_private *dev_priv = dev->dev_private; 238 struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc); 239 struct intel_lvds *intel_lvds = to_intel_lvds(encoder); 240 struct drm_encoder *tmp_encoder; 241 u32 pfit_control = 0, pfit_pgm_ratios = 0, border = 0; --- 884 unchanged lines hidden --- |