Message ID | 1523460149-1740-4-git-send-email-alexandru-cosmin.gheorghe@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EE61960365 for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 11 Apr 2018 15:23:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1D592897C for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 11 Apr 2018 15:23:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D681A28980; Wed, 11 Apr 2018 15:23:15 +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.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 820D92897C for <patchwork-dri-devel@patchwork.kernel.org>; Wed, 11 Apr 2018 15:23:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 69C586E692; Wed, 11 Apr 2018 15:23:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20040.outbound.protection.outlook.com [40.107.2.40]) by gabe.freedesktop.org (Postfix) with ESMTPS id CFD826E68B for <dri-devel@lists.freedesktop.org>; Wed, 11 Apr 2018 15:23:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hFncLMHBJw3zY51AAqtXvlyy7tPEUdjr/P/pi3n8qg8=; b=HWYlZ4oJC+i6aEvIBjES1pELgfmGWyRVGLGBppdYAkrwnr57ry9zeJqPMmk7U84DkcAL2FBa5vP5YyywzCnAmphroDkd2qB1z1BLXX2jdUN7wXdh21XKE5At/J7fozDiyzk/uYDtsD1PwxIGrJXjD2WjpjFOs6/GRTEbIIpjuEs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Alexandru-Cosmin.Gheorghe@arm.com; Received: from e114479-lin.cambridge.arm.com (217.140.96.140) by AM5PR0801MB1249.eurprd08.prod.outlook.com (2603:10a6:203:1e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.675.10; Wed, 11 Apr 2018 15:23:08 +0000 From: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> To: dri-devel@lists.freedesktop.org, liviu.dudau@arm.com, brian.starkey@arm.com, ayan.halder@arm.com, seanpaul@chromium.org Subject: [PATCH hwc v2 03/18] drm_hwcomposer: drmeventlistener: Set nl_pid to 0 Date: Wed, 11 Apr 2018 16:22:14 +0100 Message-Id: <1523460149-1740-4-git-send-email-alexandru-cosmin.gheorghe@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523460149-1740-1-git-send-email-alexandru-cosmin.gheorghe@arm.com> References: <1523460149-1740-1-git-send-email-alexandru-cosmin.gheorghe@arm.com> MIME-Version: 1.0 X-Originating-IP: [217.140.96.140] X-ClientProxiedBy: VI1PR0701CA0066.eurprd07.prod.outlook.com (2603:10a6:800:5f::28) To AM5PR0801MB1249.eurprd08.prod.outlook.com (2603:10a6:203:1e::8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM5PR0801MB1249; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1249; 3:knzGG4ySYsw6bPphkC18x1OyPBSY+zj622yRMuEu3B1jlYOjsJNzZ9Kqca7n6CLowlaebGHhUrw4fqWuE04vMB4a/nNd2byEBecHClH8rMAvoPmpDdZTCrsUPFeui8k+TrsjdYWjeYhVpDIw83saHuDSMx8Xkdoe3bTnVJYv2xRKA4avCklrVaK6yY+uytjWKRBiOknZdMZt0JK0BjjmF1QKPF6RoXuyq0syfqKtNr1w2wI9kwaD9cL5PptTJ/h0; 25:HosQ61Sa/+x8NWfNSfyV4hIl1Pu05TRlsW4jSiofbJvT6aMr+mp5fEp8iznmMJS2Snb++tdVChajh90A15YJAWi+4ENA3mGZFX+A6TKeq2PdM08+qh4LLce6e/Q2XCnMBVGMs1kXcDEyD3tgbFZJKN3X3OrhNes4y7VpL8PuoTK5RshfnqrZrqtnCBCGA8jSBtn+ouXj7FRYSM9gadVxfJelYr+ISGTp7D3FmYXbGwZufB3zJl0zku3XqSQb8MCp4IAfxS8ufwR1ve11Zd1BPum1CWmTVt8SEI0fzgwyH/3k5a2UE4HRziePgyHkoD5DlTRKSyQzXOlfHqNvfB+iUQ==; 31:ziL7AwlzlfKuh+LK/Y5LiwsDvrZQ5I/koC5july7WYo7V/Teyi1mq91JiNGp9VT+iXtsvfcnC4kViO3P0CE9nfv5EUkCu2fi5bl11FvYEvtdaB/uI0Jk/pZH04dSKt62rfZv2WbZBDDDZwsLXzfFNfIVPUz2djyfzpN6Iu7LP0JhtxphWwYsh8S7OgEG/AvEBFnPrEP5S+5P5lfG4iAlhol2ZXtBWG6GCpOSxFpSi3A= X-MS-TrafficTypeDiagnostic: AM5PR0801MB1249: NoDisclaimer: True X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1249; 20:QzXFPN0eVzOn08W2YNlRwgCocVT8aR88DrLpRAxvZ+3WNtb/TXGpdI+9Gxnb9zRF3pV7Sf2lwH8aCnn+76Gj9tESVsv3sqeZ/dPpcgR6DtkRy16RrCndi6mDYJ72PzaADh/vRaH709AsmWFgbuE4ZS77ybkx3udYKpSO3iopicQ=; 4:+BjrsnFS5QT5eSGBglu/BJAvwQTdmABeT6wmRUrem+a3fVksiPVi6yKsVLFskSEJIhg5QUsKi148ny+PdorpvsZYKIgbCME3RNjsoLHIOnINt+tNxKXynMYLbZPvmKMrKP8HuqmPSlL+udwEA0PZ1EDljalPQerITFty1MlM5ZlgnEMID780SPlmbH4ooVz3xDGecugFNcw3JS8dYJIa7h2QMlQz1A4wb8ZaLp2LwnGSp2VRcr3/k8F2t/0waS+7TjwU4eItgE71oRjClJB/LWwiGG0Wy0Y/W+gCUBVjfI5NqVsCQQaH7Bv8jRBQMrCC X-Microsoft-Antispam-PRVS: <AM5PR0801MB12492AF7843D79D4721ED0E5BCBD0@AM5PR0801MB1249.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231221)(944501327)(52105095)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:AM5PR0801MB1249; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1249; X-Forefront-PRVS: 0639027A9E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(346002)(396003)(376002)(366004)(39860400002)(189003)(199004)(16526019)(478600001)(305945005)(50226002)(16586007)(68736007)(7736002)(86362001)(81156014)(8676002)(316002)(81166006)(4326008)(25786009)(2906002)(50466002)(8936002)(6486002)(105586002)(48376002)(186003)(956004)(5660300001)(6666003)(72206003)(106356001)(476003)(53936002)(3846002)(76176011)(51416003)(52116002)(47776003)(7696005)(36756003)(66066001)(11346002)(446003)(386003)(97736004)(59450400001)(6116002)(2616005)(26005)(486006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0801MB1249; H:e114479-lin.cambridge.arm.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: arm.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR0801MB1249; 23:ZQfKmhvMqoohXqssJwJM4ezXH9+7CNd9NLVmODT?= =?us-ascii?Q?w6dlyu+ItinVjnawnFjL7SU1PVO9Nlk4W8/KS2zm5OK6Izt+ykUyVjVPmC9D?= =?us-ascii?Q?C0UqB34EeMtUurNSACzNpG1goM1Yc6CTgYhKJKW9EkwhpEoLLT/ABm1JVWBe?= =?us-ascii?Q?CTzGAzdhTIYGaWxVE/Pm+NiRNf+3+J3D2jNgW2s7/bUYPbfCYhEU2WZdDOg/?= =?us-ascii?Q?nvx2AhoVi1zbKZjFgx/bvgTcI2qlmWBQE61K0E6R8zbhxy36fp+YXyV7fynb?= =?us-ascii?Q?brD5uZpntEySc+Q+lxgc7iDOi/ewgu+bhjinV976LK455BcsRYi0ce+1KhHL?= =?us-ascii?Q?An+SDEknFQuBkvxs0rR2+LIozJtca+dcZv8Acy0cSA4G/skfdCn9SD6QfshZ?= =?us-ascii?Q?LzToonYWGkvuSLYAreFPj/YQg4X3efj+4Bvi0AFIVruxy/PV3VOChuNvJ6KY?= =?us-ascii?Q?JQ2YhyQrg33Aknogh+QTU4r7rAm2stY91CVvPsHu6XncqRCE90ueWPRsrIuW?= =?us-ascii?Q?U6iWOz6jXba+RT/a2E9aWrlmZmsZBvXChP2NZW4P8423hvbBnIaIhmjhJ8Pn?= =?us-ascii?Q?P6qKon9SadFUcw0sDxocgHVlnmaPuIUezu1QoUnQQxS63vVx9LX9NRIRhM05?= =?us-ascii?Q?1PF9WSlOJPeyucXmT1vw/NWnZceXH/04TyogKDPLHEOQGFkq7UlgVitNTc9V?= =?us-ascii?Q?C16w34AYhGe5KLGB6NrK5EsPRa4mEV9L4KpWYc8dTvt8RRTPSKkp2Cu541PK?= =?us-ascii?Q?GV4wa7/sPSug80/DSyby/hMv8wtqnAc2/dqbjVatKqC9F7MoqkMzhGzKgRUw?= =?us-ascii?Q?Q+nOHlhjgQy4AkvjiOcbmlp5l2xbKJprOjSpdEL5t+islUQ7pivQYC6JGiqT?= =?us-ascii?Q?tbX+H7AXFwJo+brvhCX22d/+uv8rInlxcEexzRrPXY6Yekb5740uVvv/WmXN?= =?us-ascii?Q?yEzwUEG9TQYpvGOLYNY84fgZOwSXzCL7de6mjE6vTlCkvgzZqY3w0B/1aoIM?= =?us-ascii?Q?uDPfYUtdVbCqPPVmoMv+zKXf8sObJUrP3lQhvGNwrfey6xVBQrn5hwYq7bSi?= =?us-ascii?Q?1NZTXWtb0MX4BmqTEqttXAbm+y2ux7VMSmsXrIQ+Vtm6rxMFa6C4gz+05GGI?= =?us-ascii?Q?AwfiJ20vgze3xm4tApamV9s9paz3KkbqXQ/MF7ACnOqGBrLlPFN67tcuna4b?= =?us-ascii?Q?gjGEN5NheGkmvdMg=3D?= X-Microsoft-Antispam-Message-Info: WfaqAtoweA9/ZFkfhefqXABJvhxEm2p0WsVUzdLslOM6gz19FsqHnYKxTzls5RBGZPtWfj+hl8sjkoSCo7AWYmcmwG1tuvzy1SRYF6KQCBIj4hsloDxSZ9HYgVBb99pJsyd+GbozX15+gNqACQhiFHHJhTjNn/+JEJ1WVROfJOMNo+ly4UfUJZAAGSxzmr8j X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1249; 6:Ni91lhGlknWui3V2nuRiYBFpgt/JNPJD3J73mz5dZGA/TU+E9I26anChF2bn1uUlAF9nx5925685Imf6jPIjomByekQJSAnz5ya4s2lpHzVfCF+FDHaINinmcyYA/yOxpl4dLSEDtmnUoKoUaK/Km8JemvN9RgBbHAxV+L5uBScVQ4CqvkEEJBIOmj8k7l8VrCHZ8Wi/DMIAPIpl17MomBR3hGa5DhGwyH0GjAPE4JEyo8NOBcYJ5P70zI5AWNfMFinT/MikJW4MDkCBMK/WAi1SxKIvaPVfRf8/xwqrcw5H7Mci2+MgR+V/ZSyj9iQlIf/CwYAx1LQKSFmX+ChT3zUl+ARXFBLsnc3g9yv9NV0Ywrba4Weq/QCjhVM9UEkABCGDSh7shjK7A9/2Y33pUj8pPT5iWJ7ZCRNEco4eT1s1qz6VaYNQiO0hOkxyyjwr5F4qstWOYFSNysp/tqol/A==; 5:DeS63OUiQR2ZEXR1RtDjVGBDMbtfstl7vNlVgdo2BFOUkgDvdIn6l7KCGpOA3MpvZpzIdml5a58JthX1jbsMHgOqW4RlUOVjPrU+KqkpNzW9COXhtmj7tsNsSfCQ3lOhWcaEfA6uVHf0FLdnODXrKBLQZHtUPIs42QKBGujZnbE=; 24:97zhArrQrc0mQHN2SQ7+LiVjtLIAX5atd9wQpsTcmOytmZrcw8a6QYqVgL1bCT9/PY46ZsMn/RJ09nv9VoDa193fvIbWhs/kYRDUmPGnDbY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1249; 7:UiGBnStU30ejbECexOQoGHk9z3/C+G8Z7NiMvDkapXVEgADO8Fr50z1K+UeX04j1rIRXtgi3OjRRhgKSO9S6gofRPZA7Rpp0LErQkiVE+xVs+p7RWGksAa7Udp2i9Y96MT1LeZHOI9CI2TpSd/E4GLg13AW9gYaI2kwGZG/fqz8qR5XkoZIy/7EyNYta6iQ02gwKRM/uprPEW8n4iL1uwbY6UaKU85RssmNXLctavczHMK9RgJMJG9hawzOZYYpz X-MS-Office365-Filtering-Correlation-Id: bee36ce8-7374-4fa9-d0fc-08d59fc02180 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2018 15:23:08.2546 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bee36ce8-7374-4fa9-d0fc-08d59fc02180 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1249 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: nd@arm.com, Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Hey Alexandru, Feel free to add my SoB to this patch: Signed-off-by: Robert Foss <robert.foss@collabora.com> Rob. On 04/11/2018 05:22 PM, Alexandru Gheorghe wrote: > By setting nl_pid to 0, we let the kernel to assign a port for us. > In the current implementation there is no way we could create more > than one instance for drmeventlistener. > > Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> > --- > drmeventlistener.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drmeventlistener.cpp b/drmeventlistener.cpp > index 984d1dd..5534182 100644 > --- a/drmeventlistener.cpp > +++ b/drmeventlistener.cpp > @@ -46,7 +46,7 @@ int DrmEventListener::Init() { > struct sockaddr_nl addr; > memset(&addr, 0, sizeof(addr)); > addr.nl_family = AF_NETLINK; > - addr.nl_pid = getpid(); > + addr.nl_pid = 0; > addr.nl_groups = 0xFFFFFFFF; > > int ret = bind(uevent_fd_.get(), (struct sockaddr *)&addr, sizeof(addr)); >
diff --git a/drmeventlistener.cpp b/drmeventlistener.cpp index 984d1dd..5534182 100644 --- a/drmeventlistener.cpp +++ b/drmeventlistener.cpp @@ -46,7 +46,7 @@ int DrmEventListener::Init() { struct sockaddr_nl addr; memset(&addr, 0, sizeof(addr)); addr.nl_family = AF_NETLINK; - addr.nl_pid = getpid(); + addr.nl_pid = 0; addr.nl_groups = 0xFFFFFFFF; int ret = bind(uevent_fd_.get(), (struct sockaddr *)&addr, sizeof(addr));
By setting nl_pid to 0, we let the kernel to assign a port for us. In the current implementation there is no way we could create more than one instance for drmeventlistener. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com> --- drmeventlistener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)