Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: move border color writes to pfit_enable

Writing hw registers from compute_config?
Just say no!

In this case not too horrible since we write a constant 0, and only
debugging would put something else in there. But while checking that
code I've noticed that this register disappeared on pch platforms, so
fix that up, too.

And adjust the comment a bit, it's outdated.

Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

+4 -10
+4
drivers/gpu/drm/i915/intel_display.c
··· 3632 3632 3633 3633 I915_WRITE(PFIT_PGM_RATIOS, pipe_config->gmch_pfit.pgm_ratios); 3634 3634 I915_WRITE(PFIT_CONTROL, pipe_config->gmch_pfit.control); 3635 + 3636 + /* Border color in case we don't scale up to the full screen. Black by 3637 + * default, change to something else for debugging. */ 3638 + I915_WRITE(BCLRPAT(crtc->pipe), 0); 3635 3639 } 3636 3640 3637 3641 static void valleyview_crtc_enable(struct drm_crtc *crtc)
-10
drivers/gpu/drm/i915/intel_lvds.c
··· 231 231 struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode; 232 232 struct intel_crtc *intel_crtc = lvds_encoder->base.new_crtc; 233 233 unsigned int lvds_bpp; 234 - int pipe; 235 234 236 235 /* Should never happen!! */ 237 236 if (INTEL_INFO(dev)->gen < 4 && intel_crtc->pipe == 0) { ··· 272 273 intel_gmch_panel_fitting(intel_crtc, pipe_config, 273 274 intel_connector->panel.fitting_mode); 274 275 } 275 - 276 - /* 277 - * Enable automatic panel scaling for non-native modes so that they fill 278 - * the screen. Should be enabled before the pipe is enabled, according 279 - * to register description and PRM. 280 - * Change the value here to see the borders for debugging 281 - */ 282 - for_each_pipe(pipe) 283 - I915_WRITE(BCLRPAT(pipe), 0); 284 276 285 277 drm_mode_set_crtcinfo(adjusted_mode, 0); 286 278 pipe_config->timings_set = true;