Message ID | 1390813231-15476-2-git-send-email-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Jan 27, 2014 at 10:00:31AM +0100, Daniel Vetter wrote: > We seem to get confused when trying to reconstruct this from the pipe > get_config when reading out pfit state. In our code these two are > connected, but in the hardware they're not. Huh? I think the change is to only read out the border-enable bit when LVDS is enabled. But that is only a guess at what your intent is here. -Chris
On Mon, Jan 27, 2014 at 09:57:11AM +0000, Chris Wilson wrote: > On Mon, Jan 27, 2014 at 10:00:31AM +0100, Daniel Vetter wrote: > > We seem to get confused when trying to reconstruct this from the pipe > > get_config when reading out pfit state. In our code these two are > > connected, but in the hardware they're not. > > Huh? I think the change is to only read out the border-enable bit when > LVDS is enabled. But that is only a guess at what your intent is here. Yeah, that's the idea. The encoder specific get_config is only called if get_hw_state indicates that the encoder is on. Since we always reset the lvds border bits in the lvds->mode_set callback to the one in the pipe config this should fix the mismatch. -Daniel
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 65b470baee39..18e76d9e2248 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5478,9 +5478,6 @@ static void i9xx_get_pfit_config(struct intel_crtc *crtc, pipe_config->gmch_pfit.control = tmp; pipe_config->gmch_pfit.pgm_ratios = I915_READ(PFIT_PGM_RATIOS); - if (INTEL_INFO(dev)->gen < 5) - pipe_config->gmch_pfit.lvds_border_bits = - I915_READ(LVDS) & LVDS_BORDER_ENABLE; } static void vlv_crtc_clock_get(struct intel_crtc *crtc, diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 8a3ebe940a74..772b5d62d54b 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -117,6 +117,10 @@ static void intel_lvds_get_config(struct intel_encoder *encoder, ironlake_check_encoder_dotclock(pipe_config, dotclock); pipe_config->adjusted_mode.crtc_clock = dotclock; + + if (INTEL_INFO(dev)->gen < 5) + pipe_config->gmch_pfit.lvds_border_bits = + tmp & LVDS_BORDER_ENABLE; } /* The LVDS pin pair needs to be on before the DPLLs are enabled.
We seem to get confused when trying to reconstruct this from the pipe get_config when reading out pfit state. In our code these two are connected, but in the hardware they're not. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74081 Cc: Alan Stern <stern@rowland.harvard.edu> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> --- drivers/gpu/drm/i915/intel_display.c | 3 --- drivers/gpu/drm/i915/intel_lvds.c | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-)