Commit 280201ac authored by Timo Aaltonen's avatar Timo Aaltonen Committed by Kamal Mostafa

UBUNTU: SAUCE: i915_bpo: Revert "drm/i915: Get panel_type from OpRegion panel details"

BugLink: http://bugs.launchpad.net/bugs/1599109

This commit has been reported to cause some flicker issues on a specific
Skylake machine

https://lists.freedesktop.org/archives/intel-gfx/2016-June/098826.html

So revert this for now until a proper fix for the issue is provided:

commit a0562819
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Mon Apr 11 10:23:51 2016 +0300

    drm/i915: Get panel_type from OpRegion panel details
Signed-off-by: default avatarTimo Aaltonen <timo.aaltonen@canonical.com>
Acked-by: default avatarTim Gardner <tim.gardner@canonical.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 9f81d279
......@@ -3505,7 +3505,6 @@ extern int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder,
bool enable);
extern int intel_opregion_notify_adapter(struct drm_device *dev,
pci_power_t state);
extern int intel_opregion_get_panel_type(struct drm_device *dev);
#else
static inline int intel_opregion_setup(struct drm_device *dev) { return 0; }
static inline void intel_opregion_init(struct drm_device *dev) { return; }
......@@ -3521,10 +3520,6 @@ intel_opregion_notify_adapter(struct drm_device *dev, pci_power_t state)
{
return 0;
}
static inline int intel_opregion_get_panel_type(struct drm_device *dev)
{
return -ENODEV;
}
#endif
/* intel_acpi.c */
......
......@@ -210,29 +210,19 @@ parse_lfp_panel_data(struct drm_i915_private *dev_priv,
struct drm_display_mode *panel_fixed_mode;
int panel_type;
int drrs_mode;
int ret;
lvds_options = find_section(bdb, BDB_LVDS_OPTIONS);
if (!lvds_options)
return;
dev_priv->vbt.lvds_dither = lvds_options->pixel_dither;
ret = intel_opregion_get_panel_type(dev_priv->dev);
if (ret >= 0) {
WARN_ON(ret > 0xf);
panel_type = ret;
DRM_DEBUG_KMS("Panel type: %d (OpRegion)\n", panel_type);
} else {
if (lvds_options->panel_type > 0xf) {
DRM_DEBUG_KMS("Invalid VBT panel type 0x%x\n",
lvds_options->panel_type);
return;
}
panel_type = lvds_options->panel_type;
DRM_DEBUG_KMS("Panel type: %d (VBT)\n", panel_type);
if (lvds_options->panel_type > 0xf) {
DRM_DEBUG_KMS("Invalid VBT panel type 0x%x\n",
lvds_options->panel_type);
return;
}
panel_type = lvds_options->panel_type;
dev_priv->vbt.panel_type = panel_type;
drrs_mode = (lvds_options->dps_panel_type_bits
......
......@@ -1012,31 +1012,3 @@ int intel_opregion_setup(struct drm_device *dev)
memunmap(base);
return err;
}
int
intel_opregion_get_panel_type(struct drm_device *dev)
{
u32 panel_details;
int ret;
ret = swsci(dev, SWSCI_GBDA_PANEL_DETAILS, 0x0, &panel_details);
if (ret) {
DRM_DEBUG_KMS("Failed to get panel details from OpRegion (%d)\n",
ret);
return ret;
}
ret = (panel_details >> 8) & 0xff;
if (ret > 0x10) {
DRM_DEBUG_KMS("Invalid OpRegion panel type 0x%x\n", ret);
return -EINVAL;
}
/* fall back to VBT panel type? */
if (ret == 0x0) {
DRM_DEBUG_KMS("No panel type in OpRegion\n");
return -ENODEV;
}
return ret - 1;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment