Merge tag 'drm-fixes-for-v4.9-rc6-brown-paper-bag' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
"i915 fixes + 2 mediatek regressions.

So some i915 fixes came in which I thought they might so I'm sending
those along with two reverts for two patches to the mediatek driver
that didn't seem to build so well, I've fixed up my -fixes ARM build
and .config so I could see it, but yes brown paper bag time"

* tag 'drm-fixes-for-v4.9-rc6-brown-paper-bag' of git://people.freedesktop.org/~airlied/linux:
Revert "drm/mediatek: set vblank_disable_allowed to true"
Revert "drm/mediatek: fix a typo of OD_CFG to OD_RELAYMODE"
drm/i915: Assume non-DP++ port if dvo_port is HDMI and there's no AUX ch specified in the VBT
drm/i915: Refresh that status of MST capable connectors in ->detect()
drm/i915: Grab the rotation from the passed plane state for VLV sprites
drm/i915: Mark CPU cache as dirty when used for rendering

+34 -22
+8
drivers/gpu/drm/i915/i915_gem_execbuffer.c
··· 1281 1281 return ctx; 1282 1282 } 1283 1283 1284 + static bool gpu_write_needs_clflush(struct drm_i915_gem_object *obj) 1285 + { 1286 + return !(obj->cache_level == I915_CACHE_NONE || 1287 + obj->cache_level == I915_CACHE_WT); 1288 + } 1289 + 1284 1290 void i915_vma_move_to_active(struct i915_vma *vma, 1285 1291 struct drm_i915_gem_request *req, 1286 1292 unsigned int flags) ··· 1317 1311 1318 1312 /* update for the implicit flush after a batch */ 1319 1313 obj->base.write_domain &= ~I915_GEM_GPU_DOMAINS; 1314 + if (!obj->cache_dirty && gpu_write_needs_clflush(obj)) 1315 + obj->cache_dirty = true; 1320 1316 } 1321 1317 1322 1318 if (flags & EXEC_OBJECT_NEEDS_FENCE)
+22 -8
drivers/gpu/drm/i915/intel_bios.c
··· 1143 1143 if (!child) 1144 1144 return; 1145 1145 1146 - aux_channel = child->raw[25]; 1146 + aux_channel = child->common.aux_channel; 1147 1147 ddc_pin = child->common.ddc_pin; 1148 1148 1149 1149 is_dvi = child->common.device_type & DEVICE_TYPE_TMDS_DVI_SIGNALING; ··· 1673 1673 return false; 1674 1674 } 1675 1675 1676 - bool intel_bios_is_port_dp_dual_mode(struct drm_i915_private *dev_priv, enum port port) 1676 + static bool child_dev_is_dp_dual_mode(const union child_device_config *p_child, 1677 + enum port port) 1677 1678 { 1678 1679 static const struct { 1679 1680 u16 dp, hdmi; ··· 1688 1687 [PORT_D] = { DVO_PORT_DPD, DVO_PORT_HDMID, }, 1689 1688 [PORT_E] = { DVO_PORT_DPE, DVO_PORT_HDMIE, }, 1690 1689 }; 1691 - int i; 1692 1690 1693 1691 if (port == PORT_A || port >= ARRAY_SIZE(port_mapping)) 1694 1692 return false; 1695 1693 1696 - if (!dev_priv->vbt.child_dev_num) 1694 + if ((p_child->common.device_type & DEVICE_TYPE_DP_DUAL_MODE_BITS) != 1695 + (DEVICE_TYPE_DP_DUAL_MODE & DEVICE_TYPE_DP_DUAL_MODE_BITS)) 1697 1696 return false; 1697 + 1698 + if (p_child->common.dvo_port == port_mapping[port].dp) 1699 + return true; 1700 + 1701 + /* Only accept a HDMI dvo_port as DP++ if it has an AUX channel */ 1702 + if (p_child->common.dvo_port == port_mapping[port].hdmi && 1703 + p_child->common.aux_channel != 0) 1704 + return true; 1705 + 1706 + return false; 1707 + } 1708 + 1709 + bool intel_bios_is_port_dp_dual_mode(struct drm_i915_private *dev_priv, 1710 + enum port port) 1711 + { 1712 + int i; 1698 1713 1699 1714 for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { 1700 1715 const union child_device_config *p_child = 1701 1716 &dev_priv->vbt.child_dev[i]; 1702 1717 1703 - if ((p_child->common.dvo_port == port_mapping[port].dp || 1704 - p_child->common.dvo_port == port_mapping[port].hdmi) && 1705 - (p_child->common.device_type & DEVICE_TYPE_DP_DUAL_MODE_BITS) == 1706 - (DEVICE_TYPE_DP_DUAL_MODE & DEVICE_TYPE_DP_DUAL_MODE_BITS)) 1718 + if (child_dev_is_dp_dual_mode(p_child, port)) 1707 1719 return true; 1708 1720 } 1709 1721
-10
drivers/gpu/drm/i915/intel_dp.c
··· 4463 4463 intel_dp_detect(struct drm_connector *connector, bool force) 4464 4464 { 4465 4465 struct intel_dp *intel_dp = intel_attached_dp(connector); 4466 - struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp); 4467 - struct intel_encoder *intel_encoder = &intel_dig_port->base; 4468 4466 enum drm_connector_status status = connector->status; 4469 4467 4470 4468 DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", 4471 4469 connector->base.id, connector->name); 4472 - 4473 - if (intel_dp->is_mst) { 4474 - /* MST devices are disconnected from a monitor POV */ 4475 - intel_dp_unset_edid(intel_dp); 4476 - if (intel_encoder->type != INTEL_OUTPUT_EDP) 4477 - intel_encoder->type = INTEL_OUTPUT_DP; 4478 - return connector_status_disconnected; 4479 - } 4480 4470 4481 4471 /* If full detect is not performed yet, do a full detect */ 4482 4472 if (!intel_dp->detect_done)
+1 -1
drivers/gpu/drm/i915/intel_sprite.c
··· 358 358 int plane = intel_plane->plane; 359 359 u32 sprctl; 360 360 u32 sprsurf_offset, linear_offset; 361 - unsigned int rotation = dplane->state->rotation; 361 + unsigned int rotation = plane_state->base.rotation; 362 362 const struct drm_intel_sprite_colorkey *key = &plane_state->ckey; 363 363 int crtc_x = plane_state->base.dst.x1; 364 364 int crtc_y = plane_state->base.dst.y1;
+2 -1
drivers/gpu/drm/i915/intel_vbt_defs.h
··· 280 280 u8 dp_support:1; 281 281 u8 tmds_support:1; 282 282 u8 support_reserved:5; 283 - u8 not_common3[12]; 283 + u8 aux_channel; 284 + u8 not_common3[11]; 284 285 u8 iboost_level; 285 286 } __packed; 286 287
+1 -1
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
··· 123 123 unsigned int bpc) 124 124 { 125 125 writel(w << 16 | h, comp->regs + DISP_OD_SIZE); 126 - writel(OD_RELAYMODE, comp->regs + OD_CFG); 126 + writel(OD_RELAYMODE, comp->regs + OD_RELAYMODE); 127 127 mtk_dither_set(comp, bpc, DISP_OD_CFG); 128 128 } 129 129
-1
drivers/gpu/drm/mediatek/mtk_drm_drv.c
··· 217 217 if (ret < 0) 218 218 goto err_component_unbind; 219 219 220 - drm->vblank_disable_allowed = true; 221 220 drm_kms_helper_poll_init(drm); 222 221 drm_mode_config_reset(drm); 223 222