mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-05 10:16:49 +07:00
drm/i915: add encoder->pre_enable/post_disable
The cpu eDP encoder has some horrible hacks to set up the DP pll at the right time. To be able to move them to the right place, add some more encoder callbacks so that this can happen at the right time. LVDS has some similar funky hacks, but that would require more work (we need to move around the pll setup a bit). Hence for now only wire these new callbacks up for ilk+ - we only have cpu eDP on these platforms. v2: Bikeshed the vtable ordering, requested by Chris Wilson. Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
fba92150aa
commit
bf49ec8c52
@ -3242,6 +3242,10 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
|
|||||||
else
|
else
|
||||||
ironlake_fdi_disable(crtc);
|
ironlake_fdi_disable(crtc);
|
||||||
|
|
||||||
|
for_each_encoder_on_crtc(dev, crtc, encoder)
|
||||||
|
if (encoder->pre_enable)
|
||||||
|
encoder->pre_enable(encoder);
|
||||||
|
|
||||||
/* Enable panel fitting for LVDS */
|
/* Enable panel fitting for LVDS */
|
||||||
if (dev_priv->pch_pf_size &&
|
if (dev_priv->pch_pf_size &&
|
||||||
(intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) || HAS_eDP)) {
|
(intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS) || HAS_eDP)) {
|
||||||
@ -3311,6 +3315,10 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc)
|
|||||||
I915_WRITE(PF_CTL(pipe), 0);
|
I915_WRITE(PF_CTL(pipe), 0);
|
||||||
I915_WRITE(PF_WIN_SZ(pipe), 0);
|
I915_WRITE(PF_WIN_SZ(pipe), 0);
|
||||||
|
|
||||||
|
for_each_encoder_on_crtc(dev, crtc, encoder)
|
||||||
|
if (encoder->post_disable)
|
||||||
|
encoder->post_disable(encoder);
|
||||||
|
|
||||||
ironlake_fdi_disable(crtc);
|
ironlake_fdi_disable(crtc);
|
||||||
|
|
||||||
/* This is a horrible layering violation; we should be doing this in
|
/* This is a horrible layering violation; we should be doing this in
|
||||||
|
@ -152,8 +152,10 @@ struct intel_encoder {
|
|||||||
bool cloneable;
|
bool cloneable;
|
||||||
bool connectors_active;
|
bool connectors_active;
|
||||||
void (*hot_plug)(struct intel_encoder *);
|
void (*hot_plug)(struct intel_encoder *);
|
||||||
|
void (*pre_enable)(struct intel_encoder *);
|
||||||
void (*enable)(struct intel_encoder *);
|
void (*enable)(struct intel_encoder *);
|
||||||
void (*disable)(struct intel_encoder *);
|
void (*disable)(struct intel_encoder *);
|
||||||
|
void (*post_disable)(struct intel_encoder *);
|
||||||
/* Read out the current hw state of this connector, returning true if
|
/* Read out the current hw state of this connector, returning true if
|
||||||
* the encoder is active. If the encoder is enabled it also set the pipe
|
* the encoder is active. If the encoder is enabled it also set the pipe
|
||||||
* it is connected to in the pipe parameter. */
|
* it is connected to in the pipe parameter. */
|
||||||
|
Loading…
Reference in New Issue
Block a user