From patchwork Fri Aug 2 09:26:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?VmlsbGUgU3lyasOkbMOk?= X-Patchwork-Id: 2837629 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1C0719F3B8 for ; Fri, 2 Aug 2013 09:27:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 12E422035A for ; Fri, 2 Aug 2013 09:27:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2468520352 for ; Fri, 2 Aug 2013 09:27:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E9787E629A for ; Fri, 2 Aug 2013 02:27:27 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id D6DF2E5CD4; Fri, 2 Aug 2013 02:26:25 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga101.ch.intel.com with ESMTP; 02 Aug 2013 02:26:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,800,1367996400"; d="scan'208";a="375050381" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.168]) by fmsmga001.fm.intel.com with SMTP; 02 Aug 2013 02:26:11 -0700 Received: by stinkbox (sSMTP sendmail emulation); Fri, 02 Aug 2013 12:26:11 +0300 Date: Fri, 2 Aug 2013 12:26:11 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Linus Torvalds Subject: Re: [Intel-gfx] WARNING: CPU: 1 PID: 2846 at drivers/gpu/drm/i915/intel_sdvo.c:1378 Message-ID: <20130802092610.GJ5004@intel.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Daniel Vetter , intel-gfx , DRI 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 X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Aug 01, 2013 at 05:51:31PM -0700, Linus Torvalds wrote: > This one may have been going on for some time - I haven't updated the > old Intel Mac Mini in a while. > > And by "not updated" I also mean that it's some really old user-space: > the machine is running F14, and cannot be updated to anything newer > without having to reinstall everything because of a stupid small /boot > partition. So it's not going to happen. But maybe somebody cares about > the i915 warning anyway? > > Linus > > --- > WARNING: CPU: 1 PID: 2846 at drivers/gpu/drm/i915/intel_sdvo.c:1378 > intel_sdvo_get_config+0x158/0x160() > SDVO pixel multiplier mismatch, port: 0, encoder: 1 > Modules linked in: snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep > CPU: 1 PID: 2846 Comm: Xorg Not tainted 3.11.0-rc3-00208-gbe1e8d7-dirty #19 > Hardware name: Apple Computer, Inc. Macmini1,1/Mac-F4208EC8, BIOS > MM11.88Z.0055.B03.0604071521 04/07/06 > 00000000 00000000 ef0afa54 c1597bbb c1737ea4 ef0afa84 c10392ca c1737e6c > ef0afab0 00000b1e c1737ea4 00000562 c12dfbe8 c12dfbe8 ef0afb14 00000000 > f697ec00 ef0afa9c c103936e 00000009 ef0afa94 c1737e6c ef0afab0 ef0afadc > Call Trace: > [] dump_stack+0x41/0x56 > [] warn_slowpath_common+0x7a/0xa0 > [] warn_slowpath_fmt+0x2e/0x30 > [] intel_sdvo_get_config+0x158/0x160 > [] check_crtc_state+0x1e0/0xb10 > [] intel_modeset_check_state+0x29d/0x7c0 > [] intel_sdvo_dpms+0x5c/0xa0 > [] drm_mode_obj_set_property_ioctl+0x40e/0x420 > [] drm_mode_connector_property_set_ioctl+0x35/0x40 > [] drm_ioctl+0x3e4/0x540 > [] do_vfs_ioctl+0x72/0x570 > [] SyS_ioctl+0x8f/0xa0 > [] sysenter_do_call+0x12/0x22 > ---[ end trace 7ce940aff1366d60 ]--- Looks like this could happen when you go to DPMS_OFF. After we've turned off the the pipe, get_pipe_config() gives a mostly zeroed pipe_config (including pixel_multiplier), and then in the case of SDVO, we go and check it against the encoder's idea of pixel_multiplier anyway. I'm thinking perhaps we shouldn't call get_config for inactive encoders. How about the following patch? From 16c4048bfb54e338ce23a7e98af96af2f58b0e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Fri, 2 Aug 2013 12:06:47 +0300 Subject: [PATCH] drm/i915: Don't call encoder's get_config unless encoder is active --- drivers/gpu/drm/i915/intel_display.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e1e50df..6396bca 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8549,9 +8549,11 @@ check_crtc_state(struct drm_device *dev) list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head) { + enum pipe pipe; if (encoder->base.crtc != &crtc->base) continue; - if (encoder->get_config) + if (encoder->get_config && + encoder->get_hw_state(encoder, &pipe)) encoder->get_config(encoder, &pipe_config); }