Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 539c475d authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-intel-next-2018-07-09' of git://anongit.freedesktop.org/drm/drm-intel into drm-next



Higlights here goes to many PSR fixes and improvements; to the Ice lake work with
power well support and begin of DSI support addition. Also there were many improvements
on execlists and interrupts for minimal latency on command submission; and many fixes
on selftests, mostly caught by our CI.

General driver:
- Clean-up on aux irq (Lucas)
- Mark expected switch fall-through for dealing with static analysis tools (Gustavo)

Gem:
- Different fixes for GuC (Chris, Anusha, Michal)
- Avoid self-relocation BIAS if no relocation (Chris)
- Improve debugging cases in on EINVAL return and vma allocation (Chris)
- Fixes and improvements on context destroying and freeing (Chris)
- Wait for engines to idle before retiring (Chris)
- Many improvements on execlists and interrupts for minimal latency on command submission (Chris)
- Many fixes in selftests, specially on cases highlighted on CI (Chris)
- Other fixes and improvements around GGTT (Chris)
- Prevent background reaping of active objects (Chris)

Display:
- Parallel modeset cleanup to fix driver reset (Chris)
- Get AUX power domain for DP main link (Imre)
- Clean-up on PSR unused func pointers (Rodrigo)
- Many PSR/PSR2 fixes and improvements (DK, Jose, Tarun)
- Add a PSR1 live status (Vathsala)
- Replace old drm_*_{un/reference} with put,get functions (Thomas)
- FBC fixes (Maarten)
- Abstract and document the usage of picking macros (Jani)
- Remove unnecessary check for unsupported modifiers for NV12. (DK)
- Interrupt fixes for display (Ville)
- Clean up on sdvo code (Ville)
- Clean up on current DSI code (Jani)
- Remove support for legacy debugfs crc interface (Maarten)
- Simplify get_encoder_power_domains (Imre)

Icelake:
- MG PLL fixes (Imre)
- Add hw workaround for alpha blending (Vandita)
- Add power well support (Imre)
- Add Interrupt Support (Anusha)
- Start to add support for DSI on Ice Lake (Madhav)

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

# gpg: Signature made Tue 10 Jul 2018 08:41:37 AM AEST
# gpg:                using RSA key FA625F640EEB13CA
# gpg: Good signature from "Rodrigo Vivi <rodrigo.vivi@intel.com>"
# gpg:                 aka "Rodrigo Vivi <rodrigo.vivi@gmail.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6D20 7068 EEDD 6509 1C2C  E2A3 FA62 5F64 0EEB 13CA
Link: https://patchwork.freedesktop.org/patch/msgid/20180710234349.GA16562@intel.com
parents 0c2fd59a 82edc7e8
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -51,6 +51,18 @@ config DRM_I915_DEBUG_GEM

          If in doubt, say "N".

config DRM_I915_ERRLOG_GEM
	bool "Insert extra logging (very verbose) for common GEM errors"
	default n
	depends on DRM_I915_DEBUG_GEM
	help
	  Enable additional logging that may help track down the cause of
	  principally userspace errors.

	  Recommended for driver developers only.

	  If in doubt, say "N".

config DRM_I915_TRACE_GEM
	bool "Insert extra ftrace output from the GEM internals"
	depends on DRM_I915_DEBUG_GEM
+4 −3
Original line number Diff line number Diff line
@@ -135,15 +135,14 @@ i915-y += dvo_ch7017.o \
	  dvo_ns2501.o \
	  dvo_sil164.o \
	  dvo_tfp410.o \
	  icl_dsi.o \
	  intel_crt.o \
	  intel_ddi.o \
	  intel_dp_aux_backlight.o \
	  intel_dp_link_training.o \
	  intel_dp_mst.o \
	  intel_dp.o \
	  intel_dsi.o \
	  intel_dsi_dcs_backlight.o \
	  intel_dsi_pll.o \
	  intel_dsi_vbt.o \
	  intel_dvo.o \
	  intel_hdmi.o \
@@ -152,7 +151,9 @@ i915-y += dvo_ch7017.o \
	  intel_lvds.o \
	  intel_panel.o \
	  intel_sdvo.o \
	  intel_tv.o
	  intel_tv.o \
	  vlv_dsi.o \
	  vlv_dsi_pll.o

# Post-mortem debug and GPU hang state capture
i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
+5 −1
Original line number Diff line number Diff line
@@ -476,7 +476,11 @@ static int prepare_shadow_batch_buffer(struct intel_vgpu_workload *workload)
			i915_gem_obj_finish_shmem_access(bb->obj);
			bb->accessing = false;

			i915_vma_move_to_active(bb->vma, workload->req, 0);
			ret = i915_vma_move_to_active(bb->vma,
						      workload->req,
						      0);
			if (ret)
				goto err;
		}
	}
	return 0;
