From patchwork Thu Oct 18 20:07:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 10648043 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 76F5B13B0 for ; Thu, 18 Oct 2018 20:07:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 666B028C53 for ; Thu, 18 Oct 2018 20:07:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56B9028DB4; Thu, 18 Oct 2018 20:07:54 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 160C228C53 for ; Thu, 18 Oct 2018 20:07:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A6C4C6E0F0; Thu, 18 Oct 2018 20:07:51 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 337AD6E0EF for ; Thu, 18 Oct 2018 20:07:50 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id r17-v6so2681861wrt.9 for ; Thu, 18 Oct 2018 13:07:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KFcqqMK50xzmXjG8++0fYZQhP7DL4140OO14QuNZyAM=; b=fp0/rDBeXyZkn2F1SfuQ52Xh5lz56QmQtQcAZnAI/KCx5xXfGPZsVwpfvi8a5U7ayP kCk0j4QqW71Y22mFE+hZaRZY2JAlc2/ZpiXHShZcg4X54fwKSjcDg9G+qXlQ6/JXC/Lv TL4S+PlXKZskhvXQltRb0HeUDOTOs8fXh5Fl94weucWdL4HiF3LRhY8HyqLMzbAE8UHJ zR8bZ10oxO7dX1q1Kf0dDhwbvBDJRT+Oque/Td8Aj5MGhsdNewCZ/xBMyUvpmo8Np/nM V9Xzy3es/GJRX4aTbFn7DmIYHZmFlwEoxyJYEReyySWHB3QzFG+o49DZlUjw4LJ/BP1r iCqg== X-Gm-Message-State: ABuFfohr8sSRTYP6yzUK1IkGwdhbrZRBabztQUWM12p3K0Tyg+JrRvRk Pg01Sd4alHedTK99LILXodEcTl5C X-Google-Smtp-Source: ACcGV60e07JgMAiRUdgT+hiLJ2n2NwxRCI6GXBvjIlTIUkJMZ5kwFf7ulzR8Ltu4CD96JCDSz/6J3Q== X-Received: by 2002:adf:ae09:: with SMTP id x9-v6mr29290081wrc.102.1539893268519; Thu, 18 Oct 2018 13:07:48 -0700 (PDT) Received: from localhost.localdomain (2a02-8389-4001-7200-e872-03a0-bb8d-7d2e.cable.dynamic.v6.surfer.at. [2a02:8389:4001:7200:e872:3a0:bb8d:7d2e]) by smtp.gmail.com with ESMTPSA id h82-v6sm648663wmf.14.2018.10.18.13.07.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Oct 2018 13:07:47 -0700 (PDT) From: Christian Gmeiner To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 0/2] xf86drm: add OF_ fallback mechanism Date: Thu, 18 Oct 2018 22:07:35 +0200 Message-Id: <20181018200737.5953-1-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.17.2 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: emil.l.velikov@gmail.com, lukas@mntmn.com MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Since kernel 4.17 (drm/etnaviv: remove the need for a gpu-subsystem DT node) the etnaviv DRM driver doesn't have an associated DT node anymore. This is technically correct, as the etnaviv device is a virtual device driving multiple hardware devices. Before 4.17 the userspace had access to the following information: # cat /sys/dev/char/226:128/device/uevent DRIVER=etnaviv OF_NAME=gpu-subsystem OF_FULLNAME=/gpu-subsystem OF_COMPATIBLE_0=fsl,imx-gpu-subsystem OF_COMPATIBLE_N=1 MODALIAS=of:Ngpu-subsystemTCfsl,imx-gpu-subsystem DRIVER=imx-drm OF_NAME=display-subsystem OF_FULLNAME=/display-subsystem OF_COMPATIBLE_0=fsl,imx-display-subsystem OF_COMPATIBLE_N=1 Afer 4.17: # cat /sys/dev/char/226:128/device/uevent DRIVER=etnaviv MODALIAS=platform:etnaviv As a consequence we need to add fallback mechanism to handle this change. This series fixes kmscube and friends when using mesa's loader_open_render_node(..). Christian Gmeiner (2): xf86drm: fallback to DRIVER uevent entry when OF_FULLNAME fails xf86drm: handle non existing OF_COMPATIBLE_N uevent entry xf86drm.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)