mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 12:06:42 +07:00
drm/i915/opregion: add acpi defines from the spec
It's easier to read the code when the macro names match the spec. Also add a bunch of missing ones. No functional changes. Reviewed-and-tested-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/7cfdd2733b8cc7abae43cfa8c81aed902b69ecd5.1465810007.git.jani.nikula@intel.com
This commit is contained in:
parent
a922eb8d45
commit
25affa7326
@ -232,11 +232,28 @@ struct opregion_asle_ext {
|
||||
#define SWSCI_SBCB_POST_VBE_PM SWSCI_FUNCTION_CODE(SWSCI_SBCB, 19)
|
||||
#define SWSCI_SBCB_ENABLE_DISABLE_AUDIO SWSCI_FUNCTION_CODE(SWSCI_SBCB, 21)
|
||||
|
||||
#define ACPI_OTHER_OUTPUT (0<<8)
|
||||
#define ACPI_VGA_OUTPUT (1<<8)
|
||||
#define ACPI_TV_OUTPUT (2<<8)
|
||||
#define ACPI_DIGITAL_OUTPUT (3<<8)
|
||||
#define ACPI_LVDS_OUTPUT (4<<8)
|
||||
/*
|
||||
* ACPI Specification, Revision 5.0, Appendix B.3.2 _DOD (Enumerate All Devices
|
||||
* Attached to the Display Adapter).
|
||||
*/
|
||||
#define ACPI_DISPLAY_INDEX_SHIFT 0
|
||||
#define ACPI_DISPLAY_INDEX_MASK (0xf << 0)
|
||||
#define ACPI_DISPLAY_PORT_ATTACHMENT_SHIFT 4
|
||||
#define ACPI_DISPLAY_PORT_ATTACHMENT_MASK (0xf << 4)
|
||||
#define ACPI_DISPLAY_TYPE_SHIFT 8
|
||||
#define ACPI_DISPLAY_TYPE_MASK (0xf << 8)
|
||||
#define ACPI_DISPLAY_TYPE_OTHER (0 << 8)
|
||||
#define ACPI_DISPLAY_TYPE_VGA (1 << 8)
|
||||
#define ACPI_DISPLAY_TYPE_TV (2 << 8)
|
||||
#define ACPI_DISPLAY_TYPE_EXTERNAL_DIGITAL (3 << 8)
|
||||
#define ACPI_DISPLAY_TYPE_INTERNAL_DIGITAL (4 << 8)
|
||||
#define ACPI_VENDOR_SPECIFIC_SHIFT 12
|
||||
#define ACPI_VENDOR_SPECIFIC_MASK (0xf << 12)
|
||||
#define ACPI_BIOS_CAN_DETECT (1 << 16)
|
||||
#define ACPI_DEPENDS_ON_VGA (1 << 17)
|
||||
#define ACPI_PIPE_ID_SHIFT 18
|
||||
#define ACPI_PIPE_ID_MASK (7 << 18)
|
||||
#define ACPI_DEVICE_ID_SCHEME (1 << 31)
|
||||
|
||||
#define MAX_DSLP 1500
|
||||
|
||||
@ -725,7 +742,7 @@ static void intel_didl_outputs(struct drm_i915_private *dev_priv)
|
||||
blind_set:
|
||||
i = 0;
|
||||
list_for_each_entry(connector, &dev_priv->dev->mode_config.connector_list, head) {
|
||||
int output_type = ACPI_OTHER_OUTPUT;
|
||||
int output_type = ACPI_DISPLAY_TYPE_OTHER;
|
||||
if (i >= max_outputs) {
|
||||
DRM_DEBUG_KMS("More than %u outputs in connector list\n",
|
||||
max_outputs);
|
||||
@ -734,23 +751,23 @@ static void intel_didl_outputs(struct drm_i915_private *dev_priv)
|
||||
switch (connector->connector_type) {
|
||||
case DRM_MODE_CONNECTOR_VGA:
|
||||
case DRM_MODE_CONNECTOR_DVIA:
|
||||
output_type = ACPI_VGA_OUTPUT;
|
||||
output_type = ACPI_DISPLAY_TYPE_VGA;
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_Composite:
|
||||
case DRM_MODE_CONNECTOR_SVIDEO:
|
||||
case DRM_MODE_CONNECTOR_Component:
|
||||
case DRM_MODE_CONNECTOR_9PinDIN:
|
||||
output_type = ACPI_TV_OUTPUT;
|
||||
output_type = ACPI_DISPLAY_TYPE_TV;
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_DVII:
|
||||
case DRM_MODE_CONNECTOR_DVID:
|
||||
case DRM_MODE_CONNECTOR_DisplayPort:
|
||||
case DRM_MODE_CONNECTOR_HDMIA:
|
||||
case DRM_MODE_CONNECTOR_HDMIB:
|
||||
output_type = ACPI_DIGITAL_OUTPUT;
|
||||
output_type = ACPI_DISPLAY_TYPE_EXTERNAL_DIGITAL;
|
||||
break;
|
||||
case DRM_MODE_CONNECTOR_LVDS:
|
||||
output_type = ACPI_LVDS_OUTPUT;
|
||||
output_type = ACPI_DISPLAY_TYPE_INTERNAL_DIGITAL;
|
||||
break;
|
||||
}
|
||||
temp = get_did(opregion, i);
|
||||
|
Loading…
Reference in New Issue
Block a user