+53 −37
Original line number Diff line number Diff line
@@ -1659,11 +1659,6 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
	else
		seq_printf(m, "FBC disabled: %s\n", fbc->no_fbc_reason);

	if (fbc->work.scheduled)
		seq_printf(m, "FBC worker scheduled on vblank %llu, now %llu\n",
			   fbc->work.scheduled_vblank,
			   drm_crtc_vblank_count(&fbc->crtc->base));

	if (intel_fbc_is_active(dev_priv)) {
		u32 mask;

@@ -2597,8 +2592,12 @@ static const struct file_operations i915_guc_log_relay_fops = {
	.release = i915_guc_log_relay_release,
};

static const char *psr2_live_status(u32 val)
static void
psr_source_status(struct drm_i915_private *dev_priv, struct seq_file *m)
{
	u32 val, psr_status;

	if (dev_priv->psr.psr2_enabled) {
		static const char * const live_status[] = {
			"IDLE",
			"CAPTURE",
@@ -2612,12 +2611,36 @@ static const char *psr2_live_status(u32 val)
			"BUF_ON",
			"TG_ON"
		};
		psr_status = I915_READ(EDP_PSR2_STATUS);
		val = (psr_status & EDP_PSR2_STATUS_STATE_MASK) >>
			EDP_PSR2_STATUS_STATE_SHIFT;
		if (val < ARRAY_SIZE(live_status)) {
			seq_printf(m, "Source PSR status: 0x%x [%s]\n",
				   psr_status, live_status[val]);
			return;
		}
	} else {
		static const char * const live_status[] = {
			"IDLE",
			"SRDONACK",
			"SRDENT",
			"BUFOFF",
			"BUFON",
			"AUXACK",
			"SRDOFFACK",
			"SRDENT_ON",
		};
		psr_status = I915_READ(EDP_PSR_STATUS);
		val = (psr_status & EDP_PSR_STATUS_STATE_MASK) >>
			EDP_PSR_STATUS_STATE_SHIFT;
		if (val < ARRAY_SIZE(live_status)) {
			seq_printf(m, "Source PSR status: 0x%x [%s]\n",
				   psr_status, live_status[val]);
			return;
		}
	}

	val = (val & EDP_PSR2_STATUS_STATE_MASK) >> EDP_PSR2_STATUS_STATE_SHIFT;
	if (val < ARRAY_SIZE(live_status))
		return live_status[val];

	return "unknown";
	seq_printf(m, "Source PSR status: 0x%x [%s]\n", psr_status, "unknown");
}

static const char *psr_sink_status(u8 val)
@@ -2681,12 +2704,8 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)

		seq_printf(m, "Performance_Counter: %u\n", psrperf);
	}
	if (dev_priv->psr.psr2_enabled) {
		u32 psr2 = I915_READ(EDP_PSR2_STATUS);

		seq_printf(m, "EDP_PSR2_STATUS: %x [%s]\n",
			   psr2, psr2_live_status(psr2));
	}
	psr_source_status(dev_priv, m);

	if (dev_priv->psr.enabled) {
		struct drm_dp_aux *aux = &dev_priv->psr.enabled->aux;
@@ -4086,7 +4105,8 @@ fault_irq_set(struct drm_i915_private *i915,

	err = i915_gem_wait_for_idle(i915,
				     I915_WAIT_LOCKED |
				     I915_WAIT_INTERRUPTIBLE);
				     I915_WAIT_INTERRUPTIBLE,
				     MAX_SCHEDULE_TIMEOUT);
	if (err)
		goto err_unlock;

@@ -4191,7 +4211,8 @@ i915_drop_caches_set(void *data, u64 val)
		if (val & DROP_ACTIVE)
			ret = i915_gem_wait_for_idle(dev_priv,
						     I915_WAIT_INTERRUPTIBLE |
						     I915_WAIT_LOCKED);
						     I915_WAIT_LOCKED,
						     MAX_SCHEDULE_TIMEOUT);

		if (val & DROP_RETIRE)
			i915_retire_requests(dev_priv);
@@ -4799,7 +4820,6 @@ static const struct i915_debugfs_files {
#endif
	{"i915_fifo_underrun_reset", &i915_fifo_underrun_reset_ops},
	{"i915_next_seqno", &i915_next_seqno_fops},
	{"i915_display_crc_ctl", &i915_display_crc_ctl_fops},
	{"i915_pri_wm_latency", &i915_pri_wm_latency_fops},
	{"i915_spr_wm_latency", &i915_spr_wm_latency_fops},
	{"i915_cur_wm_latency", &i915_cur_wm_latency_fops},
@@ -4819,7 +4839,7 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv)
{
	struct drm_minor *minor = dev_priv->drm.primary;
	struct dentry *ent;
	int ret, i;
	int i;

	ent = debugfs_create_file("i915_forcewake_user", S_IRUSR,
				  minor->debugfs_root, to_i915(minor->dev),
@@ -4827,10 +4847,6 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv)
	if (!ent)
		return -ENOMEM;

	ret = intel_pipe_crc_create(minor);
	if (ret)
		return ret;

	for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) {
		ent = debugfs_create_file(i915_debugfs_files[i].name,
					  S_IRUGO | S_IWUSR,
+6 −0
Original line number Diff line number Diff line
@@ -1165,6 +1165,12 @@ static int i915_driver_init_hw(struct drm_i915_private *dev_priv)
	 * get lost on g4x as well, and interrupt delivery seems to stay
	 * properly dead afterwards. So we'll just disable them for all
	 * pre-gen5 chipsets.
	 *
	 * dp aux and gmbus irq on gen4 seems to be able to generate legacy
	 * interrupts even when in MSI mode. This results in spurious
	 * interrupt warnings if the legacy irq no. is shared with another
	 * device. The kernel then disables that interrupt source and so
	 * prevents the other device from working properly.
	 */
	if (INTEL_GEN(dev_priv) >= 5) {
		if (pci_enable_msi(pdev) < 0)
Loading