Received: by 10.223.185.116 with SMTP id b49csp1107881wrg; Sat, 3 Mar 2018 15:47:56 -0800 (PST) X-Google-Smtp-Source: AG47ELtXkQy9nuNdQFv5TEwZ+DIXd2MKSW3TLkd42JLSP0uksX3mHujjpnoa5x7PDPNgUGoEpeqo X-Received: by 2002:a17:902:864b:: with SMTP id y11-v6mr8930360plt.380.1520120876507; Sat, 03 Mar 2018 15:47:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520120876; cv=none; d=google.com; s=arc-20160816; b=tlWgo+GDdXR3XIawJQPDgrW4aHIx1fKXWSbZVdWHo+WhqcN/Rg5x16vzlyWKOp5w9V JaeZWopTe4eSPMD2XaXemL5MOoLC1y/zhf/PpNwF0XGgaWsl7LyJ3TeK/MxeODQ0IUZw ScKSyHzSPWiWcUvyKXZoMSyIt+SLihX0GVf1blDxX5dU/B/jeSXLJSxNrYWNltH0J59/ +lMrYn9Fdwuu+2eMECQD8FQn1yEFfchrXXtuHNUWScEmZWZioAFdu1tKSGaB1HhxKkNj 35m1VNOXHSY265LB34uy+zCk1OY8R4DSd3UPQXv+RpuYTsD/pBvN9OroG1D29X7KDlwA vp5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=UT5KafSNt9CC3Ygy1LNhf4NcwmP0yNHa2+BnAa/fxNw=; b=NICgJBMywFBMpDv8Ud4cxHnjW2KmJdyDn9wxxSo4x2BMiGiXYXFz/K+y6EseQgFMPW XUCfisWtd/08IV6dVl6F3I/PtM4QrW3M1ct0ZIJZPFIFEc2Vdk7q7SHA8rZ7bdjK2uOb zOlaj/C2R0aw4pGcxpBHctZbRFuxRoXlwlV0EcikYfJIvGaBKjESV1UMhAOQ61o47zTT trl+2VueOiNXCLPwYe2fpWzb6fheKiPdchiOofHjLZuq69yzrsCXqV0CMNb4mNR6iA4q j48qRZ3ZDPgYr5lRKHMqAdamrR0x72G8QJkkOTrhbhm/+KY9IeIKDjgVcDcmwpCoeni3 KQfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=BKe7xJzO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2-v6si6936416plo.140.2018.03.03.15.47.42; Sat, 03 Mar 2018 15:47:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=BKe7xJzO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934055AbeCCXp4 (ORCPT + 99 others); Sat, 3 Mar 2018 18:45:56 -0500 Received: from mail-bn3nam01on0104.outbound.protection.outlook.com ([104.47.33.104]:36491 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933892AbeCCWeK (ORCPT ); Sat, 3 Mar 2018 17:34:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=UT5KafSNt9CC3Ygy1LNhf4NcwmP0yNHa2+BnAa/fxNw=; b=BKe7xJzOFlpfmS296SQRNcgRFqOse4fa4Bw9lT5g1hVRc6PW6V4lMoWnoVqzqrSTq+qdyFkFqk2UXLwR0YWec8uWCPT4w1jt/mtagVzJp3FxwNbL8cpjQIweIQcrS3KFSNvLiMYnomRVRX6taoJOZ/ckVndg1iiDYG6IVH2M26s= Received: from MW2PR2101MB1034.namprd21.prod.outlook.com (52.132.149.10) by MW2PR2101MB1065.namprd21.prod.outlook.com (52.132.149.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.567.2; Sat, 3 Mar 2018 22:34:04 +0000 Received: from MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0]) by MW2PR2101MB1034.namprd21.prod.outlook.com ([fe80::1d56:338f:e2b:cec0%3]) with mapi id 15.20.0567.006; Sat, 3 Mar 2018 22:34:04 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Laurent Pinchart , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 107/219] drm: rcar-du: Handle event when disabling CRTCs Thread-Topic: [PATCH AUTOSEL for 4.9 107/219] drm: rcar-du: Handle event when disabling CRTCs Thread-Index: AQHTsz8F5jkqEtr/x0WC7KiBNmkzlg== Date: Sat, 3 Mar 2018 22:28:58 +0000 Message-ID: <20180303222716.26640-107-alexander.levin@microsoft.com> References: <20180303222716.26640-1-alexander.levin@microsoft.com> In-Reply-To: <20180303222716.26640-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MW2PR2101MB1065;7:zOhpqNQasX8QdmCM4zWZT2HXm1CkmFRo/X/AKcJ/dAqGhS+LGDlTtJQWxGI13tbvniJAarnQPbx6eQQTLZb96iKzVS1hAZm6baFDyhMa4XHtc1sBpnpNy4dg3HbbXHIfvqSoyBOESRgxNffGImG91WjkAFuxyQRTSXLrvoxMRLQFRP1TXZXwHGag7t26Zsa9sTIng0tdRkDGj8C0j5Ht7lb1At6h+9PWIvBMWdkO5IQr+GE6mXyQZJXcXnvOBdpc x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8e3f882e-01cc-43c5-199a-08d58156de88 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(3008032)(2017052603307)(7193020);SRVR:MW2PR2101MB1065; x-ms-traffictypediagnostic: MW2PR2101MB1065: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231220)(944501244)(52105095)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:MW2PR2101MB1065;BCL:0;PCL:0;RULEID:;SRVR:MW2PR2101MB1065; x-forefront-prvs: 0600F93FE1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(376002)(396003)(39380400002)(39860400002)(189003)(199004)(6506007)(22452003)(54906003)(25786009)(6666003)(186003)(2950100002)(102836004)(5250100002)(2501003)(110136005)(97736004)(316002)(2900100001)(36756003)(76176011)(6436002)(59450400001)(6486002)(26005)(4326008)(99286004)(68736007)(6512007)(6116002)(10090500001)(106356001)(105586002)(478600001)(66066001)(107886003)(3660700001)(305945005)(86612001)(14454004)(81166006)(7736002)(86362001)(575784001)(1076002)(72206003)(2906002)(10290500003)(8676002)(8936002)(81156014)(3846002)(5660300001)(3280700002)(53936002)(22906009)(17423001)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:MW2PR2101MB1065;H:MW2PR2101MB1034.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: H2tngeYVCdUgef26KAdPq48qFCZjdN+xmYqg0uRDDjZr6q6kcL99Zm+K3cy46F7fD310XCHd867kVeTLk3gkWQSuYWtFTc0BE7E2R8QeT3szjLPMwT3ipdD6m7fOxmMKYkCmLTf9U4aBNY9vDuDGj97rGwSirOOwzWez89e6w7U= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e3f882e-01cc-43c5-199a-08d58156de88 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2018 22:28:58.0569 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR2101MB1065 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Laurent Pinchart [ Upstream commit 6dd47cfd03a058d08b8caffb06194aa0eb109cf1 ] The driver currently handles vblank events only when updating planes on a CRTC. The atomic update API however allows requesting an event when disabling a CRTC. This currently leads to event objects being leaked in the kernel and to events not being sent out. Fix it. Signed-off-by: Laurent Pinchart Signed-off-by: Sasha Levin --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c b/drivers/gpu/drm/rcar-= du/rcar_du_crtc.c index 3322b157106d..1c4d95dea887 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_crtc.c @@ -512,6 +512,13 @@ static void rcar_du_crtc_disable(struct drm_crtc *crtc= ) rcar_du_crtc_stop(rcrtc); rcar_du_crtc_put(rcrtc); =20 + spin_lock_irq(&crtc->dev->event_lock); + if (crtc->state->event) { + drm_crtc_send_vblank_event(crtc, crtc->state->event); + crtc->state->event =3D NULL; + } + spin_unlock_irq(&crtc->dev->event_lock); + rcrtc->outputs =3D 0; } =20 --=20 2.14.1