/* * drivers/video/edid.h - EDID/DDC Header * * Based on: * 1. XFree86 4.3.0, edid.h * Copyright 1998 by Egbert Eich * * 2. John Fremlin and * Ani Joshi * * DDC is a Trademark of VESA (Video Electronics Standard Association). * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. */ #ifndef __EDID_H__ #define __EDID_H__ #define EDID_LENGTH 0x80 #define EDID_HEADER 0x00 #define EDID_HEADER_END 0x07 #define ID_MANUFACTURER_NAME 0x08 #define ID_MANUFACTURER_NAME_END 0x09 #define ID_MODEL 0x0a #define ID_SERIAL_NUMBER 0x0c #define MANUFACTURE_WEEK 0x10 #define MANUFACTURE_YEAR 0x11 #define EDID_STRUCT_VERSION 0x12 #define EDID_STRUCT_REVISION 0x13 #define EDID_STRUCT_DISPLAY 0x14 #define DPMS_FLAGS 0x18 #define ESTABLISHED_TIMING_1 0x23 #define ESTABLISHED_TIMING_2 0x24 #define MANUFACTURERS_TIMINGS 0x25 /* standard timings supported */ #define STD_TIMING 8 #define STD_TIMING_DESCRIPTION_SIZE 2 #define STD_TIMING_DESCRIPTIONS_START 0x26 #define DETAILED_TIMING_DESCRIPTIONS_START 0x36 #define DETAILED_TIMING_DESCRIPTION_SIZE 18 #define NO_DETAILED_TIMING_DESCRIPTIONS 4 #define DETAILED_TIMING_DESCRIPTION_1 0x36 #define DETAILED_TIMING_DESCRIPTION_2 0x48 #define DETAILED_TIMING_DESCRIPTION_3 0x5a #define DETAILED_TIMING_DESCRIPTION_4 0x6c #define DESCRIPTOR_DATA 5 #define UPPER_NIBBLE( x ) \ (((128|64|32|16) & (x)) >> 4) #define LOWER_NIBBLE( x ) \ ((1|2|4|8) & (x)) #define COMBINE_HI_8LO( hi, lo ) \ ( (((unsigned)hi) << 8) | (unsigned)lo ) #define COMBINE_HI_4LO( hi, lo ) \ ( (((unsigned)hi) << 4) | (unsigned)lo ) #define PIXEL_CLOCK_LO (unsigned)block[ 0 ] #define PIXEL_CLOCK_HI (unsigned)block[ 1 ] #define PIXEL_CLOCK (COMBINE_HI_8LO( PIXEL_CLOCK_HI,PIXEL_CLOCK_LO )*10000) #define H_ACTIVE_LO (unsigned)block[ 2 ] #define H_BLANKING_LO (unsigned)block[ 3 ] #define H_ACTIVE_HI UPPER_NIBBLE( (unsigned)block[ 4 ] ) #define H_ACTIVE COMBINE_HI_8LO( H_ACTIVE_HI, H_ACTIVE_LO ) #define H_BLANKING_HI LOWER_NIBBLE( (unsigned)block[ 4 ] ) #define H_BLANKING COMBINE_HI_8LO( H_BLANKING_HI, H_BLANKING_LO ) #define V_ACTIVE_LO (unsigned)block[ 5 ] #define V_BLANKING_LO (unsigned)block[ 6 ] #define V_ACTIVE_HI UPPER_NIBBLE( (unsigned)block[ 7 ] ) #define V_ACTIVE COMBINE_HI_8LO( V_ACTIVE_HI, V_ACTIVE_LO ) #define V_BLANKING_HI LOWER_NIBBLE( (unsigned)block[ 7 ] ) #define V_BLANKING COMBINE_HI_8LO( V_BLANKING_HI, V_BLANKING_LO ) #define H_SYNC_OFFSET_LO (unsigned)block[ 8 ] #define H_SYNC_WIDTH_LO (unsigned)block[ 9 ] #define V_SYNC_OFFSET_LO UPPER_NIBBLE( (unsigned)block[ 10 ] ) #define V_SYNC_WIDTH_LO LOWER_NIBBLE( (unsigned)block[ 10 ] ) #define V_SYNC_WIDTH_HI ((unsigned)block[ 11 ] & (1|2)) #define V_SYNC_OFFSET_HI (((unsigned)block[ 11 ] & (4|8)) >> 2) #define H_SYNC_WIDTH_HI (((unsigned)block[ 11 ] & (16|32)) >> 4) #define H_SYNC_OFFSET_HI (((unsigned)block[ 11 ] & (64|128)) >> 6) #define V_SYNC_WIDTH COMBINE_HI_4LO( V_SYNC_WIDTH_HI, V_SYNC_WIDTH_LO ) #define V_SYNC_OFFSET COMBINE_HI_4LO( V_SYNC_OFFSET_HI, V_SYNC_OFFSET_LO ) #define H_SYNC_WIDTH COMBINE_HI_8LO( H_SYNC_WIDTH_HI, H_SYNC_WIDTH_LO ) #define H_SYNC_OFFSET COMBINE_HI_8LO( H_SYNC_OFFSET_HI, H_SYNC_OFFSET_LO ) #define H_SIZE_LO (unsigned)block[ 12 ] #define V_SIZE_LO (unsigned)block[ 13 ] #define H_SIZE_HI UPPER_NIBBLE( (unsigned)block[ 14 ] ) #define V_SIZE_HI LOWER_NIBBLE( (unsigned)block[ 14 ] ) #define H_SIZE COMBINE_HI_8LO( H_SIZE_HI, H_SIZE_LO ) #define V_SIZE COMBINE_HI_8LO( V_SIZE_HI, V_SIZE_LO ) #define H_BORDER (unsigned)block[ 15 ] #define V_BORDER (unsigned)block[ 16 ] #define FLAGS (unsigned)block[ 17 ] #define INTERLACED (FLAGS&128) #define SYNC_TYPE (FLAGS&3<<3) /* bits 4,3 */ #define SYNC_SEPARATE (3<<3) #define HSYNC_POSITIVE (FLAGS & 4) #define VSYNC_POSITIVE (FLAGS & 2) #define V_MIN_RATE block[ 5 ] #define V_MAX_RATE block[ 6 ] #define H_MIN_RATE block[ 7 ] #define H_MAX_RATE block[ 8 ] #define MAX_PIXEL_CLOCK (((int)block[ 9 ]) * 10) #define GTF_SUPPORT block[10] #define DPMS_ACTIVE_OFF (1 << 5) #define DPMS_SUSPEND (1 << 6) #define DPMS_STANDBY (1 << 7) #endif /* __EDID_H__ */ mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2017-02-03 14:18:39 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-02-04 00:11:08 +0100
commit6e978b22efa1db9f6e71b24440b5f1d93e968ee3 (patch)
treec666f7a26b860674848949e39a610222b0723f89 /drivers/usb/host/ohci-da8xx.c
parent3c223c19aea85d3dda1416c187915f4a30b04b1f (diff)
cpufreq: intel_pstate: Disable energy efficiency optimization
Some Kabylake desktop processors may not reach max turbo when running in HWP mode, even if running under sustained 100% utilization. This occurs when the HWP.EPP (Energy Performance Preference) is set to "balance_power" (0x80) -- the default on most systems. It occurs because the platform BIOS may erroneously enable an energy-efficiency setting -- MSR_IA32_POWER_CTL BIT-EE, which is not recommended to be enabled on this SKU. On the failing systems, this BIOS issue was not discovered when the desktop motherboard was tested with Windows, because the BIOS also neglects to provide the ACPI/CPPC table, that Windows requires to enable HWP, and so Windows runs in legacy P-state mode, where this setting has no effect. Linux' intel_pstate driver does not require ACPI/CPPC to enable HWP, and so it runs in HWP mode, exposing this incorrect BIOS configuration. There are several ways to address this problem. First, Linux can also run in legacy P-state mode on this system. As intel_pstate is how Linux enables HWP, booting with "intel_pstate=disable" will run in acpi-cpufreq/ondemand legacy p-state mode. Or second, the "performance" governor can be used with intel_pstate, which will modify HWP.EPP to 0. Or third, starting in 4.10, the /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference attribute in can be updated from "balance_power" to "performance". Or fourth, apply this patch, which fixes the erroneous setting of MSR_IA32_POWER_CTL BIT_EE on this model, allowing the default configuration to function as designed. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Cc: 4.6+ <stable@vger.kernel.org> # 4.6+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/usb/host/ohci-da8xx.c')