Merge remote-tracking branch 'drm-intel/drm-intel-next-queued' into drm-intel-next-queued

Pull in patches Jani merged while I was at XDC.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
Daniel Vetter 2015-09-22 10:17:39 +02:00
commit 0f8b83984f
7 changed files with 51 additions and 32 deletions

View File

@ -1137,6 +1137,10 @@ int i915_driver_unload(struct drm_device *dev)
dev_priv->vbt.child_dev = NULL; dev_priv->vbt.child_dev = NULL;
dev_priv->vbt.child_dev_num = 0; dev_priv->vbt.child_dev_num = 0;
} }
kfree(dev_priv->vbt.sdvo_lvds_vbt_mode);
dev_priv->vbt.sdvo_lvds_vbt_mode = NULL;
kfree(dev_priv->vbt.lfp_lvds_vbt_mode);
dev_priv->vbt.lfp_lvds_vbt_mode = NULL;
vga_switcheroo_unregister_client(dev->pdev); vga_switcheroo_unregister_client(dev->pdev);
vga_client_register(dev->pdev, NULL, NULL, NULL); vga_client_register(dev->pdev, NULL, NULL, NULL);

View File

@ -1713,8 +1713,8 @@ i915_gem_mmap_ioctl(struct drm_device *dev, void *data,
/** /**
* i915_gem_fault - fault a page into the GTT * i915_gem_fault - fault a page into the GTT
* vma: VMA in question * @vma: VMA in question
* vmf: fault info * @vmf: fault info
* *
* The fault handler is set up by drm_gem_mmap() when a object is GTT mapped * The fault handler is set up by drm_gem_mmap() when a object is GTT mapped
* from userspace. The fault handler takes care of binding the object to * from userspace. The fault handler takes care of binding the object to
@ -4985,9 +4985,9 @@ int i915_gem_open(struct drm_device *dev, struct drm_file *file)
/** /**
* i915_gem_track_fb - update frontbuffer tracking * i915_gem_track_fb - update frontbuffer tracking
* old: current GEM buffer for the frontbuffer slots * @old: current GEM buffer for the frontbuffer slots
* new: new GEM buffer for the frontbuffer slots * @new: new GEM buffer for the frontbuffer slots
* frontbuffer_bits: bitmask of frontbuffer slots * @frontbuffer_bits: bitmask of frontbuffer slots
* *
* This updates the frontbuffer tracking bits @frontbuffer_bits by clearing them * This updates the frontbuffer tracking bits @frontbuffer_bits by clearing them
* from @old and setting them in @new. Both @old and @new can be NULL. * from @old and setting them in @new. Both @old and @new can be NULL.

View File

@ -17,8 +17,8 @@
/* pipe updates */ /* pipe updates */
TRACE_EVENT(i915_pipe_update_start, TRACE_EVENT(i915_pipe_update_start,
TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max), TP_PROTO(struct intel_crtc *crtc),
TP_ARGS(crtc, min, max), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(enum pipe, pipe) __field(enum pipe, pipe)
@ -33,8 +33,8 @@ TRACE_EVENT(i915_pipe_update_start,
__entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev, __entry->frame = crtc->base.dev->driver->get_vblank_counter(crtc->base.dev,
crtc->pipe); crtc->pipe);
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = intel_get_crtc_scanline(crtc);
__entry->min = min; __entry->min = crtc->debug.min_vbl;
__entry->max = max; __entry->max = crtc->debug.max_vbl;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u",
@ -43,8 +43,8 @@ TRACE_EVENT(i915_pipe_update_start,
); );
TRACE_EVENT(i915_pipe_update_vblank_evaded, TRACE_EVENT(i915_pipe_update_vblank_evaded,
TP_PROTO(struct intel_crtc *crtc, u32 min, u32 max, u32 frame), TP_PROTO(struct intel_crtc *crtc),
TP_ARGS(crtc, min, max, frame), TP_ARGS(crtc),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(enum pipe, pipe) __field(enum pipe, pipe)
@ -56,10 +56,10 @@ TRACE_EVENT(i915_pipe_update_vblank_evaded,
TP_fast_assign( TP_fast_assign(
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = frame; __entry->frame = crtc->debug.start_vbl_count;
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = crtc->debug.scanline_start;
__entry->min = min; __entry->min = crtc->debug.min_vbl;
__entry->max = max; __entry->max = crtc->debug.max_vbl;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u", TP_printk("pipe %c, frame=%u, scanline=%u, min=%u, max=%u",
@ -68,8 +68,8 @@ TRACE_EVENT(i915_pipe_update_vblank_evaded,
); );
TRACE_EVENT(i915_pipe_update_end, TRACE_EVENT(i915_pipe_update_end,
TP_PROTO(struct intel_crtc *crtc, u32 frame), TP_PROTO(struct intel_crtc *crtc, u32 frame, int scanline_end),
TP_ARGS(crtc, frame), TP_ARGS(crtc, frame, scanline_end),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(enum pipe, pipe) __field(enum pipe, pipe)
@ -80,7 +80,7 @@ TRACE_EVENT(i915_pipe_update_end,
TP_fast_assign( TP_fast_assign(
__entry->pipe = crtc->pipe; __entry->pipe = crtc->pipe;
__entry->frame = frame; __entry->frame = frame;
__entry->scanline = intel_get_crtc_scanline(crtc); __entry->scanline = scanline_end;
), ),
TP_printk("pipe %c, frame=%u, scanline=%u", TP_printk("pipe %c, frame=%u, scanline=%u",

View File

@ -2882,7 +2882,7 @@ static bool bxt_ddi_pll_get_hw_state(struct drm_i915_private *dev_priv,
* here just read out lanes 0/1 and output a note if lanes 2/3 differ. * here just read out lanes 0/1 and output a note if lanes 2/3 differ.
*/ */
hw_state->pcsdw12 = I915_READ(BXT_PORT_PCS_DW12_LN01(port)); hw_state->pcsdw12 = I915_READ(BXT_PORT_PCS_DW12_LN01(port));
if (I915_READ(BXT_PORT_PCS_DW12_LN23(port) != hw_state->pcsdw12)) if (I915_READ(BXT_PORT_PCS_DW12_LN23(port)) != hw_state->pcsdw12)
DRM_DEBUG_DRIVER("lane stagger config different for lane 01 (%08x) and 23 (%08x)\n", DRM_DEBUG_DRIVER("lane stagger config different for lane 01 (%08x) and 23 (%08x)\n",
hw_state->pcsdw12, hw_state->pcsdw12,
I915_READ(BXT_PORT_PCS_DW12_LN23(port))); I915_READ(BXT_PORT_PCS_DW12_LN23(port)));

View File

@ -4582,6 +4582,9 @@ static bool cpt_digital_port_connected(struct drm_i915_private *dev_priv,
case PORT_D: case PORT_D:
bit = SDE_PORTD_HOTPLUG_CPT; bit = SDE_PORTD_HOTPLUG_CPT;
break; break;
case PORT_E:
bit = SDE_PORTE_HOTPLUG_SPT;
break;
default: default:
MISSING_CASE(port->port); MISSING_CASE(port->port);
return false; return false;

View File

@ -565,8 +565,12 @@ struct intel_crtc {
int scanline_offset; int scanline_offset;
unsigned start_vbl_count; struct {
ktime_t start_vbl_time; unsigned start_vbl_count;
ktime_t start_vbl_time;
int min_vbl, max_vbl;
int scanline_start;
} debug;
struct intel_crtc_atomic_commit atomic; struct intel_crtc_atomic_commit atomic;

View File

@ -95,7 +95,6 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
max = vblank_start - 1; max = vblank_start - 1;
local_irq_disable(); local_irq_disable();
crtc->start_vbl_count = 0;
if (min <= 0 || max <= 0) if (min <= 0 || max <= 0)
return; return;
@ -103,7 +102,9 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
if (WARN_ON(drm_crtc_vblank_get(&crtc->base))) if (WARN_ON(drm_crtc_vblank_get(&crtc->base)))
return; return;
trace_i915_pipe_update_start(crtc, min, max); crtc->debug.min_vbl = min;
crtc->debug.max_vbl = max;
trace_i915_pipe_update_start(crtc);
for (;;) { for (;;) {
/* /*
@ -134,11 +135,12 @@ void intel_pipe_update_start(struct intel_crtc *crtc)
drm_crtc_vblank_put(&crtc->base); drm_crtc_vblank_put(&crtc->base);
crtc->start_vbl_time = ktime_get(); crtc->debug.scanline_start = scanline;
crtc->start_vbl_count = dev->driver->get_vblank_counter(dev, pipe); crtc->debug.start_vbl_time = ktime_get();
crtc->debug.start_vbl_count =
dev->driver->get_vblank_counter(dev, pipe);
trace_i915_pipe_update_vblank_evaded(crtc, min, max, trace_i915_pipe_update_vblank_evaded(crtc);
crtc->start_vbl_count);
} }
/** /**
@ -154,17 +156,23 @@ void intel_pipe_update_end(struct intel_crtc *crtc)
{ {
struct drm_device *dev = crtc->base.dev; struct drm_device *dev = crtc->base.dev;
enum pipe pipe = crtc->pipe; enum pipe pipe = crtc->pipe;
int scanline_end = intel_get_crtc_scanline(crtc);
u32 end_vbl_count = dev->driver->get_vblank_counter(dev, pipe); u32 end_vbl_count = dev->driver->get_vblank_counter(dev, pipe);
ktime_t end_vbl_time = ktime_get(); ktime_t end_vbl_time = ktime_get();
trace_i915_pipe_update_end(crtc, end_vbl_count); trace_i915_pipe_update_end(crtc, end_vbl_count, scanline_end);
local_irq_enable(); local_irq_enable();
if (crtc->start_vbl_count && crtc->start_vbl_count != end_vbl_count) if (crtc->debug.start_vbl_count &&
DRM_ERROR("Atomic update failure on pipe %c (start=%u end=%u) time %lld us\n", crtc->debug.start_vbl_count != end_vbl_count) {
pipe_name(pipe), crtc->start_vbl_count, end_vbl_count, DRM_ERROR("Atomic update failure on pipe %c (start=%u end=%u) time %lld us, min %d, max %d, scanline start %d, end %d\n",
ktime_us_delta(end_vbl_time, crtc->start_vbl_time)); pipe_name(pipe), crtc->debug.start_vbl_count,
end_vbl_count,
ktime_us_delta(end_vbl_time, crtc->debug.start_vbl_time),
crtc->debug.min_vbl, crtc->debug.max_vbl,
crtc->debug.scanline_start, scanline_end);
}
} }
static void static void