From patchwork Thu Jul 26 12:38:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1242651 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 7451D3FDFB for ; Thu, 26 Jul 2012 12:41:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 635559F366 for ; Thu, 26 Jul 2012 05:41:46 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-bk0-f49.google.com (mail-bk0-f49.google.com [209.85.214.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 2DBE8A0E17 for ; Thu, 26 Jul 2012 05:38:20 -0700 (PDT) Received: by bkcji2 with SMTP id ji2so1251959bkc.36 for ; Thu, 26 Jul 2012 05:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:x-operating-system:user-agent; bh=R5vkBhqI5S8WBchb2EultPagR7hM+FxkUFElfWVOzlE=; b=kRt9Ce8uOT6487742YkRSgkwd3mkpfKposniDYo92qsRe0E31XFnaUw0G4bNQ5Meak NmyJwMPyGuYqKeoZj8mJjdL2h70odSKw6J/qYATA/74jt3f99Fo0nKhmtdr1+6Dy/35A I6aBmDIOqQW9KyQPkd7/YgeNlz9WuL8KdQ0DM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:x-operating-system:user-agent :x-gm-message-state; bh=R5vkBhqI5S8WBchb2EultPagR7hM+FxkUFElfWVOzlE=; b=CxMCfNFcx0pa2bye1BpPCgpzR+av0eVxG+J3EEfnjR9dY7YT06chH1Fll7PoFV+1Af OB2n/MSBDKY4zmXiI3oCNLWuerkja5HE7JhFtdOJFXFys7miRbZ5FOfepVXk6PtBj0Ke ocat33793a9kJfLfyaXyqfZgJwczv0t4SaTh4JVjD1+huoq2fNhGslhHW9OwOnN63D1f WWSgI+pKeJyK0npwnZ3/UeUGAO0ON1QLo3kJv1MxIjA7LjAf3aKjwr04PgPJOEWLa6E6 ie19GJLHFTu11wnmji/wTuFBtiN5gmncIiuQ6FOu3Fc/s331c6AgpJ9MStrkfEgbzfuy 517g== Received: by 10.205.134.139 with SMTP id ic11mr13812045bkc.40.1343306298949; Thu, 26 Jul 2012 05:38:18 -0700 (PDT) Received: from phenom.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id gq2sm14503529bkc.13.2012.07.26.05.38.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 Jul 2012 05:38:17 -0700 (PDT) Date: Thu, 26 Jul 2012 14:38:28 +0200 From: Daniel Vetter To: maciej.rutecki@gmail.com Subject: Re: [REGRESSION] [KMS] [INTEL] Wrong resolution in console and XWindow Message-ID: <20120726123828.GE5326@phenom.ffwll.local> Mail-Followup-To: maciej.rutecki@gmail.com, Linux Kernel Mailing List , dri-devel@lists.freedesktop.org References: <201207251020.47637.maciej.rutecki@gmail.com> <201207251054.25498.maciej.rutecki@gmail.com> <20120725092928.GD5396@phenom.ffwll.local> <201207251257.50064.maciej.rutecki@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 3.4.0-rc3+ User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQkigkrJG0jigr3pKxaaSNF9CtK5PV6g4GUGTCfyZXif6pIlNkWt9EyGgs4FXqzBoA5gDZDH Cc: Linux Kernel Mailing List , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org On Wed, Jul 25, 2012 at 01:55:59PM +0200, Daniel Vetter wrote: > On Wed, Jul 25, 2012 at 12:57 PM, Maciej Rutecki > wrote: > > On ?roda, 25 lipca 2012 o 11:29:28 Daniel Vetter wrote: > >> On Wed, Jul 25, 2012 at 10:54:25AM +0200, Maciej Rutecki wrote: > >> > On ?roda, 25 lipca 2012 o 10:29:26 Daniel Vetter wrote: > >> > > On Wed, Jul 25, 2012 at 10:20:47AM +0200, Maciej Rutecki wrote: > >> > > > Last known good: 3.4.4 > >> > > > First bad: 3.5.0 > >> > > > > >> > > > When booting 3.5.0 resolution (in console, and after in KDE) is set > >> > > > to 1024x768 (60Hz). In 3.4.4 was correct: 1440x900 (60Hz). > >> > > > >> > > Can you please attach the output of xrandr --verbose for both kernels? > >> > > Also, please boot with drm.debug=0xe added to your kernel cmdline and > >> > > grab the dmesg (again for both kernels). > >> > > >> > Thanks for the ansfer. > >> > > >> > Here xrandr and dmesg outputs for 3.4.4 and 3.5.0 > >> > > >> > http://mrutecki.pl/download/kernel/3.5/swinka/debug/ > >> > >> Can you please test this quick hack: > >> > >> > >> diff --git a/drivers/gpu/drm/i915/intel_i2c.c > >> b/drivers/gpu/drm/i915/intel_i2c.c index 1991a44..abe1611 100644 > >> --- a/drivers/gpu/drm/i915/intel_i2c.c > >> +++ b/drivers/gpu/drm/i915/intel_i2c.c > >> @@ -405,7 +405,7 @@ clear_err: > >> * timing out seems to happen when there _is_ a ddc chip present, but > >> * it's slow responding and only answers on the 2nd retry. > >> */ > >> - ret = -ENXIO; > >> + ret = 0; > >> if (wait_for((I915_READ(GMBUS2 + reg_offset) & GMBUS_ACTIVE) == 0, > >> 10)) { > >> DRM_DEBUG_KMS("GMBUS [%s] timed out after NAK\n", > >> > >> > >> Thanks, Daniel > > > > Still the same. > > Hm, can you attach the dmesg again (with drm.debug=0xe)? If I haven't > botched up something, we should now retry at least the ddc transfer > ... Also, another little snippet for you to test. Fyi I'll be on vacation next week, so final patch (this one here should really work) might take a notch longer. Yours, Daniel --- Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48 diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index bc5e2c9..85eca1c 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c @@ -338,6 +338,7 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector) BUG_ON(crt->base.type != INTEL_OUTPUT_ANALOG); i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); + intel_gmbus_force_bit(i2c, true); edid = drm_get_edid(connector, i2c); if (edid) { @@ -546,12 +547,14 @@ static int intel_crt_get_modes(struct drm_connector *connector) struct i2c_adapter *i2c; i2c = intel_gmbus_get_adapter(dev_priv, dev_priv->crt_ddc_pin); + intel_gmbus_force_bit(i2c, true); ret = intel_ddc_get_modes(connector, i2c); if (ret || !IS_G4X(dev)) return ret; /* Try to probe digital port for output in DVI-I -> VGA mode. */ i2c = intel_gmbus_get_adapter(dev_priv, GMBUS_PORT_DPB); + intel_gmbus_force_bit(i2c, true); return intel_ddc_get_modes(connector, i2c); } -- Daniel Vetter