Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel
* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel: drm/i915/lvds: Add AOpen i915GMm-HFS to the list of false-positive LVDS agp/intel: Fix device names of i845 and 845G drm/i915: Disable GPU semaphores on SandyBridge mobile drm/i915/execbuffer: Clear domains before beginning reloc processing drm/i915/execbuffer: Reorder relocations to match new object order drm/i915: Fix error handler to capture the first batch after the seqno drm/i915: Add a module option to override the use of SSC drm/i915/panel: The backlight is enabled if the current value is non-zero drm/i915/debugfs: Correct format after changing type of err object 'size'
This commit is contained in:
commit
891cc22832
@ -717,8 +717,8 @@ static const struct intel_agp_driver_description {
|
|||||||
{ PCI_DEVICE_ID_INTEL_82820_UP_HB, "i820", &intel_820_driver },
|
{ PCI_DEVICE_ID_INTEL_82820_UP_HB, "i820", &intel_820_driver },
|
||||||
{ PCI_DEVICE_ID_INTEL_82830_HB, "830M", &intel_830mp_driver },
|
{ PCI_DEVICE_ID_INTEL_82830_HB, "830M", &intel_830mp_driver },
|
||||||
{ PCI_DEVICE_ID_INTEL_82840_HB, "i840", &intel_840_driver },
|
{ PCI_DEVICE_ID_INTEL_82840_HB, "i840", &intel_840_driver },
|
||||||
{ PCI_DEVICE_ID_INTEL_82845_HB, "845G", &intel_845_driver },
|
{ PCI_DEVICE_ID_INTEL_82845_HB, "i845", &intel_845_driver },
|
||||||
{ PCI_DEVICE_ID_INTEL_82845G_HB, "830M", &intel_845_driver },
|
{ PCI_DEVICE_ID_INTEL_82845G_HB, "845G", &intel_845_driver },
|
||||||
{ PCI_DEVICE_ID_INTEL_82850_HB, "i850", &intel_850_driver },
|
{ PCI_DEVICE_ID_INTEL_82850_HB, "i850", &intel_850_driver },
|
||||||
{ PCI_DEVICE_ID_INTEL_82854_HB, "854", &intel_845_driver },
|
{ PCI_DEVICE_ID_INTEL_82854_HB, "854", &intel_845_driver },
|
||||||
{ PCI_DEVICE_ID_INTEL_82855PM_HB, "855PM", &intel_845_driver },
|
{ PCI_DEVICE_ID_INTEL_82855PM_HB, "855PM", &intel_845_driver },
|
||||||
|
@ -1361,7 +1361,7 @@ static const struct intel_gtt_driver_description {
|
|||||||
&i81x_gtt_driver},
|
&i81x_gtt_driver},
|
||||||
{ PCI_DEVICE_ID_INTEL_82830_CGC, "830M",
|
{ PCI_DEVICE_ID_INTEL_82830_CGC, "830M",
|
||||||
&i8xx_gtt_driver},
|
&i8xx_gtt_driver},
|
||||||
{ PCI_DEVICE_ID_INTEL_82845G_IG, "830M",
|
{ PCI_DEVICE_ID_INTEL_82845G_IG, "845G",
|
||||||
&i8xx_gtt_driver},
|
&i8xx_gtt_driver},
|
||||||
{ PCI_DEVICE_ID_INTEL_82854_IG, "854",
|
{ PCI_DEVICE_ID_INTEL_82854_IG, "854",
|
||||||
&i8xx_gtt_driver},
|
&i8xx_gtt_driver},
|
||||||
|
@ -703,7 +703,7 @@ static void print_error_buffers(struct seq_file *m,
|
|||||||
seq_printf(m, "%s [%d]:\n", name, count);
|
seq_printf(m, "%s [%d]:\n", name, count);
|
||||||
|
|
||||||
while (count--) {
|
while (count--) {
|
||||||
seq_printf(m, " %08x %8zd %04x %04x %08x%s%s%s%s%s%s",
|
seq_printf(m, " %08x %8u %04x %04x %08x%s%s%s%s%s%s",
|
||||||
err->gtt_offset,
|
err->gtt_offset,
|
||||||
err->size,
|
err->size,
|
||||||
err->read_domains,
|
err->read_domains,
|
||||||
|
@ -49,6 +49,9 @@ module_param_named(powersave, i915_powersave, int, 0600);
|
|||||||
unsigned int i915_lvds_downclock = 0;
|
unsigned int i915_lvds_downclock = 0;
|
||||||
module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
|
module_param_named(lvds_downclock, i915_lvds_downclock, int, 0400);
|
||||||
|
|
||||||
|
unsigned int i915_panel_use_ssc = 1;
|
||||||
|
module_param_named(lvds_use_ssc, i915_panel_use_ssc, int, 0600);
|
||||||
|
|
||||||
bool i915_try_reset = true;
|
bool i915_try_reset = true;
|
||||||
module_param_named(reset, i915_try_reset, bool, 0600);
|
module_param_named(reset, i915_try_reset, bool, 0600);
|
||||||
|
|
||||||
|
@ -954,6 +954,7 @@ extern int i915_max_ioctl;
|
|||||||
extern unsigned int i915_fbpercrtc;
|
extern unsigned int i915_fbpercrtc;
|
||||||
extern unsigned int i915_powersave;
|
extern unsigned int i915_powersave;
|
||||||
extern unsigned int i915_lvds_downclock;
|
extern unsigned int i915_lvds_downclock;
|
||||||
|
extern unsigned int i915_panel_use_ssc;
|
||||||
|
|
||||||
extern int i915_suspend(struct drm_device *dev, pm_message_t state);
|
extern int i915_suspend(struct drm_device *dev, pm_message_t state);
|
||||||
extern int i915_resume(struct drm_device *dev);
|
extern int i915_resume(struct drm_device *dev);
|
||||||
|
@ -464,8 +464,6 @@ i915_gem_execbuffer_relocate(struct drm_device *dev,
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
list_for_each_entry(obj, objects, exec_list) {
|
list_for_each_entry(obj, objects, exec_list) {
|
||||||
obj->base.pending_read_domains = 0;
|
|
||||||
obj->base.pending_write_domain = 0;
|
|
||||||
ret = i915_gem_execbuffer_relocate_object(obj, eb);
|
ret = i915_gem_execbuffer_relocate_object(obj, eb);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
@ -505,6 +503,9 @@ i915_gem_execbuffer_reserve(struct intel_ring_buffer *ring,
|
|||||||
list_move(&obj->exec_list, &ordered_objects);
|
list_move(&obj->exec_list, &ordered_objects);
|
||||||
else
|
else
|
||||||
list_move_tail(&obj->exec_list, &ordered_objects);
|
list_move_tail(&obj->exec_list, &ordered_objects);
|
||||||
|
|
||||||
|
obj->base.pending_read_domains = 0;
|
||||||
|
obj->base.pending_write_domain = 0;
|
||||||
}
|
}
|
||||||
list_splice(&ordered_objects, objects);
|
list_splice(&ordered_objects, objects);
|
||||||
|
|
||||||
@ -636,6 +637,7 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
|
|||||||
{
|
{
|
||||||
struct drm_i915_gem_relocation_entry *reloc;
|
struct drm_i915_gem_relocation_entry *reloc;
|
||||||
struct drm_i915_gem_object *obj;
|
struct drm_i915_gem_object *obj;
|
||||||
|
int *reloc_offset;
|
||||||
int i, total, ret;
|
int i, total, ret;
|
||||||
|
|
||||||
/* We may process another execbuffer during the unlock... */
|
/* We may process another execbuffer during the unlock... */
|
||||||
@ -653,8 +655,11 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
|
|||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
total += exec[i].relocation_count;
|
total += exec[i].relocation_count;
|
||||||
|
|
||||||
|
reloc_offset = drm_malloc_ab(count, sizeof(*reloc_offset));
|
||||||
reloc = drm_malloc_ab(total, sizeof(*reloc));
|
reloc = drm_malloc_ab(total, sizeof(*reloc));
|
||||||
if (reloc == NULL) {
|
if (reloc == NULL || reloc_offset == NULL) {
|
||||||
|
drm_free_large(reloc);
|
||||||
|
drm_free_large(reloc_offset);
|
||||||
mutex_lock(&dev->struct_mutex);
|
mutex_lock(&dev->struct_mutex);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
@ -672,6 +677,7 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reloc_offset[i] = total;
|
||||||
total += exec[i].relocation_count;
|
total += exec[i].relocation_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -705,17 +711,12 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
total = 0;
|
|
||||||
list_for_each_entry(obj, objects, exec_list) {
|
list_for_each_entry(obj, objects, exec_list) {
|
||||||
obj->base.pending_read_domains = 0;
|
int offset = obj->exec_entry - exec;
|
||||||
obj->base.pending_write_domain = 0;
|
|
||||||
ret = i915_gem_execbuffer_relocate_object_slow(obj, eb,
|
ret = i915_gem_execbuffer_relocate_object_slow(obj, eb,
|
||||||
reloc + total);
|
reloc + reloc_offset[offset]);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
total += exec->relocation_count;
|
|
||||||
exec++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Leave the user relocations as are, this is the painfully slow path,
|
/* Leave the user relocations as are, this is the painfully slow path,
|
||||||
@ -726,6 +727,7 @@ i915_gem_execbuffer_relocate_slow(struct drm_device *dev,
|
|||||||
|
|
||||||
err:
|
err:
|
||||||
drm_free_large(reloc);
|
drm_free_large(reloc);
|
||||||
|
drm_free_large(reloc_offset);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -770,7 +772,8 @@ i915_gem_execbuffer_sync_rings(struct drm_i915_gem_object *obj,
|
|||||||
if (from == NULL || to == from)
|
if (from == NULL || to == from)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (INTEL_INFO(obj->base.dev)->gen < 6)
|
/* XXX gpu semaphores are currently causing hard hangs on SNB mobile */
|
||||||
|
if (INTEL_INFO(obj->base.dev)->gen < 6 || IS_MOBILE(obj->base.dev))
|
||||||
return i915_gem_object_wait_rendering(obj, true);
|
return i915_gem_object_wait_rendering(obj, true);
|
||||||
|
|
||||||
idx = intel_ring_sync_index(from, to);
|
idx = intel_ring_sync_index(from, to);
|
||||||
|
@ -720,7 +720,7 @@ i915_error_first_batchbuffer(struct drm_i915_private *dev_priv,
|
|||||||
if (obj->ring != ring)
|
if (obj->ring != ring)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!i915_seqno_passed(obj->last_rendering_seqno, seqno))
|
if (i915_seqno_passed(seqno, obj->last_rendering_seqno))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((obj->base.read_domains & I915_GEM_DOMAIN_COMMAND) == 0)
|
if ((obj->base.read_domains & I915_GEM_DOMAIN_COMMAND) == 0)
|
||||||
|
@ -264,17 +264,12 @@ parse_general_features(struct drm_i915_private *dev_priv,
|
|||||||
dev_priv->int_crt_support = general->int_crt_support;
|
dev_priv->int_crt_support = general->int_crt_support;
|
||||||
dev_priv->lvds_use_ssc = general->enable_ssc;
|
dev_priv->lvds_use_ssc = general->enable_ssc;
|
||||||
|
|
||||||
if (dev_priv->lvds_use_ssc) {
|
if (IS_I85X(dev))
|
||||||
if (IS_I85X(dev))
|
dev_priv->lvds_ssc_freq = general->ssc_freq ? 66 : 48;
|
||||||
dev_priv->lvds_ssc_freq =
|
else if (IS_GEN5(dev) || IS_GEN6(dev))
|
||||||
general->ssc_freq ? 66 : 48;
|
dev_priv->lvds_ssc_freq = general->ssc_freq ? 100 : 120;
|
||||||
else if (IS_GEN5(dev) || IS_GEN6(dev))
|
else
|
||||||
dev_priv->lvds_ssc_freq =
|
dev_priv->lvds_ssc_freq = general->ssc_freq ? 100 : 96;
|
||||||
general->ssc_freq ? 100 : 120;
|
|
||||||
else
|
|
||||||
dev_priv->lvds_ssc_freq =
|
|
||||||
general->ssc_freq ? 100 : 96;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3822,6 +3822,11 @@ static void intel_update_watermarks(struct drm_device *dev)
|
|||||||
sr_hdisplay, sr_htotal, pixel_size);
|
sr_hdisplay, sr_htotal, pixel_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
|
||||||
|
{
|
||||||
|
return dev_priv->lvds_use_ssc && i915_panel_use_ssc;
|
||||||
|
}
|
||||||
|
|
||||||
static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
||||||
struct drm_display_mode *mode,
|
struct drm_display_mode *mode,
|
||||||
struct drm_display_mode *adjusted_mode,
|
struct drm_display_mode *adjusted_mode,
|
||||||
@ -3884,7 +3889,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
|||||||
num_connectors++;
|
num_connectors++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_lvds && dev_priv->lvds_use_ssc && num_connectors < 2) {
|
if (is_lvds && intel_panel_use_ssc(dev_priv) && num_connectors < 2) {
|
||||||
refclk = dev_priv->lvds_ssc_freq * 1000;
|
refclk = dev_priv->lvds_ssc_freq * 1000;
|
||||||
DRM_DEBUG_KMS("using SSC reference clock of %d MHz\n",
|
DRM_DEBUG_KMS("using SSC reference clock of %d MHz\n",
|
||||||
refclk / 1000);
|
refclk / 1000);
|
||||||
@ -4059,7 +4064,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
|||||||
udelay(200);
|
udelay(200);
|
||||||
|
|
||||||
if (has_edp_encoder) {
|
if (has_edp_encoder) {
|
||||||
if (dev_priv->lvds_use_ssc) {
|
if (intel_panel_use_ssc(dev_priv)) {
|
||||||
temp |= DREF_SSC1_ENABLE;
|
temp |= DREF_SSC1_ENABLE;
|
||||||
I915_WRITE(PCH_DREF_CONTROL, temp);
|
I915_WRITE(PCH_DREF_CONTROL, temp);
|
||||||
|
|
||||||
@ -4070,13 +4075,13 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
|||||||
|
|
||||||
/* Enable CPU source on CPU attached eDP */
|
/* Enable CPU source on CPU attached eDP */
|
||||||
if (!intel_encoder_is_pch_edp(&has_edp_encoder->base)) {
|
if (!intel_encoder_is_pch_edp(&has_edp_encoder->base)) {
|
||||||
if (dev_priv->lvds_use_ssc)
|
if (intel_panel_use_ssc(dev_priv))
|
||||||
temp |= DREF_CPU_SOURCE_OUTPUT_DOWNSPREAD;
|
temp |= DREF_CPU_SOURCE_OUTPUT_DOWNSPREAD;
|
||||||
else
|
else
|
||||||
temp |= DREF_CPU_SOURCE_OUTPUT_NONSPREAD;
|
temp |= DREF_CPU_SOURCE_OUTPUT_NONSPREAD;
|
||||||
} else {
|
} else {
|
||||||
/* Enable SSC on PCH eDP if needed */
|
/* Enable SSC on PCH eDP if needed */
|
||||||
if (dev_priv->lvds_use_ssc) {
|
if (intel_panel_use_ssc(dev_priv)) {
|
||||||
DRM_ERROR("enabling SSC on PCH\n");
|
DRM_ERROR("enabling SSC on PCH\n");
|
||||||
temp |= DREF_SUPERSPREAD_SOURCE_ENABLE;
|
temp |= DREF_SUPERSPREAD_SOURCE_ENABLE;
|
||||||
}
|
}
|
||||||
@ -4104,7 +4109,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
|||||||
int factor = 21;
|
int factor = 21;
|
||||||
|
|
||||||
if (is_lvds) {
|
if (is_lvds) {
|
||||||
if ((dev_priv->lvds_use_ssc &&
|
if ((intel_panel_use_ssc(dev_priv) &&
|
||||||
dev_priv->lvds_ssc_freq == 100) ||
|
dev_priv->lvds_ssc_freq == 100) ||
|
||||||
(I915_READ(PCH_LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP)
|
(I915_READ(PCH_LVDS) & LVDS_CLKB_POWER_MASK) == LVDS_CLKB_POWER_UP)
|
||||||
factor = 25;
|
factor = 25;
|
||||||
@ -4183,7 +4188,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
|
|||||||
/* XXX: just matching BIOS for now */
|
/* XXX: just matching BIOS for now */
|
||||||
/* dpll |= PLL_REF_INPUT_TVCLKINBC; */
|
/* dpll |= PLL_REF_INPUT_TVCLKINBC; */
|
||||||
dpll |= 3;
|
dpll |= 3;
|
||||||
else if (is_lvds && dev_priv->lvds_use_ssc && num_connectors < 2)
|
else if (is_lvds && intel_panel_use_ssc(dev_priv) && num_connectors < 2)
|
||||||
dpll |= PLLB_REF_INPUT_SPREADSPECTRUMIN;
|
dpll |= PLLB_REF_INPUT_SPREADSPECTRUMIN;
|
||||||
else
|
else
|
||||||
dpll |= PLL_REF_INPUT_DREFCLK;
|
dpll |= PLL_REF_INPUT_DREFCLK;
|
||||||
|
@ -702,6 +702,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
|
|||||||
DMI_MATCH(DMI_BOARD_NAME, "i915GMx-F"),
|
DMI_MATCH(DMI_BOARD_NAME, "i915GMx-F"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.callback = intel_no_lvds_dmi_callback,
|
||||||
|
.ident = "AOpen i915GMm-HFS",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
|
||||||
|
DMI_MATCH(DMI_BOARD_NAME, "i915GMm-HFS"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.callback = intel_no_lvds_dmi_callback,
|
.callback = intel_no_lvds_dmi_callback,
|
||||||
.ident = "Aopen i945GTt-VFA",
|
.ident = "Aopen i945GTt-VFA",
|
||||||
|
@ -278,6 +278,6 @@ void intel_panel_setup_backlight(struct drm_device *dev)
|
|||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||||
|
|
||||||
dev_priv->backlight_level = intel_panel_get_max_backlight(dev);
|
dev_priv->backlight_level = intel_panel_get_backlight(dev);
|
||||||
dev_priv->backlight_enabled = dev_priv->backlight_level != 0;
|
dev_priv->backlight_enabled = dev_priv->backlight_level != 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user