summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_hdmi.c
diff options
context:
space:
mode:
authorDave Airlie2017-11-03 20:43:44 +0100
committerDave Airlie2017-11-03 20:43:44 +0100
commit36a5fdf76d3281345e000e115f33817570a76420 (patch)
treef575bdc6b5800b4c0113c8c4c733aa3980b072b4 /drivers/gpu/drm/i915/intel_hdmi.c
parentMerge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-next (diff)
parentdrm/i915: Update DRIVER_DATE to 20171023 (diff)
downloadkernel-qcow2-linux-36a5fdf76d3281345e000e115f33817570a76420.tar.gz
kernel-qcow2-linux-36a5fdf76d3281345e000e115f33817570a76420.tar.xz
kernel-qcow2-linux-36a5fdf76d3281345e000e115f33817570a76420.zip
Merge tag 'drm-intel-next-2017-10-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
This time really the last i915 batch for v4.15: - PSR state tracking in crtc state (Ville) - Fix eviction when the GGTT is idle but full (Chris) - BDW DP aux channel timeout fix (James) - LSPCON detection fixes (Shashank) - Use for_each_pipe to iterate over pipes (Mika Kahola) - Replace *_reference/unreference() or *_ref/unref with _get/put() (Harsha) - Refactoring and preparation for DDI encoder type cleanup (Ville) - Broadwell DDI FDI buf translation fix (Chris) - Read CSB and CSB write pointer from HWSP in GVT-g VM if available (Weinan) - GuC/HuC firmware loader refactoring (Michal) - Make shrinking more effective and not stall so much (Chris) - Cannonlake PLL fixes (Rodrigo) - DP MST connector error propagation fixes (James) - Convert timers to use timer_setup (Kees Cook) - Skylake plane enable/disable unification (Juha-Pekka) - Fix to actually free driver internal objects when requested (Chris) - DDI buf trans refactoring (Ville) - Skip waking the device to service pwrite (Chris) - Improve DSI VBT backlight parsing abstraction (Madhav) - Cannonlake VBT DDC pin mapping fix (Rodrigo) * tag 'drm-intel-next-2017-10-23' of git://anongit.freedesktop.org/drm/drm-intel: (87 commits) drm/i915: Update DRIVER_DATE to 20171023 drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin. drm/i915: Let's use more enum intel_dpll_id pll_id. drm/i915: Use existing DSI backlight ports info drm/i915: Parse DSI backlight/cabc ports. drm/i915: Skip waking the device to service pwrite drm/i915/crt: split compute_config hook by platforms drm/i915: remove g4x lowfreq_avail and has_pipe_cxsr drm/i915: Drop the redundant hdmi prefix/suffix from a lot of variables drm/i915: Unify error handling for missing DDI buf trans tables drm/i915: Centralize the SKL DDI A/E vs. B/C/D buf trans handling drm/i915: Kill off the BXT buf_trans default_index drm/i915: Pass encoder type to cnl_ddi_vswing_sequence() explicitly drm/i915: Integrate BXT into intel_ddi_dp_voltage_max() drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers() drm/i915: Pass the encoder type explicitly to skl_set_iboost() drm/i915: Extract intel_ddi_get_buf_trans_hdmi() drm/i915: Relocate intel_ddi_get_buf_trans_*() functions drm/i915: Flush the idle-worker for debugfs/i915_drop_caches drm/i915: adjust get_crtc_fence_y_offset() to use base.y instead of crtc.y ...
Diffstat (limited to 'drivers/gpu/drm/i915/intel_hdmi.c')
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index e6f8f30ce7bd..5132dc814788 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -70,7 +70,7 @@ static struct intel_hdmi *intel_attached_hdmi(struct drm_connector *connector)
return enc_to_intel_hdmi(&intel_attached_encoder(connector)->base);
}
-static u32 g4x_infoframe_index(enum hdmi_infoframe_type type)
+static u32 g4x_infoframe_index(unsigned int type)
{
switch (type) {
case HDMI_INFOFRAME_TYPE_AVI:
@@ -85,7 +85,7 @@ static u32 g4x_infoframe_index(enum hdmi_infoframe_type type)
}
}
-static u32 g4x_infoframe_enable(enum hdmi_infoframe_type type)
+static u32 g4x_infoframe_enable(unsigned int type)
{
switch (type) {
case HDMI_INFOFRAME_TYPE_AVI:
@@ -100,9 +100,11 @@ static u32 g4x_infoframe_enable(enum hdmi_infoframe_type type)
}
}
-static u32 hsw_infoframe_enable(enum hdmi_infoframe_type type)
+static u32 hsw_infoframe_enable(unsigned int type)
{
switch (type) {
+ case DP_SDP_VSC:
+ return VIDEO_DIP_ENABLE_VSC_HSW;
case HDMI_INFOFRAME_TYPE_AVI:
return VIDEO_DIP_ENABLE_AVI_HSW;
case HDMI_INFOFRAME_TYPE_SPD:
@@ -118,10 +120,12 @@ static u32 hsw_infoframe_enable(enum hdmi_infoframe_type type)
static i915_reg_t
hsw_dip_data_reg(struct drm_i915_private *dev_priv,
enum transcoder cpu_transcoder,
- enum hdmi_infoframe_type type,
+ unsigned int type,
int i)
{
switch (type) {
+ case DP_SDP_VSC:
+ return HSW_TVIDEO_DIP_VSC_DATA(cpu_transcoder, i);
case HDMI_INFOFRAME_TYPE_AVI:
return HSW_TVIDEO_DIP_AVI_DATA(cpu_transcoder, i);
case HDMI_INFOFRAME_TYPE_SPD:
@@ -136,7 +140,7 @@ hsw_dip_data_reg(struct drm_i915_private *dev_priv,
static void g4x_write_infoframe(struct drm_encoder *encoder,
const struct intel_crtc_state *crtc_state,
- enum hdmi_infoframe_type type,
+ unsigned int type,
const void *frame, ssize_t len)
{
const uint32_t *data = frame;
@@ -191,7 +195,7 @@ static bool g4x_infoframe_enabled(struct drm_encoder *encoder,
static void ibx_write_infoframe(struct drm_encoder *encoder,
const struct intel_crtc_state *crtc_state,
- enum hdmi_infoframe_type type,
+ unsigned int type,
const void *frame, ssize_t len)
{
const uint32_t *data = frame;
@@ -251,7 +255,7 @@ static bool ibx_infoframe_enabled(struct drm_encoder *encoder,
static void cpt_write_infoframe(struct drm_encoder *encoder,
const struct intel_crtc_state *crtc_state,
- enum hdmi_infoframe_type type,
+ unsigned int type,
const void *frame, ssize_t len)
{
const uint32_t *data = frame;
@@ -309,7 +313,7 @@ static bool cpt_infoframe_enabled(struct drm_encoder *encoder,
static void vlv_write_infoframe(struct drm_encoder *encoder,
const struct intel_crtc_state *crtc_state,
- enum hdmi_infoframe_type type,
+ unsigned int type,
const void *frame, ssize_t len)
{
const uint32_t *data = frame;
@@ -368,7 +372,7 @@ static bool vlv_infoframe_enabled(struct drm_encoder *encoder,
static void hsw_write_infoframe(struct drm_encoder *encoder,
const struct intel_crtc_state *crtc_state,
- enum hdmi_infoframe_type type,
+ unsigned int type,
const void *frame, ssize_t len)
{
const uint32_t *data = frame;
@@ -377,6 +381,8 @@ static void hsw_write_infoframe(struct drm_encoder *encoder,
enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
i915_reg_t ctl_reg = HSW_TVIDEO_DIP_CTL(cpu_transcoder);
i915_reg_t data_reg;
+ int data_size = type == DP_SDP_VSC ?
+ VIDEO_DIP_VSC_DATA_SIZE : VIDEO_DIP_DATA_SIZE;
int i;
u32 val = I915_READ(ctl_reg);
@@ -392,7 +398,7 @@ static void hsw_write_infoframe(struct drm_encoder *encoder,
data++;
}
/* Write every possible data byte to force correct ECC calculation. */
- for (; i < VIDEO_DIP_DATA_SIZE; i += 4)
+ for (; i < data_size; i += 4)
I915_WRITE(hsw_dip_data_reg(dev_priv, cpu_transcoder,
type, i >> 2), 0);
mmiowb();