Commit 2cc3b81d authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-intel-next-2019-02-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-next



- Make background color and LUT more robust (Matt)
- Icelake display fixes (Ville, Imre)
- Workarounds fixes and reorg (Tvrtko, Talha)
- Enable fastboot by default on VLV and CHV (Hans)
- Add another PCI ID for Coffee Lake (Rodrigo)

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

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190202082911.GA6615@intel.com
parents 148fb2e2 46c0cd8c
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -474,10 +474,9 @@ EXPORT_SYMBOL(drm_plane_create_color_properties);
 *
 * Returns 0 on success, -EINVAL on failure.
 */
int drm_color_lut_check(struct drm_property_blob *lut,
			uint32_t tests)
int drm_color_lut_check(const struct drm_property_blob *lut, u32 tests)
{
	struct drm_color_lut *entry;
	const struct drm_color_lut *entry;
	int i;

	if (!lut || !tests)
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
subdir-ccflags-y += $(call cc-disable-warning, uninitialized)
subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror

# Fine grained warnings disable
+31 −0
Original line number Diff line number Diff line
@@ -342,6 +342,7 @@ static int setup_virtual_dp_monitor(struct intel_vgpu *vgpu, int port_num,
	port->dpcd->data_valid = true;
	port->dpcd->data[DPCD_SINK_COUNT] = 0x1;
	port->type = type;
	port->id = resolution;

	emulate_monitor_status_change(vgpu);

@@ -444,6 +445,36 @@ void intel_gvt_emulate_vblank(struct intel_gvt *gvt)
	mutex_unlock(&gvt->lock);
}

/**
 * intel_vgpu_emulate_hotplug - trigger hotplug event for vGPU
 * @vgpu: a vGPU
 * @conncted: link state
 *
 * This function is used to trigger hotplug interrupt for vGPU
 *
 */
void intel_vgpu_emulate_hotplug(struct intel_vgpu *vgpu, bool connected)
{
	struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv;

	/* TODO: add more platforms support */
	if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) {
		if (connected) {
			vgpu_vreg_t(vgpu, SFUSE_STRAP) |=
				SFUSE_STRAP_DDID_DETECTED;
			vgpu_vreg_t(vgpu, SDEISR) |= SDE_PORTD_HOTPLUG_CPT;
		} else {
			vgpu_vreg_t(vgpu, SFUSE_STRAP) &=
				~SFUSE_STRAP_DDID_DETECTED;
			vgpu_vreg_t(vgpu, SDEISR) &= ~SDE_PORTD_HOTPLUG_CPT;
		}
		vgpu_vreg_t(vgpu, SDEIIR) |= SDE_PORTD_HOTPLUG_CPT;
		vgpu_vreg_t(vgpu, PCH_PORT_HOTPLUG) |=
				PORTD_HOTPLUG_STATUS_MASK;
		intel_vgpu_trigger_virtual_event(vgpu, DP_D_HOTPLUG);
	}
}

/**
 * intel_vgpu_clean_display - clean vGPU virtual display emulation
 * @vgpu: a vGPU
+31 −6
Original line number Diff line number Diff line
@@ -146,18 +146,19 @@ enum intel_vgpu_port_type {
	GVT_PORT_MAX
};

enum intel_vgpu_edid {
	GVT_EDID_1024_768,
	GVT_EDID_1920_1200,
	GVT_EDID_NUM,
};

struct intel_vgpu_port {
	/* per display EDID information */
	struct intel_vgpu_edid_data *edid;
	/* per display DPCD information */
	struct intel_vgpu_dpcd_data *dpcd;
	int type;
};

enum intel_vgpu_edid {
	GVT_EDID_1024_768,
	GVT_EDID_1920_1200,
	GVT_EDID_NUM,
	enum intel_vgpu_edid id;
};

static inline char *vgpu_edid_str(enum intel_vgpu_edid id)
@@ -172,6 +173,30 @@ static inline char *vgpu_edid_str(enum intel_vgpu_edid id)
	}
}

static inline unsigned int vgpu_edid_xres(enum intel_vgpu_edid id)
{
	switch (id) {
	case GVT_EDID_1024_768:
		return 1024;
	case GVT_EDID_1920_1200:
		return 1920;
	default:
		return 0;
	}
}

static inline unsigned int vgpu_edid_yres(enum intel_vgpu_edid id)
{
	switch (id) {
	case GVT_EDID_1024_768:
		return 768;
	case GVT_EDID_1920_1200:
		return 1200;
	default:
		return 0;
	}
}

void intel_gvt_emulate_vblank(struct intel_gvt *gvt);
void intel_gvt_check_vblank_emulation(struct intel_gvt *gvt);

+1 −0
Original line number Diff line number Diff line
@@ -185,6 +185,7 @@ static const struct intel_gvt_ops intel_gvt_ops = {
	.vgpu_query_plane = intel_vgpu_query_plane,
	.vgpu_get_dmabuf = intel_vgpu_get_dmabuf,
	.write_protect_handler = intel_vgpu_page_track_handler,
	.emulate_hotplug = intel_vgpu_emulate_hotplug,
};

static void init_device_info(struct intel_gvt *gvt)
Loading