drm/i915: Remove support for legacy debugfs crc interface
This interface is deprecated, and has been replaced by the upstream drm crc interface. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Tomi Sarvela <tomi.p.sarvela@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180628072303.14175-1-maarten.lankhorst@linux.intel.com
This commit is contained in:
@@ -1751,69 +1751,34 @@ static void display_pipe_crc_irq_handler(struct drm_i915_private *dev_priv,
|
||||
uint32_t crc4)
|
||||
{
|
||||
struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[pipe];
|
||||
struct intel_pipe_crc_entry *entry;
|
||||
struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe);
|
||||
struct drm_driver *driver = dev_priv->drm.driver;
|
||||
uint32_t crcs[5];
|
||||
int head, tail;
|
||||
|
||||
spin_lock(&pipe_crc->lock);
|
||||
if (pipe_crc->source && !crtc->base.crc.opened) {
|
||||
if (!pipe_crc->entries) {
|
||||
spin_unlock(&pipe_crc->lock);
|
||||
DRM_DEBUG_KMS("spurious interrupt\n");
|
||||
return;
|
||||
}
|
||||
|
||||
head = pipe_crc->head;
|
||||
tail = pipe_crc->tail;
|
||||
|
||||
if (CIRC_SPACE(head, tail, INTEL_PIPE_CRC_ENTRIES_NR) < 1) {
|
||||
spin_unlock(&pipe_crc->lock);
|
||||
DRM_ERROR("CRC buffer overflowing\n");
|
||||
return;
|
||||
}
|
||||
|
||||
entry = &pipe_crc->entries[head];
|
||||
|
||||
entry->frame = driver->get_vblank_counter(&dev_priv->drm, pipe);
|
||||
entry->crc[0] = crc0;
|
||||
entry->crc[1] = crc1;
|
||||
entry->crc[2] = crc2;
|
||||
entry->crc[3] = crc3;
|
||||
entry->crc[4] = crc4;
|
||||
|
||||
head = (head + 1) & (INTEL_PIPE_CRC_ENTRIES_NR - 1);
|
||||
pipe_crc->head = head;
|
||||
|
||||
/*
|
||||
* For some not yet identified reason, the first CRC is
|
||||
* bonkers. So let's just wait for the next vblank and read
|
||||
* out the buggy result.
|
||||
*
|
||||
* On GEN8+ sometimes the second CRC is bonkers as well, so
|
||||
* don't trust that one either.
|
||||
*/
|
||||
if (pipe_crc->skipped <= 0 ||
|
||||
(INTEL_GEN(dev_priv) >= 8 && pipe_crc->skipped == 1)) {
|
||||
pipe_crc->skipped++;
|
||||
spin_unlock(&pipe_crc->lock);
|
||||
|
||||
wake_up_interruptible(&pipe_crc->wq);
|
||||
} else {
|
||||
/*
|
||||
* For some not yet identified reason, the first CRC is
|
||||
* bonkers. So let's just wait for the next vblank and read
|
||||
* out the buggy result.
|
||||
*
|
||||
* On GEN8+ sometimes the second CRC is bonkers as well, so
|
||||
* don't trust that one either.
|
||||
*/
|
||||
if (pipe_crc->skipped <= 0 ||
|
||||
(INTEL_GEN(dev_priv) >= 8 && pipe_crc->skipped == 1)) {
|
||||
pipe_crc->skipped++;
|
||||
spin_unlock(&pipe_crc->lock);
|
||||
return;
|
||||
}
|
||||
spin_unlock(&pipe_crc->lock);
|
||||
crcs[0] = crc0;
|
||||
crcs[1] = crc1;
|
||||
crcs[2] = crc2;
|
||||
crcs[3] = crc3;
|
||||
crcs[4] = crc4;
|
||||
drm_crtc_add_crc_entry(&crtc->base, true,
|
||||
drm_crtc_accurate_vblank_count(&crtc->base),
|
||||
crcs);
|
||||
return;
|
||||
}
|
||||
spin_unlock(&pipe_crc->lock);
|
||||
|
||||
crcs[0] = crc0;
|
||||
crcs[1] = crc1;
|
||||
crcs[2] = crc2;
|
||||
crcs[3] = crc3;
|
||||
crcs[4] = crc4;
|
||||
drm_crtc_add_crc_entry(&crtc->base, true,
|
||||
drm_crtc_accurate_vblank_count(&crtc->base),
|
||||
crcs);
|
||||
}
|
||||
#else
|
||||
static inline void
|
||||
|
Reference in New Issue
Block a user