From patchwork Wed Jul 29 05:00:52 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ling.ma@intel.com X-Patchwork-Id: 38063 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6T50uwN012009 for ; Wed, 29 Jul 2009 05:00:56 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 50D209F628; Tue, 28 Jul 2009 22:00:55 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A67F9F62A for ; Tue, 28 Jul 2009 22:00:52 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 28 Jul 2009 22:00:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.43,286,1246863600"; d="scan'208";a="169988309" Received: from unknown (HELO localhost.localdomain) ([10.239.36.100]) by azsmga001.ch.intel.com with ESMTP; 28 Jul 2009 22:00:51 -0700 From: ling.ma@intel.com To: intel-gfx@lists.freedesktop.org Date: Wed, 29 Jul 2009 13:00:52 +0800 Message-Id: <1248843652-10497-1-git-send-email-ling.ma@intel.com> X-Mailer: git-send-email 1.5.4.4 Cc: Ma Ling Subject: [Intel-gfx] [PATCH] Set tv format property if output crtc is NULL X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org When TV is not connected and X start, after plugging TV cable again, system will crash because output crtc is NULL. This patch will return, do not handle crtc immediately, meanwhile set value will be effective until user really enable output by xrandr command. Reviewed-by: Keith Packard Signed-off-by: Ma Ling --- src/i830_tv.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/i830_tv.c b/src/i830_tv.c index 7082aba..df92a35 100644 --- a/src/i830_tv.c +++ b/src/i830_tv.c @@ -1819,7 +1819,7 @@ i830_tv_set_property(xf86OutputPtr output, Atom property, xfree (dev_priv->tv_format); dev_priv->tv_format = val; - if (pI830->starting) + if (pI830->starting || output->crtc == NULL) return TRUE; /* TV format change will generate new modelines, try