|
24 | 24 | * Eric Anholt <eric@anholt.net>
|
25 | 25 | */
|
26 | 26 |
|
27 |
| -#include <linux/dmi.h> |
28 | 27 | #include <linux/module.h>
|
29 | 28 | #include <linux/input.h>
|
30 | 29 | #include <linux/i2c.h>
|
@@ -14710,174 +14709,6 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv)
|
14710 | 14709 | dev_priv->display.update_crtcs = intel_update_crtcs;
|
14711 | 14710 | }
|
14712 | 14711 |
|
14713 |
| -/* |
14714 |
| - * Some machines (Lenovo U160) do not work with SSC on LVDS for some reason |
14715 |
| - */ |
14716 |
| -static void quirk_ssc_force_disable(struct drm_device *dev) |
14717 |
| -{ |
14718 |
| - struct drm_i915_private *dev_priv = to_i915(dev); |
14719 |
| - dev_priv->quirks |= QUIRK_LVDS_SSC_DISABLE; |
14720 |
| - DRM_INFO("applying lvds SSC disable quirk\n"); |
14721 |
| -} |
14722 |
| - |
14723 |
| -/* |
14724 |
| - * A machine (e.g. Acer Aspire 5734Z) may need to invert the panel backlight |
14725 |
| - * brightness value |
14726 |
| - */ |
14727 |
| -static void quirk_invert_brightness(struct drm_device *dev) |
14728 |
| -{ |
14729 |
| - struct drm_i915_private *dev_priv = to_i915(dev); |
14730 |
| - dev_priv->quirks |= QUIRK_INVERT_BRIGHTNESS; |
14731 |
| - DRM_INFO("applying inverted panel brightness quirk\n"); |
14732 |
| -} |
14733 |
| - |
14734 |
| -/* Some VBT's incorrectly indicate no backlight is present */ |
14735 |
| -static void quirk_backlight_present(struct drm_device *dev) |
14736 |
| -{ |
14737 |
| - struct drm_i915_private *dev_priv = to_i915(dev); |
14738 |
| - dev_priv->quirks |= QUIRK_BACKLIGHT_PRESENT; |
14739 |
| - DRM_INFO("applying backlight present quirk\n"); |
14740 |
| -} |
14741 |
| - |
14742 |
| -/* Toshiba Satellite P50-C-18C requires T12 delay to be min 800ms |
14743 |
| - * which is 300 ms greater than eDP spec T12 min. |
14744 |
| - */ |
14745 |
| -static void quirk_increase_t12_delay(struct drm_device *dev) |
14746 |
| -{ |
14747 |
| - struct drm_i915_private *dev_priv = to_i915(dev); |
14748 |
| - |
14749 |
| - dev_priv->quirks |= QUIRK_INCREASE_T12_DELAY; |
14750 |
| - DRM_INFO("Applying T12 delay quirk\n"); |
14751 |
| -} |
14752 |
| - |
14753 |
| -/* |
14754 |
| - * GeminiLake NUC HDMI outputs require additional off time |
14755 |
| - * this allows the onboard retimer to correctly sync to signal |
14756 |
| - */ |
14757 |
| -static void quirk_increase_ddi_disabled_time(struct drm_device *dev) |
14758 |
| -{ |
14759 |
| - struct drm_i915_private *dev_priv = to_i915(dev); |
14760 |
| - |
14761 |
| - dev_priv->quirks |= QUIRK_INCREASE_DDI_DISABLED_TIME; |
14762 |
| - DRM_INFO("Applying Increase DDI Disabled quirk\n"); |
14763 |
| -} |
14764 |
| - |
14765 |
| -struct intel_quirk { |
14766 |
| - int device; |
14767 |
| - int subsystem_vendor; |
14768 |
| - int subsystem_device; |
14769 |
| - void (*hook)(struct drm_device *dev); |
14770 |
| -}; |
14771 |
| - |
14772 |
| -/* For systems that don't have a meaningful PCI subdevice/subvendor ID */ |
14773 |
| -struct intel_dmi_quirk { |
14774 |
| - void (*hook)(struct drm_device *dev); |
14775 |
| - const struct dmi_system_id (*dmi_id_list)[]; |
14776 |
| -}; |
14777 |
| - |
14778 |
| -static int intel_dmi_reverse_brightness(const struct dmi_system_id *id) |
14779 |
| -{ |
14780 |
| - DRM_INFO("Backlight polarity reversed on %s\n", id->ident); |
14781 |
| - return 1; |
14782 |
| -} |
14783 |
| - |
14784 |
| -static const struct intel_dmi_quirk intel_dmi_quirks[] = { |
14785 |
| - { |
14786 |
| - .dmi_id_list = &(const struct dmi_system_id[]) { |
14787 |
| - { |
14788 |
| - .callback = intel_dmi_reverse_brightness, |
14789 |
| - .ident = "NCR Corporation", |
14790 |
| - .matches = {DMI_MATCH(DMI_SYS_VENDOR, "NCR Corporation"), |
14791 |
| - DMI_MATCH(DMI_PRODUCT_NAME, ""), |
14792 |
| - }, |
14793 |
| - }, |
14794 |
| - { } /* terminating entry */ |
14795 |
| - }, |
14796 |
| - .hook = quirk_invert_brightness, |
14797 |
| - }, |
14798 |
| -}; |
14799 |
| - |
14800 |
| -static struct intel_quirk intel_quirks[] = { |
14801 |
| - /* Lenovo U160 cannot use SSC on LVDS */ |
14802 |
| - { 0x0046, 0x17aa, 0x3920, quirk_ssc_force_disable }, |
14803 |
| - |
14804 |
| - /* Sony Vaio Y cannot use SSC on LVDS */ |
14805 |
| - { 0x0046, 0x104d, 0x9076, quirk_ssc_force_disable }, |
14806 |
| - |
14807 |
| - /* Acer Aspire 5734Z must invert backlight brightness */ |
14808 |
| - { 0x2a42, 0x1025, 0x0459, quirk_invert_brightness }, |
14809 |
| - |
14810 |
| - /* Acer/eMachines G725 */ |
14811 |
| - { 0x2a42, 0x1025, 0x0210, quirk_invert_brightness }, |
14812 |
| - |
14813 |
| - /* Acer/eMachines e725 */ |
14814 |
| - { 0x2a42, 0x1025, 0x0212, quirk_invert_brightness }, |
14815 |
| - |
14816 |
| - /* Acer/Packard Bell NCL20 */ |
14817 |
| - { 0x2a42, 0x1025, 0x034b, quirk_invert_brightness }, |
14818 |
| - |
14819 |
| - /* Acer Aspire 4736Z */ |
14820 |
| - { 0x2a42, 0x1025, 0x0260, quirk_invert_brightness }, |
14821 |
| - |
14822 |
| - /* Acer Aspire 5336 */ |
14823 |
| - { 0x2a42, 0x1025, 0x048a, quirk_invert_brightness }, |
14824 |
| - |
14825 |
| - /* Acer C720 and C720P Chromebooks (Celeron 2955U) have backlights */ |
14826 |
| - { 0x0a06, 0x1025, 0x0a11, quirk_backlight_present }, |
14827 |
| - |
14828 |
| - /* Acer C720 Chromebook (Core i3 4005U) */ |
14829 |
| - { 0x0a16, 0x1025, 0x0a11, quirk_backlight_present }, |
14830 |
| - |
14831 |
| - /* Apple Macbook 2,1 (Core 2 T7400) */ |
14832 |
| - { 0x27a2, 0x8086, 0x7270, quirk_backlight_present }, |
14833 |
| - |
14834 |
| - /* Apple Macbook 4,1 */ |
14835 |
| - { 0x2a02, 0x106b, 0x00a1, quirk_backlight_present }, |
14836 |
| - |
14837 |
| - /* Toshiba CB35 Chromebook (Celeron 2955U) */ |
14838 |
| - { 0x0a06, 0x1179, 0x0a88, quirk_backlight_present }, |
14839 |
| - |
14840 |
| - /* HP Chromebook 14 (Celeron 2955U) */ |
14841 |
| - { 0x0a06, 0x103c, 0x21ed, quirk_backlight_present }, |
14842 |
| - |
14843 |
| - /* Dell Chromebook 11 */ |
14844 |
| - { 0x0a06, 0x1028, 0x0a35, quirk_backlight_present }, |
14845 |
| - |
14846 |
| - /* Dell Chromebook 11 (2015 version) */ |
14847 |
| - { 0x0a16, 0x1028, 0x0a35, quirk_backlight_present }, |
14848 |
| - |
14849 |
| - /* Toshiba Satellite P50-C-18C */ |
14850 |
| - { 0x191B, 0x1179, 0xF840, quirk_increase_t12_delay }, |
14851 |
| - |
14852 |
| - /* GeminiLake NUC */ |
14853 |
| - { 0x3185, 0x8086, 0x2072, quirk_increase_ddi_disabled_time }, |
14854 |
| - { 0x3184, 0x8086, 0x2072, quirk_increase_ddi_disabled_time }, |
14855 |
| - /* ASRock ITX*/ |
14856 |
| - { 0x3185, 0x1849, 0x2212, quirk_increase_ddi_disabled_time }, |
14857 |
| - { 0x3184, 0x1849, 0x2212, quirk_increase_ddi_disabled_time }, |
14858 |
| -}; |
14859 |
| - |
14860 |
| -static void intel_init_quirks(struct drm_device *dev) |
14861 |
| -{ |
14862 |
| - struct pci_dev *d = dev->pdev; |
14863 |
| - int i; |
14864 |
| - |
14865 |
| - for (i = 0; i < ARRAY_SIZE(intel_quirks); i++) { |
14866 |
| - struct intel_quirk *q = &intel_quirks[i]; |
14867 |
| - |
14868 |
| - if (d->device == q->device && |
14869 |
| - (d->subsystem_vendor == q->subsystem_vendor || |
14870 |
| - q->subsystem_vendor == PCI_ANY_ID) && |
14871 |
| - (d->subsystem_device == q->subsystem_device || |
14872 |
| - q->subsystem_device == PCI_ANY_ID)) |
14873 |
| - q->hook(dev); |
14874 |
| - } |
14875 |
| - for (i = 0; i < ARRAY_SIZE(intel_dmi_quirks); i++) { |
14876 |
| - if (dmi_check_system(*intel_dmi_quirks[i].dmi_id_list) != 0) |
14877 |
| - intel_dmi_quirks[i].hook(dev); |
14878 |
| - } |
14879 |
| -} |
14880 |
| - |
14881 | 14712 | /* Disable the VGA plane that we never use */
|
14882 | 14713 | static void i915_disable_vga(struct drm_i915_private *dev_priv)
|
14883 | 14714 | {
|
|
0 commit comments