Skip to content

Commit 9929c09

Browse files
committed
Merge tag 'drm-intel-fixes-2016-09-15' of git://anongit.freedesktop.org/drm-intel into drm-fixes
i915 fixes from Jani. * tag 'drm-intel-fixes-2016-09-15' of git://anongit.freedesktop.org/drm-intel: drm/i915: Ignore OpRegion panel type except on select machines Revert "drm/i915/psr: Make idle_frames sensible again" drm/i915: Restore lost "Initialized i915" welcome message
2 parents 7eebfba + ea54ff4 commit 9929c09

File tree

3 files changed

+39
-7
lines changed

3 files changed

+39
-7
lines changed

drivers/gpu/drm/i915/i915_drv.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,6 +1281,11 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
12811281

12821282
intel_runtime_pm_enable(dev_priv);
12831283

1284+
/* Everything is in place, we can now relax! */
1285+
DRM_INFO("Initialized %s %d.%d.%d %s for %s on minor %d\n",
1286+
driver.name, driver.major, driver.minor, driver.patchlevel,
1287+
driver.date, pci_name(pdev), dev_priv->drm.primary->index);
1288+
12841289
intel_runtime_pm_put(dev_priv);
12851290

12861291
return 0;

drivers/gpu/drm/i915/intel_opregion.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,23 @@ int intel_opregion_setup(struct drm_i915_private *dev_priv)
10471047
return err;
10481048
}
10491049

1050+
static int intel_use_opregion_panel_type_callback(const struct dmi_system_id *id)
1051+
{
1052+
DRM_INFO("Using panel type from OpRegion on %s\n", id->ident);
1053+
return 1;
1054+
}
1055+
1056+
static const struct dmi_system_id intel_use_opregion_panel_type[] = {
1057+
{
1058+
.callback = intel_use_opregion_panel_type_callback,
1059+
.ident = "Conrac GmbH IX45GM2",
1060+
.matches = {DMI_MATCH(DMI_SYS_VENDOR, "Conrac GmbH"),
1061+
DMI_MATCH(DMI_PRODUCT_NAME, "IX45GM2"),
1062+
},
1063+
},
1064+
{ }
1065+
};
1066+
10501067
int
10511068
intel_opregion_get_panel_type(struct drm_i915_private *dev_priv)
10521069
{
@@ -1072,6 +1089,16 @@ intel_opregion_get_panel_type(struct drm_i915_private *dev_priv)
10721089
return -ENODEV;
10731090
}
10741091

1092+
/*
1093+
* So far we know that some machined must use it, others must not use it.
1094+
* There doesn't seem to be any way to determine which way to go, except
1095+
* via a quirk list :(
1096+
*/
1097+
if (!dmi_check_system(intel_use_opregion_panel_type)) {
1098+
DRM_DEBUG_KMS("Ignoring OpRegion panel type (%d)\n", ret - 1);
1099+
return -ENODEV;
1100+
}
1101+
10751102
/*
10761103
* FIXME On Dell XPS 13 9350 the OpRegion panel type (0) gives us
10771104
* low vswing for eDP, whereas the VBT panel type (2) gives us normal

drivers/gpu/drm/i915/intel_psr.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,14 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp)
255255
struct drm_i915_private *dev_priv = to_i915(dev);
256256

257257
uint32_t max_sleep_time = 0x1f;
258-
/* Lately it was identified that depending on panel idle frame count
259-
* calculated at HW can be off by 1. So let's use what came
260-
* from VBT + 1.
261-
* There are also other cases where panel demands at least 4
262-
* but VBT is not being set. To cover these 2 cases lets use
263-
* at least 5 when VBT isn't set to be on the safest side.
258+
/*
259+
* Let's respect VBT in case VBT asks a higher idle_frame value.
260+
* Let's use 6 as the minimum to cover all known cases including
261+
* the off-by-one issue that HW has in some cases. Also there are
262+
* cases where sink should be able to train
263+
* with the 5 or 6 idle patterns.
264264
*/
265-
uint32_t idle_frames = dev_priv->vbt.psr.idle_frames + 1;
265+
uint32_t idle_frames = max(6, dev_priv->vbt.psr.idle_frames);
266266
uint32_t val = EDP_PSR_ENABLE;
267267

268268
val |= max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT;

0 commit comments

Comments
 (0)