From patchwork Mon Jan 26 19:08:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jilai wang X-Patchwork-Id: 5712121 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C83EEC058D for ; Mon, 26 Jan 2015 19:09:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E233620165 for ; Mon, 26 Jan 2015 19:09:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 229B62015A for ; Mon, 26 Jan 2015 19:09:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756186AbbAZTJF (ORCPT ); Mon, 26 Jan 2015 14:09:05 -0500 Received: from smtp.codeaurora.org ([198.145.11.231]:52952 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755993AbbAZTJE (ORCPT ); Mon, 26 Jan 2015 14:09:04 -0500 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 42724141911; Mon, 26 Jan 2015 19:09:03 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id 3427D141914; Mon, 26 Jan 2015 19:09:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from yyzubuntu29.qualcomm.com (rrcs-67-52-130-30.west.biz.rr.com [67.52.130.30]) (using TLSv1.1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jilaiw@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 24080141913; Mon, 26 Jan 2015 19:09:01 +0000 (UTC) From: Jilai Wang To: dri-devel@lists.freedesktop.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, robdclark@gmail.com, Jilai Wang Subject: [PATCH] drm/msm/mdp: full mode set if crtc enable state is changed Date: Mon, 26 Jan 2015 14:08:46 -0500 Message-Id: <1422299326-8119-1-git-send-email-jilaiw@codeaurora.org> X-Mailer: git-send-email 1.8.2.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Crtc state may not reflect the current crtc state if drm_fb_helper_blank is called to turn dpms off without turning crtc off. A full modeset in this case to solve the problem. Signed-off-by: Jilai Wang --- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c index eea209e..60d0f58 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c @@ -310,6 +310,13 @@ static int mdp5_crtc_atomic_check(struct drm_crtc *crtc, return -EINVAL; } + /* + * check if the crtc state matches with the current state + * if not match, force a full mode set + */ + if (state->enable != mdp5_crtc->enabled) + state->mode_changed = true; + /* verify that there are not too many planes attached to crtc * and that we don't have conflicting mixer stages: */