From patchwork Wed Nov 5 22:26:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesse Barnes X-Patchwork-Id: 5238381 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C92B9C11AC for ; Wed, 5 Nov 2014 22:26:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DC40020172 for ; Wed, 5 Nov 2014 22:26:28 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E92D620107 for ; Wed, 5 Nov 2014 22:26:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ABCD76ECB4; Wed, 5 Nov 2014 14:26:26 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from gproxy3-pub.mail.unifiedlayer.com (gproxy3-pub.mail.unifiedlayer.com [69.89.30.42]) by gabe.freedesktop.org (Postfix) with SMTP id 13D296ECAF for ; Wed, 5 Nov 2014 14:26:26 -0800 (PST) Received: (qmail 4868 invoked by uid 0); 5 Nov 2014 22:26:24 -0000 Received: from unknown (HELO CMOut01) (10.0.90.82) by gproxy3.mail.unifiedlayer.com with SMTP; 5 Nov 2014 22:26:24 -0000 Received: from box514.bluehost.com ([74.220.219.114]) by CMOut01 with id BySG1p00A2UhLwi01ySKmH; Wed, 05 Nov 2014 15:26:23 -0700 X-Authority-Analysis: v=2.1 cv=F5TEKMRN c=1 sm=1 tr=0 a=9W6Fsu4pMcyimqnCr1W0/w==:117 a=9W6Fsu4pMcyimqnCr1W0/w==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=TBVoxVdAAAAA:8 a=GhZ5P8ky69gA:10 a=noBwr2J6l1kA:10 a=Oo0jTDckpvfiwSSjLcgA:9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuousgeek.org; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=Q1bdZ6yXupJnW5xU3k5aD90K+suldpdl278CScMA/gc=; b=N1WF+6VCHBvq/ii0udZGStFPp/vRIFarUdNuRGUHTST9xYXKreP9j4ehGMb+/dxux4lP0e4nnmNHwN4+SaCPpys3HSA/BJRBMVArDghs/r+ehf4Oiue6//RPVwZD6Vmo; Received: from [67.161.37.189] (port=33699 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1.2:AES128-SHA256:128) (Exim 4.82) (envelope-from ) id 1Xm91t-0006zP-6Z; Wed, 05 Nov 2014 15:26:17 -0700 From: Jesse Barnes To: intel-gfx@lists.freedesktop.org Date: Wed, 5 Nov 2014 14:26:09 -0800 Message-Id: <1415226371-1880-4-git-send-email-jbarnes@virtuousgeek.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415226371-1880-1-git-send-email-jbarnes@virtuousgeek.org> References: <1415226371-1880-1-git-send-email-jbarnes@virtuousgeek.org> X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 67.161.37.189 authed with jbarnes@virtuousgeek.org} Cc: shuang.he@linux.intel.com Subject: [Intel-gfx] [PATCH 4/6] drm/i915: check for audio and infoframe changes across mode sets v2 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 If these change (e.g. after a modeset following a fastboot), we need to do a full mode set. v2: - put under pipe_config check so we don't deref a null state (Jesse) Signed-off-by: Jesse Barnes Reviewed-by: Ander Conselvan de Oliveira --- drivers/gpu/drm/i915/intel_display.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cb96f11..c86eee6 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11230,8 +11230,18 @@ static int intel_crtc_set_config(struct drm_mode_set *set) &modeset_pipes, &prepare_pipes, &disable_pipes); - if (IS_ERR(pipe_config)) + if (IS_ERR(pipe_config)) { goto fail; + } else if (pipe_config) { + if (to_intel_crtc(set->crtc)->new_config->has_audio != + to_intel_crtc(set->crtc)->config.has_audio) + config->mode_changed = true; + + /* Force mode sets for any infoframe stuff */ + if (to_intel_crtc(set->crtc)->new_config->has_infoframe || + to_intel_crtc(set->crtc)->config.has_infoframe) + config->mode_changed = true; + } /* set_mode will free it in the mode_changed case */ if (!config->mode_changed)