"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "drivers/gpu/drm/i915/intel_pm.c" between
linux-3.16.62.tar.xz and linux-3.16.63.tar.xz

About: The full source of the Linux kernel 3.16.x (longterm stable)

intel_pm.c  (linux-3.16.62.tar.xz):intel_pm.c  (linux-3.16.63.tar.xz)
skipping to change at line 1752 skipping to change at line 1752
/* /*
* For both WM_PIPE and WM_LP. * For both WM_PIPE and WM_LP.
* mem_value must be in 0.1us units. * mem_value must be in 0.1us units.
*/ */
static uint32_t ilk_compute_pri_wm(const struct ilk_pipe_wm_parameters *params, static uint32_t ilk_compute_pri_wm(const struct ilk_pipe_wm_parameters *params,
uint32_t mem_value, uint32_t mem_value,
bool is_lp) bool is_lp)
{ {
uint32_t method1, method2; uint32_t method1, method2;
if (mem_value == 0)
return U32_MAX;
if (!params->active || !params->pri.enabled) if (!params->active || !params->pri.enabled)
return 0; return 0;
method1 = ilk_wm_method1(params->pixel_rate, method1 = ilk_wm_method1(params->pixel_rate,
params->pri.bytes_per_pixel, params->pri.bytes_per_pixel,
mem_value); mem_value);
if (!is_lp) if (!is_lp)
return method1; return method1;
skipping to change at line 1780 skipping to change at line 1783
/* /*
* For both WM_PIPE and WM_LP. * For both WM_PIPE and WM_LP.
* mem_value must be in 0.1us units. * mem_value must be in 0.1us units.
*/ */
static uint32_t ilk_compute_spr_wm(const struct ilk_pipe_wm_parameters *params, static uint32_t ilk_compute_spr_wm(const struct ilk_pipe_wm_parameters *params,
uint32_t mem_value) uint32_t mem_value)
{ {
uint32_t method1, method2; uint32_t method1, method2;
if (mem_value == 0)
return U32_MAX;
if (!params->active || !params->spr.enabled) if (!params->active || !params->spr.enabled)
return 0; return 0;
method1 = ilk_wm_method1(params->pixel_rate, method1 = ilk_wm_method1(params->pixel_rate,
params->spr.bytes_per_pixel, params->spr.bytes_per_pixel,
mem_value); mem_value);
method2 = ilk_wm_method2(params->pixel_rate, method2 = ilk_wm_method2(params->pixel_rate,
params->pipe_htotal, params->pipe_htotal,
params->spr.horiz_pixels, params->spr.horiz_pixels,
params->spr.bytes_per_pixel, params->spr.bytes_per_pixel,
skipping to change at line 1801 skipping to change at line 1807
return min(method1, method2); return min(method1, method2);
} }
/* /*
* For both WM_PIPE and WM_LP. * For both WM_PIPE and WM_LP.
* mem_value must be in 0.1us units. * mem_value must be in 0.1us units.
*/ */
static uint32_t ilk_compute_cur_wm(const struct ilk_pipe_wm_parameters *params, static uint32_t ilk_compute_cur_wm(const struct ilk_pipe_wm_parameters *params,
uint32_t mem_value) uint32_t mem_value)
{ {
if (mem_value == 0)
return U32_MAX;
if (!params->active || !params->cur.enabled) if (!params->active || !params->cur.enabled)
return 0; return 0;
return ilk_wm_method2(params->pixel_rate, return ilk_wm_method2(params->pixel_rate,
params->pipe_htotal, params->pipe_htotal,
params->cur.horiz_pixels, params->cur.horiz_pixels,
params->cur.bytes_per_pixel, params->cur.bytes_per_pixel,
mem_value); mem_value);
} }
skipping to change at line 2152 skipping to change at line 2161
if (!changed) if (!changed)
return; return;
DRM_DEBUG_KMS("WM latency values increased to avoid potential underruns\n "); DRM_DEBUG_KMS("WM latency values increased to avoid potential underruns\n ");
intel_print_wm_latency(dev, "Primary", dev_priv->wm.pri_latency); intel_print_wm_latency(dev, "Primary", dev_priv->wm.pri_latency);
intel_print_wm_latency(dev, "Sprite", dev_priv->wm.spr_latency); intel_print_wm_latency(dev, "Sprite", dev_priv->wm.spr_latency);
intel_print_wm_latency(dev, "Cursor", dev_priv->wm.cur_latency); intel_print_wm_latency(dev, "Cursor", dev_priv->wm.cur_latency);
} }
static void snb_wm_lp3_irq_quirk(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
/*
* On some SNB machines (Thinkpad X220 Tablet at least)
* LP3 usage can cause vblank interrupts to be lost.
* The DEIIR bit will go high but it looks like the CPU
* never gets interrupted.
*
* It's not clear whether other interrupt source could
* be affected or if this is somehow limited to vblank
* interrupts only. To play it safe we disable LP3
* watermarks entirely.
*/
if (dev_priv->wm.pri_latency[3] == 0 &&
dev_priv->wm.spr_latency[3] == 0 &&
dev_priv->wm.cur_latency[3] == 0)
return;
dev_priv->wm.pri_latency[3] = 0;
dev_priv->wm.spr_latency[3] = 0;
dev_priv->wm.cur_latency[3] = 0;
DRM_DEBUG_KMS("LP3 watermarks disabled due to potential for lost interrup
ts\n");
intel_print_wm_latency(dev, "Primary", dev_priv->wm.pri_latency);
intel_print_wm_latency(dev, "Sprite", dev_priv->wm.spr_latency);
intel_print_wm_latency(dev, "Cursor", dev_priv->wm.cur_latency);
}
static void ilk_setup_wm_latency(struct drm_device *dev) static void ilk_setup_wm_latency(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
intel_read_wm_latency(dev, dev_priv->wm.pri_latency); intel_read_wm_latency(dev, dev_priv->wm.pri_latency);
memcpy(dev_priv->wm.spr_latency, dev_priv->wm.pri_latency, memcpy(dev_priv->wm.spr_latency, dev_priv->wm.pri_latency,
sizeof(dev_priv->wm.pri_latency)); sizeof(dev_priv->wm.pri_latency));
memcpy(dev_priv->wm.cur_latency, dev_priv->wm.pri_latency, memcpy(dev_priv->wm.cur_latency, dev_priv->wm.pri_latency,
sizeof(dev_priv->wm.pri_latency)); sizeof(dev_priv->wm.pri_latency));
intel_fixup_spr_wm_latency(dev, dev_priv->wm.spr_latency); intel_fixup_spr_wm_latency(dev, dev_priv->wm.spr_latency);
intel_fixup_cur_wm_latency(dev, dev_priv->wm.cur_latency); intel_fixup_cur_wm_latency(dev, dev_priv->wm.cur_latency);
intel_print_wm_latency(dev, "Primary", dev_priv->wm.pri_latency); intel_print_wm_latency(dev, "Primary", dev_priv->wm.pri_latency);
intel_print_wm_latency(dev, "Sprite", dev_priv->wm.spr_latency); intel_print_wm_latency(dev, "Sprite", dev_priv->wm.spr_latency);
intel_print_wm_latency(dev, "Cursor", dev_priv->wm.cur_latency); intel_print_wm_latency(dev, "Cursor", dev_priv->wm.cur_latency);
if (IS_GEN6(dev)) if (IS_GEN6(dev)) {
snb_wm_latency_quirk(dev); snb_wm_latency_quirk(dev);
snb_wm_lp3_irq_quirk(dev);
}
} }
static void ilk_compute_wm_parameters(struct drm_crtc *crtc, static void ilk_compute_wm_parameters(struct drm_crtc *crtc,
struct ilk_pipe_wm_parameters *p) struct ilk_pipe_wm_parameters *p)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
enum pipe pipe = intel_crtc->pipe; enum pipe pipe = intel_crtc->pipe;
struct drm_plane *plane; struct drm_plane *plane;
 End of changes. 6 change blocks. 
1 lines changed or deleted 43 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)