mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 15:13:55 +08:00
Merge branch 'drm-intel-fixes' into drm-intel-next
This commit is contained in:
commit
e489bda422
@ -1245,13 +1245,17 @@ static int i915_context_status(struct seq_file *m, void *unused)
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
seq_printf(m, "power context ");
|
if (dev_priv->pwrctx) {
|
||||||
describe_obj(m, dev_priv->pwrctx);
|
seq_printf(m, "power context ");
|
||||||
seq_printf(m, "\n");
|
describe_obj(m, dev_priv->pwrctx);
|
||||||
|
seq_printf(m, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
seq_printf(m, "render context ");
|
if (dev_priv->renderctx) {
|
||||||
describe_obj(m, dev_priv->renderctx);
|
seq_printf(m, "render context ");
|
||||||
seq_printf(m, "\n");
|
describe_obj(m, dev_priv->renderctx);
|
||||||
|
seq_printf(m, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
mutex_unlock(&dev->mode_config.mutex);
|
mutex_unlock(&dev->mode_config.mutex);
|
||||||
|
|
||||||
|
@ -998,8 +998,6 @@ extern bool i915_enable_hangcheck;
|
|||||||
|
|
||||||
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);
|
||||||
extern void i915_save_display(struct drm_device *dev);
|
|
||||||
extern void i915_restore_display(struct drm_device *dev);
|
|
||||||
extern int i915_master_create(struct drm_device *dev, struct drm_master *master);
|
extern int i915_master_create(struct drm_device *dev, struct drm_master *master);
|
||||||
extern void i915_master_destroy(struct drm_device *dev, struct drm_master *master);
|
extern void i915_master_destroy(struct drm_device *dev, struct drm_master *master);
|
||||||
|
|
||||||
|
@ -597,7 +597,7 @@ static void i915_restore_modeset_reg(struct drm_device *dev)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void i915_save_display(struct drm_device *dev)
|
static void i915_save_display(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||||
|
|
||||||
@ -678,7 +678,6 @@ void i915_save_display(struct drm_device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* VGA state */
|
/* VGA state */
|
||||||
mutex_lock(&dev->struct_mutex);
|
|
||||||
dev_priv->saveVGA0 = I915_READ(VGA0);
|
dev_priv->saveVGA0 = I915_READ(VGA0);
|
||||||
dev_priv->saveVGA1 = I915_READ(VGA1);
|
dev_priv->saveVGA1 = I915_READ(VGA1);
|
||||||
dev_priv->saveVGA_PD = I915_READ(VGA_PD);
|
dev_priv->saveVGA_PD = I915_READ(VGA_PD);
|
||||||
@ -688,10 +687,9 @@ void i915_save_display(struct drm_device *dev)
|
|||||||
dev_priv->saveVGACNTRL = I915_READ(VGACNTRL);
|
dev_priv->saveVGACNTRL = I915_READ(VGACNTRL);
|
||||||
|
|
||||||
i915_save_vga(dev);
|
i915_save_vga(dev);
|
||||||
mutex_unlock(&dev->struct_mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void i915_restore_display(struct drm_device *dev)
|
static void i915_restore_display(struct drm_device *dev)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||||
|
|
||||||
@ -783,7 +781,6 @@ void i915_restore_display(struct drm_device *dev)
|
|||||||
else
|
else
|
||||||
I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL);
|
I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL);
|
||||||
|
|
||||||
mutex_lock(&dev->struct_mutex);
|
|
||||||
I915_WRITE(VGA0, dev_priv->saveVGA0);
|
I915_WRITE(VGA0, dev_priv->saveVGA0);
|
||||||
I915_WRITE(VGA1, dev_priv->saveVGA1);
|
I915_WRITE(VGA1, dev_priv->saveVGA1);
|
||||||
I915_WRITE(VGA_PD, dev_priv->saveVGA_PD);
|
I915_WRITE(VGA_PD, dev_priv->saveVGA_PD);
|
||||||
@ -791,7 +788,6 @@ void i915_restore_display(struct drm_device *dev)
|
|||||||
udelay(150);
|
udelay(150);
|
||||||
|
|
||||||
i915_restore_vga(dev);
|
i915_restore_vga(dev);
|
||||||
mutex_unlock(&dev->struct_mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int i915_save_state(struct drm_device *dev)
|
int i915_save_state(struct drm_device *dev)
|
||||||
@ -801,6 +797,8 @@ int i915_save_state(struct drm_device *dev)
|
|||||||
|
|
||||||
pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB);
|
pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB);
|
||||||
|
|
||||||
|
mutex_lock(&dev->struct_mutex);
|
||||||
|
|
||||||
/* Hardware status page */
|
/* Hardware status page */
|
||||||
dev_priv->saveHWS = I915_READ(HWS_PGA);
|
dev_priv->saveHWS = I915_READ(HWS_PGA);
|
||||||
|
|
||||||
@ -840,6 +838,8 @@ int i915_save_state(struct drm_device *dev)
|
|||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
dev_priv->saveSWF2[i] = I915_READ(SWF30 + (i << 2));
|
dev_priv->saveSWF2[i] = I915_READ(SWF30 + (i << 2));
|
||||||
|
|
||||||
|
mutex_unlock(&dev->struct_mutex);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -850,6 +850,8 @@ int i915_restore_state(struct drm_device *dev)
|
|||||||
|
|
||||||
pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB);
|
pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB);
|
||||||
|
|
||||||
|
mutex_lock(&dev->struct_mutex);
|
||||||
|
|
||||||
/* Hardware status page */
|
/* Hardware status page */
|
||||||
I915_WRITE(HWS_PGA, dev_priv->saveHWS);
|
I915_WRITE(HWS_PGA, dev_priv->saveHWS);
|
||||||
|
|
||||||
@ -867,6 +869,7 @@ int i915_restore_state(struct drm_device *dev)
|
|||||||
I915_WRITE(IER, dev_priv->saveIER);
|
I915_WRITE(IER, dev_priv->saveIER);
|
||||||
I915_WRITE(IMR, dev_priv->saveIMR);
|
I915_WRITE(IMR, dev_priv->saveIMR);
|
||||||
}
|
}
|
||||||
|
mutex_unlock(&dev->struct_mutex);
|
||||||
|
|
||||||
intel_init_clock_gating(dev);
|
intel_init_clock_gating(dev);
|
||||||
|
|
||||||
@ -880,6 +883,8 @@ int i915_restore_state(struct drm_device *dev)
|
|||||||
gen6_update_ring_freq(dev_priv);
|
gen6_update_ring_freq(dev_priv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutex_lock(&dev->struct_mutex);
|
||||||
|
|
||||||
/* Cache mode state */
|
/* Cache mode state */
|
||||||
I915_WRITE (CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
|
I915_WRITE (CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
|
||||||
|
|
||||||
@ -893,6 +898,8 @@ int i915_restore_state(struct drm_device *dev)
|
|||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]);
|
I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]);
|
||||||
|
|
||||||
|
mutex_unlock(&dev->struct_mutex);
|
||||||
|
|
||||||
intel_i2c_reset(dev);
|
intel_i2c_reset(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user