Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp409134imm; Fri, 3 Aug 2018 05:37:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeRX/EERpIgkqYcRPX6bOgDdxBBdtC5uk9Bn2bqDPACkXO6dMnMKqLJyMSlEqBfVzF1wJSt X-Received: by 2002:a17:902:b486:: with SMTP id y6-v6mr3392870plr.27.1533299824682; Fri, 03 Aug 2018 05:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533299824; cv=none; d=google.com; s=arc-20160816; b=Klyn9RMfiPqtI0Vq/raRY6TFKBDF1IrTrsVE0sLPQR1zEBludhAtZyq9naYeyYRAy6 k20XASR3DZGzs2qVPS81vn3L1oMm2DjH1t4aTadRrUbYm5OvzYEumw2LG50yq++FPky5 247T2Iz8l8Qa0MvWaBFX7UQLYVX0dk+DBh+7K6mcRGb23IIYtpRy538q7lsLNP6FAIpp sjPqUNgGHOEXlO+xRXVaOh8cZuX8EI1z88CH5aDUqxzJj0Gsn+/qPaCc9VtmBl7ESKH6 w+1exXtz2ZtkK4MyxprNFPqbAg1ouDQPfRjTW5/KzyKeCKJqa7IHQLG8X94O2keUxhiN LJfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=wpQmnJomdj2K6XAdjkAsijWMJ5sp0iOAASGaGcqKubc=; b=EZnHvzwMXVq0g3h5zk6WLB/RhC/phZgNiCY/OILgsreuk/PjRp3AClzQbMQS05NO7d b6arz3xLk1DkuzsklVQVBRi/pyWARwkUNNZswvN5pinCGiT7C7/T0RgVTYD49L5GGJQs fW3SrjcydDGbA+aeTmGEimXDqj57pvNtZhf70R8v8xBnnXGbhzjzcwxy9KHYiNLpUBpR BRvObRMIgjSVrDqQBsknNY0yXqkKwRZJP75agJLQSU+ytoxvvY0Z+5iY4UHy6qjB7B1Y iG78143O0zWrrUnaGt4rNP6L6Mxs5RAsbPpOKK5AT1CwH43FqSoQ589/wXjPeogaCEeM 2mbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Tk3gSgwg; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d22-v6si5110730pfj.311.2018.08.03.05.36.49; Fri, 03 Aug 2018 05:37:04 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=Tk3gSgwg; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729764AbeHCObw (ORCPT + 99 others); Fri, 3 Aug 2018 10:31:52 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45274 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728123AbeHCObw (ORCPT ); Fri, 3 Aug 2018 10:31:52 -0400 Received: by mail-wr1-f68.google.com with SMTP id f12-v6so5252179wrv.12 for ; Fri, 03 Aug 2018 05:35:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wpQmnJomdj2K6XAdjkAsijWMJ5sp0iOAASGaGcqKubc=; b=Tk3gSgwgIVaJ7J7BmTSEkron0641pKP9IyDlWwBRLAUDsitkWegqxrQUjWngMLVxTx OFcy8PMprCncEU20EYaRgy9ydaipLvf1l5X4xpolMKokTKpC56OiKmOEqNUnbBnu6nt+ 0Sf1OH2+1byk9kMSDznvZsKm7oRAruKDr6jGN6/4zvxNR+afnk+JciYv7r73etuf8R1V 9ekEOMU/s/1bzGToEIM8uWxrZhy1faqRcCbkwNN+L8Sv5K7L02tJJIo6sd7cVrdxoki9 AuxPfgVIpa2ogxcdxTumizP9MZnL0FrnGoQtIXIAufyXd/l0xOElB/tCfLptxjJEv+R4 oSQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wpQmnJomdj2K6XAdjkAsijWMJ5sp0iOAASGaGcqKubc=; b=nrkxAiPOYRsYq3ajwe5SvWcKw+s7Pn8rF/UxZZvzgRtbz3eYLhlmZKcl1yFqCU/JU7 O4BMazbCvUjylmWEaz9ez8h9E//d/EUnc3Syz9uNahs03fWmH3tKcsGDxaRWQjn7y5s8 QXWnJoT2hjQnqgeukczPpBSNvL23QPBYE5Z7y+m2OQqfS0ELPENa6birs3OHtqC2DnNF 2aUkI1Pwtk+dsnZ5ah2Z/R5KnfQ8CpkpJnDbm9X8ykXcnq937nVVWjPIHv3os+8PQBQk TygNqr2WShLZ5gLsidNUeUUNhJPBv9C1mAsqQzWgI+IyLKXlJP93JLa9x3m4feJCFPUp Ujag== X-Gm-Message-State: AOUpUlFba7HRj+UfqHR2J/QyTBZz64+GeN5S7s4J85BVNRvOLQOpauE4 Yt43sgK5QrAHPwEwn4wlEZva1vCMRF4pJu+6LOo= X-Received: by 2002:adf:ffc7:: with SMTP id x7-v6mr2535039wrs.137.1533299742819; Fri, 03 Aug 2018 05:35:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1c:178a:0:0:0:0:0 with HTTP; Fri, 3 Aug 2018 05:35:41 -0700 (PDT) In-Reply-To: References: <20180724082213.25677-1-robert.foss@collabora.com> From: Emil Velikov Date: Fri, 3 Aug 2018 13:35:41 +0100 Message-ID: Subject: Re: [RFC] drm: Allow DRM_IOCTL_MODE_MAP_DUMB for render nodes To: Martin Fuzzey Cc: Robert Foss , David Airlie , Brian Paul , ML dri-devel , Eric Engestrom , Gustavo Padovan , "Linux-Kernel@Vger. Kernel. Org" , Maarten Lankhorst , Nicolas Norvez , Rob Herring , Sean Paul , Tomasz Figa , Tomeu Vizoso Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin, On 1 August 2018 at 15:24, Martin Fuzzey wrote: > Hi, > > I am running into the same problem using etnaviv on i.MX6 under Android 8.1 > > The mesa etnaviv code uses CREATE_DUMB / MAP_DUMB for the scanout buffers > and is called from the surfaceflinger process. > > But, under Android 8.1 drm_hwcomposer runs in a seperate process to > surfaceflinger. > Since drm_hwcomposer needs to use the KMS API it must be the DRM master, > that means that surface flinger cannot be DRM master too. > > Adding a render node to the imx drm device and configuring mesa to user > fixes > the problem but requires the render node to have access rights to use > CREATE_DUMB > / MAP_DUMB. > > > Here is my full patch: > > Make imx-drm export a render node so that mesa can use it to allocate > Let's start with the not-so obvious question: Why does one open the imx as render node? Of the top of my head: There is nothing in egl/android that should require an authenticated device. Hence, using a card node should be fine - the etnaviv code opens the render node it needs. It's been a while since I looked at the imx/etna code, so I may be missing something. HTH Emil