mirror of
https://github.com/torvalds/linux.git
synced 2024-12-23 19:31:53 +00:00
drm/i915: replace intel_infoframe_freq with VIDEO_DIP_FREQ_VSYNC
Simplifies things because for all the infoframes we care about, we always send them on each vblank. Also, this gets rid of one of the hw specific functions mislabelled with the intel_ prefix - hsw will completely change how this works! Acked-by: Paulo Zanoni <przanoni@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
acb87dfb4b
commit
4b24c9331a
@ -113,23 +113,6 @@ static u32 intel_infoframe_enable(struct dip_infoframe *frame)
|
|||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 intel_infoframe_frequency(struct dip_infoframe *frame)
|
|
||||||
{
|
|
||||||
u32 flags = 0;
|
|
||||||
|
|
||||||
switch (frame->type) {
|
|
||||||
case DIP_TYPE_AVI:
|
|
||||||
case DIP_TYPE_SPD:
|
|
||||||
flags |= VIDEO_DIP_FREQ_VSYNC;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
DRM_DEBUG_DRIVER("unknown info frame type %d\n", frame->type);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void i9xx_write_infoframe(struct drm_encoder *encoder,
|
static void i9xx_write_infoframe(struct drm_encoder *encoder,
|
||||||
struct dip_infoframe *frame)
|
struct dip_infoframe *frame)
|
||||||
{
|
{
|
||||||
@ -165,7 +148,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder,
|
|||||||
|
|
||||||
val |= intel_infoframe_enable(frame);
|
val |= intel_infoframe_enable(frame);
|
||||||
val &= ~VIDEO_DIP_FREQ_MASK;
|
val &= ~VIDEO_DIP_FREQ_MASK;
|
||||||
val |= intel_infoframe_frequency(frame);
|
val |= VIDEO_DIP_FREQ_VSYNC;
|
||||||
|
|
||||||
I915_WRITE(VIDEO_DIP_CTL, val);
|
I915_WRITE(VIDEO_DIP_CTL, val);
|
||||||
}
|
}
|
||||||
@ -215,7 +198,7 @@ static void ibx_write_infoframe(struct drm_encoder *encoder,
|
|||||||
|
|
||||||
val |= intel_infoframe_enable(frame);
|
val |= intel_infoframe_enable(frame);
|
||||||
val &= ~VIDEO_DIP_FREQ_MASK;
|
val &= ~VIDEO_DIP_FREQ_MASK;
|
||||||
val |= intel_infoframe_frequency(frame);
|
val |= VIDEO_DIP_FREQ_VSYNC;
|
||||||
|
|
||||||
I915_WRITE(reg, val);
|
I915_WRITE(reg, val);
|
||||||
}
|
}
|
||||||
@ -255,7 +238,7 @@ static void cpt_write_infoframe(struct drm_encoder *encoder,
|
|||||||
|
|
||||||
val |= intel_infoframe_enable(frame);
|
val |= intel_infoframe_enable(frame);
|
||||||
val &= ~VIDEO_DIP_FREQ_MASK;
|
val &= ~VIDEO_DIP_FREQ_MASK;
|
||||||
val |= intel_infoframe_frequency(frame);
|
val |= VIDEO_DIP_FREQ_VSYNC;
|
||||||
|
|
||||||
I915_WRITE(reg, val);
|
I915_WRITE(reg, val);
|
||||||
}
|
}
|
||||||
@ -289,7 +272,7 @@ static void vlv_write_infoframe(struct drm_encoder *encoder,
|
|||||||
|
|
||||||
val |= intel_infoframe_enable(frame);
|
val |= intel_infoframe_enable(frame);
|
||||||
val &= ~VIDEO_DIP_FREQ_MASK;
|
val &= ~VIDEO_DIP_FREQ_MASK;
|
||||||
val |= intel_infoframe_frequency(frame);
|
val |= VIDEO_DIP_FREQ_VSYNC;
|
||||||
|
|
||||||
I915_WRITE(reg, val);
|
I915_WRITE(reg, val);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user