From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: 3.10.0+ laptop resolution problem Date: Thu, 11 Jul 2013 21:41:59 +0200 Message-ID: <20130711194159.GW6143@phenom.ffwll.local> References: <51DEF3CB.2050603@xmsnet.nl> <51DF0209.9010204@xmsnet.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ea0-f181.google.com (mail-ea0-f181.google.com [209.85.215.181]) by gabe.freedesktop.org (Postfix) with ESMTP id 693F4E5C33 for ; Thu, 11 Jul 2013 12:41:58 -0700 (PDT) Received: by mail-ea0-f181.google.com with SMTP id a15so5964525eae.40 for ; Thu, 11 Jul 2013 12:41:57 -0700 (PDT) Content-Disposition: inline In-Reply-To: <51DF0209.9010204@xmsnet.nl> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Hans de Bruin Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org On Thu, Jul 11, 2013 at 09:05:45PM +0200, Hans de Bruin wrote: > On 07/11/2013 08:22 PM, Daniel Vetter wrote: > >On Thu, Jul 11, 2013 at 8:04 PM, Hans de Bruin wrote: > >>somewhere before commit 496322b (yesterday's kernel) resolution switching on > >>my laptop broke. The screen switches to the right resolution but the screen > >>is not horizontally centered. The screen is aligned left and the last > >>vertical line is repeated until the right side of the screen. Normally there > >>would be black bars on left and right side. > > > >Can you please boot with drm.debug=0xe added to your kernel cmdline > >and then reply with your complete dmesg? > > > > I have also started a bisect. Is it useful to continue that? Let's first see whether my bug-spotting skills are still in working order. Please test the below diff, thanks. -Daniel --- diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index b0e1088..0536c9b 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c @@ -297,14 +297,11 @@ static bool intel_lvds_compute_config(struct intel_encoder *intel_encoder, intel_pch_panel_fitting(intel_crtc, pipe_config, intel_connector->panel.fitting_mode); - return true; } else { intel_gmch_panel_fitting(intel_crtc, pipe_config, intel_connector->panel.fitting_mode); - } - drm_mode_set_crtcinfo(adjusted_mode, 0); - pipe_config->timings_set = true; + } /* * XXX: It would be nice to support lower refresh rates on the diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 80bea1d..45010bb 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -194,6 +194,9 @@ void intel_gmch_panel_fitting(struct intel_crtc *intel_crtc, adjusted_mode->vdisplay == mode->vdisplay) goto out; + drm_mode_set_crtcinfo(adjusted_mode, 0); + pipe_config->timings_set = true; + switch (fitting_mode) { case DRM_MODE_SCALE_CENTER: /* -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch