From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paulo Zanoni Subject: [PATCH 2/2] drm/i915: don't always force the panel's fixed_mode Date: Fri, 3 Feb 2012 17:48:21 -0200 Message-ID: <1328298501-24867-1-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-yw0-f49.google.com (mail-yw0-f49.google.com [209.85.213.49]) by gabe.freedesktop.org (Postfix) with ESMTP id CF5429E8B6 for ; Fri, 3 Feb 2012 11:48:36 -0800 (PST) Received: by yhjj56 with SMTP id j56so1886099yhj.36 for ; Fri, 03 Feb 2012 11:48:36 -0800 (PST) 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: intel-gfx@lists.freedesktop.org Cc: Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org From: Paulo Zanoni My laptop has two 1440x900 modes: one is the fixed_mode and the other has different timings. If I use xrandr to switch from the fixed mode to the "other" 1440x900 mode, xrandr will tell me the change was successful, but nothing was actually done: I'm still using the fixed_mode. This patch allows us to use other modes if hdisplay and vdisplay are the same. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_panel.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) Apply on top of danvet's interlaced branch. diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index 230a141..62ca771 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -36,6 +36,12 @@ void intel_fixed_panel_mode(struct drm_display_mode *fixed_mode, struct drm_display_mode *adjusted_mode) { + /* Allow modes that match the panel fixed_mode resolution but have + * different timings */ + if (adjusted_mode->hdisplay == fixed_mode->hdisplay && + adjusted_mode->vdisplay == fixed_mode->vdisplay) + return; + adjusted_mode->hdisplay = fixed_mode->hdisplay; adjusted_mode->hsync_start = fixed_mode->hsync_start; adjusted_mode->hsync_end = fixed_mode->hsync_end; -- 1.7.8.3