From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9CCE5C43603 for ; Thu, 12 Dec 2019 04:55:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55541206C3 for ; Thu, 12 Dec 2019 04:55:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GWLWvnRb"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="dSp84jht" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55541206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZL7Kyn9jKXS9Zs+f2CVpSY4sxh95QfQY8yDNP8okk4Y=; b=GWLWvnRbVLjEo1 HquXewDb90TYwT542Z7bzr1dWHOo/YDwKBTSzz9wDqdae3v1bzwnsYtVJNTf5inMwF+nocdVXvaZk KeDOnALLo1+98hYGxa4PBw7+zsFZ+8pJUJnnpsi7rZ/QctYx2rNtrg+oTRGD7uNAIAx25pR3/cbwL GNDTw19kokvz/npDCqhvYBErQZZ3+gbwY27xbzaK8CrckY3tRvlJ+0Ccwx4qP9dcHBobdOnmki11G NQocls5x1pz+CnJxaQiA0HZcio0KC5yzwN2ce8K2e9X4W0U/Nm/e6IgLPRWnmooek82N5tHrqXkP4 zdrsDklUJdG/9JRiISiw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifGVU-0006W9-7G; Thu, 12 Dec 2019 04:55:20 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifGVF-0005hq-Fq; Thu, 12 Dec 2019 04:55:07 +0000 X-UUID: 0b697cb6484a41009d871eb5f31b1d8f-20191211 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=UCWp1N8gZKoS15JnTttPmlV5vpeES4YM/X1M4WTmQ4I=; b=dSp84jht4+RIY6YFbcAXEPj3fmwXw/DmsQWtq8OG3w/u5JPEONyx03D6Nm3fHNBBNRl/OnjpOxodcRfyDZsPh1qg/I3nBUImOj4gp12T6BW/n1KqvKWcDt9fa+IxLAzVoYjLEcmh5Ci8sEKR1O0BY/UyEsGVxzmpcnHTuyBEAQU=; X-UUID: 0b697cb6484a41009d871eb5f31b1d8f-20191211 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 555389568; Wed, 11 Dec 2019 20:55:03 -0800 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 11 Dec 2019 20:46:09 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 12 Dec 2019 12:44:45 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 12 Dec 2019 12:44:55 +0800 Message-ID: <1576125900.29693.0.camel@mtksdaap41> Subject: Re: [PATCH 1/2] Return from mtk_ovl_layer_config after mtk_ovl_layer_off From: CK Hu To: Mark Yacoub Date: Thu, 12 Dec 2019 12:45:00 +0800 In-Reply-To: <20191211154901.176256-1-markyacoub@google.com> References: <20191211154901.176256-1-markyacoub@google.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191211_205505_545841_E21FC988 X-CRM114-Status: GOOD ( 14.88 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniele Castagna , Philipp Zabel , David Airlie , dri-devel@lists.freedesktop.org, Sean Paul , Daniel Vetter , Matthias Brugger , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hi, Mark: On Wed, 2019-12-11 at 10:49 -0500, Mark Yacoub wrote: > drm/mediatek: return if plane pending state is disabled. > > If the plane pending state is disabled, call mtk_ovl_layer_off then > return. > This guarantees that that the state is valid for all operations when the > pending state is enabled. Reviewed-by: CK Hu > > Suggested-by: Sean Paul > To: CK Hu > To: dri-devel@lists.freedesktop.org > Cc: Daniele Castagna > Cc: Philipp Zabel > Cc: David Airlie > Cc: Daniel Vetter > Cc: Matthias Brugger > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-mediatek@lists.infradead.org > Signed-off-by: Mark Yacoub > --- > drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > index 4a55bb6e2213..526b595eeff9 100644 > --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > @@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, > unsigned int src_size = (pending->height << 16) | pending->width; > unsigned int con; > > - if (!pending->enable) > + if (!pending->enable) { > mtk_ovl_layer_off(comp, idx); > + return; > + } > > con = ovl_fmt_convert(ovl, fmt); > if (idx != 0) > @@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, > writel_relaxed(offset, comp->regs + DISP_REG_OVL_OFFSET(idx)); > writel_relaxed(addr, comp->regs + DISP_REG_OVL_ADDR(ovl, idx)); > > - if (pending->enable) > - mtk_ovl_layer_on(comp, idx); > + mtk_ovl_layer_on(comp, idx); > } > > static void mtk_ovl_bgclr_in_on(struct mtk_ddp_comp *comp) _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D19BC43603 for ; Thu, 12 Dec 2019 04:55:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1012C206C3 for ; Thu, 12 Dec 2019 04:55:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="s3mxvRvP"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="dSp84jht" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1012C206C3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WTvxwDNHKfhbrdL3WIvat95SpxLz1hy0f+1jOsmIddA=; b=s3mxvRvPvlII8M 53n0OBd65eKQ0e+9bTHx2uFh9cNZnLxPECFIumLkaUHFGAqwTyJzqFxJBSG/ZYvPD+tY/uGLyEr2g 59erG4xSDrllhHs8YdqI9/Yn+2msHnITLyodXn0+aNMb1OTh9qN74CINcoxKd521vGMboH/eM7sFD mteixChCG2SVOI5Mb6fGfLF0c5d/1DBwEQmwMoXztymBKyW3U3pQvHJgmX4JxW8nUUCTYVObKtKBL lmg9w84dvfNIiuTW2cL8fZd2JAns05AEhcnibGC/3pJXe1JQGHqKoyGbaTBxDdSimD343hmU0NXl9 SaYxDsBIBGEb1o5IXR4w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifGVd-0006cE-4e; Thu, 12 Dec 2019 04:55:29 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ifGVF-0005hq-Fq; Thu, 12 Dec 2019 04:55:07 +0000 X-UUID: 0b697cb6484a41009d871eb5f31b1d8f-20191211 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=UCWp1N8gZKoS15JnTttPmlV5vpeES4YM/X1M4WTmQ4I=; b=dSp84jht4+RIY6YFbcAXEPj3fmwXw/DmsQWtq8OG3w/u5JPEONyx03D6Nm3fHNBBNRl/OnjpOxodcRfyDZsPh1qg/I3nBUImOj4gp12T6BW/n1KqvKWcDt9fa+IxLAzVoYjLEcmh5Ci8sEKR1O0BY/UyEsGVxzmpcnHTuyBEAQU=; X-UUID: 0b697cb6484a41009d871eb5f31b1d8f-20191211 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 555389568; Wed, 11 Dec 2019 20:55:03 -0800 Received: from MTKMBS07N2.mediatek.inc (172.21.101.141) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 11 Dec 2019 20:46:09 -0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 12 Dec 2019 12:44:45 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 12 Dec 2019 12:44:55 +0800 Message-ID: <1576125900.29693.0.camel@mtksdaap41> Subject: Re: [PATCH 1/2] Return from mtk_ovl_layer_config after mtk_ovl_layer_off From: CK Hu To: Mark Yacoub Date: Thu, 12 Dec 2019 12:45:00 +0800 In-Reply-To: <20191211154901.176256-1-markyacoub@google.com> References: <20191211154901.176256-1-markyacoub@google.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191211_205505_545841_E21FC988 X-CRM114-Status: GOOD ( 14.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniele Castagna , Philipp Zabel , David Airlie , dri-devel@lists.freedesktop.org, Sean Paul , Daniel Vetter , Matthias Brugger , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Mark: On Wed, 2019-12-11 at 10:49 -0500, Mark Yacoub wrote: > drm/mediatek: return if plane pending state is disabled. > > If the plane pending state is disabled, call mtk_ovl_layer_off then > return. > This guarantees that that the state is valid for all operations when the > pending state is enabled. Reviewed-by: CK Hu > > Suggested-by: Sean Paul > To: CK Hu > To: dri-devel@lists.freedesktop.org > Cc: Daniele Castagna > Cc: Philipp Zabel > Cc: David Airlie > Cc: Daniel Vetter > Cc: Matthias Brugger > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-mediatek@lists.infradead.org > Signed-off-by: Mark Yacoub > --- > drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > index 4a55bb6e2213..526b595eeff9 100644 > --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > @@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, > unsigned int src_size = (pending->height << 16) | pending->width; > unsigned int con; > > - if (!pending->enable) > + if (!pending->enable) { > mtk_ovl_layer_off(comp, idx); > + return; > + } > > con = ovl_fmt_convert(ovl, fmt); > if (idx != 0) > @@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, > writel_relaxed(offset, comp->regs + DISP_REG_OVL_OFFSET(idx)); > writel_relaxed(addr, comp->regs + DISP_REG_OVL_ADDR(ovl, idx)); > > - if (pending->enable) > - mtk_ovl_layer_on(comp, idx); > + mtk_ovl_layer_on(comp, idx); > } > > static void mtk_ovl_bgclr_in_on(struct mtk_ddp_comp *comp) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 232A6C43603 for ; Thu, 12 Dec 2019 04:45:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD9EE21655 for ; Thu, 12 Dec 2019 04:45:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="dSp84jht" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD9EE21655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E016689BF4; Thu, 12 Dec 2019 04:45:05 +0000 (UTC) Received: from mailgw01.mediatek.com (unknown [210.61.82.183]) by gabe.freedesktop.org (Postfix) with ESMTP id 29E7289BF4 for ; Thu, 12 Dec 2019 04:45:04 +0000 (UTC) X-UUID: 5c6e78b48f0f4baa93065c0d74242cb1-20191212 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=UCWp1N8gZKoS15JnTttPmlV5vpeES4YM/X1M4WTmQ4I=; b=dSp84jht4+RIY6YFbcAXEPj3fmwXw/DmsQWtq8OG3w/u5JPEONyx03D6Nm3fHNBBNRl/OnjpOxodcRfyDZsPh1qg/I3nBUImOj4gp12T6BW/n1KqvKWcDt9fa+IxLAzVoYjLEcmh5Ci8sEKR1O0BY/UyEsGVxzmpcnHTuyBEAQU=; X-UUID: 5c6e78b48f0f4baa93065c0d74242cb1-20191212 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 963950812; Thu, 12 Dec 2019 12:45:01 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 12 Dec 2019 12:44:45 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 12 Dec 2019 12:44:55 +0800 Message-ID: <1576125900.29693.0.camel@mtksdaap41> Subject: Re: [PATCH 1/2] Return from mtk_ovl_layer_config after mtk_ovl_layer_off From: CK Hu To: Mark Yacoub Date: Thu, 12 Dec 2019 12:45:00 +0800 In-Reply-To: <20191211154901.176256-1-markyacoub@google.com> References: <20191211154901.176256-1-markyacoub@google.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniele Castagna , David Airlie , dri-devel@lists.freedesktop.org, Sean Paul , Matthias Brugger , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, Mark: On Wed, 2019-12-11 at 10:49 -0500, Mark Yacoub wrote: > drm/mediatek: return if plane pending state is disabled. > > If the plane pending state is disabled, call mtk_ovl_layer_off then > return. > This guarantees that that the state is valid for all operations when the > pending state is enabled. Reviewed-by: CK Hu > > Suggested-by: Sean Paul > To: CK Hu > To: dri-devel@lists.freedesktop.org > Cc: Daniele Castagna > Cc: Philipp Zabel > Cc: David Airlie > Cc: Daniel Vetter > Cc: Matthias Brugger > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-mediatek@lists.infradead.org > Signed-off-by: Mark Yacoub > --- > drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > index 4a55bb6e2213..526b595eeff9 100644 > --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c > @@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, > unsigned int src_size = (pending->height << 16) | pending->width; > unsigned int con; > > - if (!pending->enable) > + if (!pending->enable) { > mtk_ovl_layer_off(comp, idx); > + return; > + } > > con = ovl_fmt_convert(ovl, fmt); > if (idx != 0) > @@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, > writel_relaxed(offset, comp->regs + DISP_REG_OVL_OFFSET(idx)); > writel_relaxed(addr, comp->regs + DISP_REG_OVL_ADDR(ovl, idx)); > > - if (pending->enable) > - mtk_ovl_layer_on(comp, idx); > + mtk_ovl_layer_on(comp, idx); > } > > static void mtk_ovl_bgclr_in_on(struct mtk_ddp_comp *comp) _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel