From patchwork Mon Dec 10 20:24:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Lespiau X-Patchwork-Id: 1859881 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 C22773FCF2 for ; Mon, 10 Dec 2012 20:26:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC5EBE5F27 for ; Mon, 10 Dec 2012 12:26:11 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by gabe.freedesktop.org (Postfix) with ESMTP id 75CAEE5F27; Mon, 10 Dec 2012 12:24:35 -0800 (PST) Received: by mail-wi0-f179.google.com with SMTP id o1so1242962wic.12 for ; Mon, 10 Dec 2012 12:24:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:in-reply-to:references; bh=uUA1beTmnZYcr3d0InQMsmrr2h37KUpPFuiELS9bRF4=; b=FndvN/hw3rE7GrNuRl+5yAASlbcaLNdtxJdfdNM+6S0wSzXppnkigdHBFanfkMv2ct KQOcyOCTJfqX9xkcVfp1gr0xVM6vNeX6OdlmTUw5FMVVFg8Ohv6FqdNrfoz4KAjKUVze sQheuJXCAhIwm6FcrLwm8tMzQx4V0WtDD6gm6xEvEY5BJXX8HPmH80ekFic6ox6UqU2p PMvDjCnimODzGDaKoS5JK8raJ4UYOl4GcU30WmIEjPvwLyB/OUpoMXNaXnwEuCIcpct2 T6/sECkB+4cH97OOGGDpgHynrmv1sXUpw5Ci38s5Sq/UMmTqpVJQG09JghH6gPe+v6WX m8fA== Received: by 10.216.206.154 with SMTP id l26mr5705649weo.68.1355171074677; Mon, 10 Dec 2012 12:24:34 -0800 (PST) Received: from localhost.localdomain ([83.217.123.106]) by mx.google.com with ESMTPS id gz3sm11552381wib.2.2012.12.10.12.24.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 10 Dec 2012 12:24:34 -0800 (PST) From: Damien Lespiau To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH 2/2] drm: Don't prune modes loudly when a connector is disconnected Date: Mon, 10 Dec 2012 20:24:24 +0000 Message-Id: <1355171064-1321-2-git-send-email-damien.lespiau@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1355171064-1321-1-git-send-email-damien.lespiau@gmail.com> References: <1355171064-1321-1-git-send-email-damien.lespiau@gmail.com> 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: , MIME-Version: 1.0 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 From: Damien Lespiau drm_helper_probe_single_connector_modes() is responsible for pruning the previously detected modes on a disconnected connector. We don't really need to log, again, the full list of modes that used to be valid when connected. Signed-off-by: Damien Lespiau --- drivers/gpu/drm/drm_crtc_helper.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 524f0d3..865b0f7 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -111,6 +111,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, connector->helper_private; int count = 0; int mode_flags = 0; + bool verbose_prune = true; DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, drm_get_connector_name(connector)); @@ -139,6 +140,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n", connector->base.id, drm_get_connector_name(connector)); drm_mode_connector_update_edid_property(connector, NULL); + verbose_prune = false; goto prune; } @@ -172,7 +174,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector, } prune: - drm_mode_prune_invalid(dev, &connector->modes, true); + drm_mode_prune_invalid(dev, &connector->modes, verbose_prune); if (list_empty(&connector->modes)) return 0;