intel_sdvo.c (249041) | intel_sdvo.c (254797) |
---|---|
1/* 2 * Copyright 2006 Dave Airlie <airlied@linux.ie> 3 * Copyright �� 2006-2007 Intel Corporation 4 * Jesse Barnes <jesse.barnes@intel.com> 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation --- 13 unchanged lines hidden (view full) --- 22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 * DEALINGS IN THE SOFTWARE. 24 * 25 * Authors: 26 * Eric Anholt <eric@anholt.net> 27 */ 28 29#include <sys/cdefs.h> | 1/* 2 * Copyright 2006 Dave Airlie <airlied@linux.ie> 3 * Copyright �� 2006-2007 Intel Corporation 4 * Jesse Barnes <jesse.barnes@intel.com> 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation --- 13 unchanged lines hidden (view full) --- 22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 * DEALINGS IN THE SOFTWARE. 24 * 25 * Authors: 26 * Eric Anholt <eric@anholt.net> 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/drm2/i915/intel_sdvo.c 249041 2013-04-03 08:27:35Z dumbbell $"); | 30__FBSDID("$FreeBSD: head/sys/dev/drm2/i915/intel_sdvo.c 254797 2013-08-24 16:50:47Z dumbbell $"); |
31 32#include <dev/drm2/drmP.h> 33#include <dev/drm2/drm.h> 34#include <dev/drm2/drm_crtc.h> 35#include <dev/drm2/drm_edid.h> 36#include <dev/drm2/i915/i915_drm.h> 37#include <dev/drm2/i915/i915_drv.h> 38#include <dev/drm2/i915/intel_sdvo_regs.h> --- 880 unchanged lines hidden (view full) --- 919 CTASSERT(sizeof(format) == 6); 920 return intel_sdvo_set_value(intel_sdvo, 921 SDVO_CMD_SET_TV_FORMAT, 922 &format, sizeof(format)); 923} 924 925static bool 926intel_sdvo_set_output_timings_from_mode(struct intel_sdvo *intel_sdvo, | 31 32#include <dev/drm2/drmP.h> 33#include <dev/drm2/drm.h> 34#include <dev/drm2/drm_crtc.h> 35#include <dev/drm2/drm_edid.h> 36#include <dev/drm2/i915/i915_drm.h> 37#include <dev/drm2/i915/i915_drv.h> 38#include <dev/drm2/i915/intel_sdvo_regs.h> --- 880 unchanged lines hidden (view full) --- 919 CTASSERT(sizeof(format) == 6); 920 return intel_sdvo_set_value(intel_sdvo, 921 SDVO_CMD_SET_TV_FORMAT, 922 &format, sizeof(format)); 923} 924 925static bool 926intel_sdvo_set_output_timings_from_mode(struct intel_sdvo *intel_sdvo, |
927 struct drm_display_mode *mode) | 927 const struct drm_display_mode *mode) |
928{ 929 struct intel_sdvo_dtd output_dtd; 930 931 if (!intel_sdvo_set_target_output(intel_sdvo, 932 intel_sdvo->attached_output)) 933 return false; 934 935 intel_sdvo_get_dtd_from_mode(&output_dtd, mode); 936 if (!intel_sdvo_set_output_timing(intel_sdvo, &output_dtd)) 937 return false; 938 939 return true; 940} 941 942static bool 943intel_sdvo_set_input_timings_for_mode(struct intel_sdvo *intel_sdvo, | 928{ 929 struct intel_sdvo_dtd output_dtd; 930 931 if (!intel_sdvo_set_target_output(intel_sdvo, 932 intel_sdvo->attached_output)) 933 return false; 934 935 intel_sdvo_get_dtd_from_mode(&output_dtd, mode); 936 if (!intel_sdvo_set_output_timing(intel_sdvo, &output_dtd)) 937 return false; 938 939 return true; 940} 941 942static bool 943intel_sdvo_set_input_timings_for_mode(struct intel_sdvo *intel_sdvo, |
944 struct drm_display_mode *mode, | 944 const struct drm_display_mode *mode, |
945 struct drm_display_mode *adjusted_mode) 946{ 947 /* Reset the input timing to the screen. Assume always input 0. */ 948 if (!intel_sdvo_set_target_input(intel_sdvo)) 949 return false; 950 951 if (!intel_sdvo_create_preferred_input_timing(intel_sdvo, 952 mode->clock / 10, --- 6 unchanged lines hidden (view full) --- 959 return false; 960 961 intel_sdvo_get_mode_from_dtd(adjusted_mode, &intel_sdvo->input_dtd); 962 963 return true; 964} 965 966static bool intel_sdvo_mode_fixup(struct drm_encoder *encoder, | 945 struct drm_display_mode *adjusted_mode) 946{ 947 /* Reset the input timing to the screen. Assume always input 0. */ 948 if (!intel_sdvo_set_target_input(intel_sdvo)) 949 return false; 950 951 if (!intel_sdvo_create_preferred_input_timing(intel_sdvo, 952 mode->clock / 10, --- 6 unchanged lines hidden (view full) --- 959 return false; 960 961 intel_sdvo_get_mode_from_dtd(adjusted_mode, &intel_sdvo->input_dtd); 962 963 return true; 964} 965 966static bool intel_sdvo_mode_fixup(struct drm_encoder *encoder, |
967 struct drm_display_mode *mode, | 967 const struct drm_display_mode *mode, |
968 struct drm_display_mode *adjusted_mode) 969{ 970 struct intel_sdvo *intel_sdvo = to_intel_sdvo(encoder); 971 int multiplier; 972 973 /* We need to construct preferred input timings based on our 974 * output timings. To do that, we have to set the output 975 * timings, even though this isn't really the right place in --- 1705 unchanged lines hidden --- | 968 struct drm_display_mode *adjusted_mode) 969{ 970 struct intel_sdvo *intel_sdvo = to_intel_sdvo(encoder); 971 int multiplier; 972 973 /* We need to construct preferred input timings based on our 974 * output timings. To do that, we have to set the output 975 * timings, even though this isn't really the right place in --- 1705 unchanged lines hidden --- |