From patchwork Tue May 21 08:24:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Hellstrom X-Patchwork-Id: 10953149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7048616C1 for ; Tue, 21 May 2019 08:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62AD7289B3 for ; Tue, 21 May 2019 08:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5710F289B2; Tue, 21 May 2019 08:24:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 11FB1289B0 for ; Tue, 21 May 2019 08:24:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 77D5C891C2; Tue, 21 May 2019 08:24:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-eopbgr780051.outbound.protection.outlook.com [40.107.78.51]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1F487891C2 for ; Tue, 21 May 2019 08:24:22 +0000 (UTC) Received: from MN2PR05MB6141.namprd05.prod.outlook.com (20.178.241.217) by MN2PR05MB6383.namprd05.prod.outlook.com (20.178.245.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1922.13; Tue, 21 May 2019 08:24:20 +0000 Received: from MN2PR05MB6141.namprd05.prod.outlook.com ([fe80::c19e:e8f8:b151:9ad]) by MN2PR05MB6141.namprd05.prod.outlook.com ([fe80::c19e:e8f8:b151:9ad%6]) with mapi id 15.20.1922.013; Tue, 21 May 2019 08:24:20 +0000 From: Thomas Hellstrom To: "dri-devel@lists.freedesktop.org" Subject: [PATCH 1/6] drm/vmwgfx: Don't send drm sysfs hotplug events on initial master set Thread-Topic: [PATCH 1/6] drm/vmwgfx: Don't send drm sysfs hotplug events on initial master set Thread-Index: AQHVD66WB8FhPxysTkevBEDoHQXT2g== Date: Tue, 21 May 2019 08:24:20 +0000 Message-ID: <20190521082345.27286-1-thellstrom@vmware.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0156.eurprd08.prod.outlook.com (2603:10a6:800:d5::34) To MN2PR05MB6141.namprd05.prod.outlook.com (2603:10b6:208:c7::25) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.20.1 x-originating-ip: [155.4.205.35] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3916b6a4-4501-461d-7e40-08d6ddc5b8b4 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(2017052603328)(7193020); SRVR:MN2PR05MB6383; x-ms-traffictypediagnostic: MN2PR05MB6383: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2512; x-forefront-prvs: 0044C17179 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(39860400002)(366004)(346002)(376002)(189003)(199004)(52116002)(3846002)(2501003)(71190400001)(71200400001)(6116002)(316002)(102836004)(99286004)(2906002)(6506007)(386003)(68736007)(256004)(14444005)(14454004)(66946007)(73956011)(66476007)(66556008)(64756008)(66446008)(478600001)(54906003)(305945005)(6512007)(36756003)(66066001)(26005)(7736002)(5640700003)(6436002)(81166006)(6916009)(1076003)(25786009)(186003)(8676002)(6486002)(4744005)(81156014)(86362001)(50226002)(8936002)(4326008)(2616005)(107886003)(5660300002)(486006)(53936002)(2351001)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:MN2PR05MB6383; H:MN2PR05MB6141.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: mftSggKJbOGyidAMiUYrS4/UZ8y9IvSWcCLgonWSB1p44PcSdPMnKEVgAqJ8O2tPJzJTK5kUA9K+wjhTWc11dStNpy59hnRUCii5IYOFZVDPcTZIGPLOev30EyNnt1umQkP/qcitAKKJKF3NDdmGbOq+ZNJRjggfWZS4TUauFXme3U6vEYy5mhHqQ0EAAXp6bRA3eSpyDYKRz62WH8NxfmIe4qmSxOJz8c3lh26HK9fTMGweoalITqmCIq7gsEYqdlzhKp61Q76ty6e+ThhaC+6pX+TQ7YkYdfQZwyhXk7O27fF1OcFmzZH6Cc4x3S4wlz5pIsm8cVu/gwsyP68gTdBZIrM0Bhp8tCTyK9mFOP54E4/xGIMGB3RCzmfqPv7rCg28A0ual733m7BfmBUp6N0mahPpIlKkJhCx4KUqRFg= MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3916b6a4-4501-461d-7e40-08d6ddc5b8b4 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2019 08:24:20.1953 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: thellstrom@vmware.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR05MB6383 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qwKp7MBQrobFVMA6UrLVzIXuUlK7fyuxYdOSASmRVVE=; b=tONd3NOCPHX+JcFH8MPLKRDq0u899q8Mf+r41QMB8f4a1oVBulEGP90RdY/ijYLd+L1S1LR0c7/didObknsgFMX166BRT6PzmryRineWsk3ZhoT3FtgclJEwDCo8xBf4ZzPXm8btJDc7NYl4xL1vkp/dX8WkmUZMB6ZFwlvRzIk= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=thellstrom@vmware.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Hellstrom , Deepak Singh Rawat , "stable@vger.kernel.org" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This may confuse user-space clients like plymouth that opens a drm file descriptor as a result of a hotplug event and then generates a new event... Cc: Fixes: 5ea1734827bb ("drm/vmwgfx: Send a hotplug event at master_set") Signed-off-by: Thomas Hellstrom Reviewed-by: Deepak Rawat --- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index bf6c3500d363..4ff11a0077e1 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -1239,7 +1239,13 @@ static int vmw_master_set(struct drm_device *dev, } dev_priv->active_master = vmaster; - drm_sysfs_hotplug_event(dev); + + /* + * Inform a new master that the layout may have changed while + * it was gone. + */ + if (!from_open) + drm_sysfs_hotplug_event(dev); return 0; }