From patchwork Wed Apr 17 01:30:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 10904321 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 7EA081850 for ; Wed, 17 Apr 2019 01:31:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A25528A20 for ; Wed, 17 Apr 2019 01:31:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E55B28A24; Wed, 17 Apr 2019 01:31:06 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0EC0E28A20 for ; Wed, 17 Apr 2019 01:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728531AbfDQBbF (ORCPT ); Tue, 16 Apr 2019 21:31:05 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34964 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728486AbfDQBbF (ORCPT ); Tue, 16 Apr 2019 21:31:05 -0400 Received: by mail-pl1-f196.google.com with SMTP id w24so11209556plp.2 for ; Tue, 16 Apr 2019 18:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xkAKVbztOl2ooBv5T7TvWJZBE6Kq2MbOdqD7gIh3+KM=; b=Dj2Aws22WKlTonSuaawzoXqil5ROk0uEsZaq3uEIwcLDgZjs3u2kxZDXODjMgsUYFy 33OdBT/zakK/7xjb/ECe+51zmTqJOqnD8DZW7mWtmSlasFFXpnWcOC0Wi5Iac17SEy7/ eIig3VfZ80VMIWuz/oSy+wkDdEk1tjWyr9M7mqLDLmSR3NNAQW3uPhMwQyLiimK/XQjW aWracebO1KrbfeVM9Yka8KDZ23CinJuxCGLua4Hp3SNOTenx1E4ZSe5avmZXDjIERlzy NBdZ2LQX4r4h38KKmvgHRTd2EhoT4ifjCIxz84VYKwvAmtO511Xf+Kw+WusdoYMk4fD9 No0Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=xkAKVbztOl2ooBv5T7TvWJZBE6Kq2MbOdqD7gIh3+KM=; b=nelqRtNMnYmGGvwVAFOLwSE+3IqCcNqYb8/fSVv1z9+Xh9fsS8VKq+cv0lLdh92/sY CNzPWBiD+Diy9N0xdFCqBlLGfBJFyp1YlXU/yMUXk70zJPiF8twTjkyAlE3VQJuje1WI 8SQEEQmdup5gzunDpg02VJAhG+YhlvFr8fw4mWBVMk00vIgl46u3c4fxOf219AznP+6y s9VZQylgavFbaw7tf8icrSw31Ql6bYyN3oc3uhHCC5UJsxS4eABfhg/yrsmM38Vocnj3 bOPdSL4N2RJUExrfEP72Exi70XzHv+6lPGzBTVGxwgOoDj4sC0aU853FD+sbr+ZJpYvD jNmw== X-Gm-Message-State: APjAAAXfQN+Y8s8QW9+hbf/LLbR3G3J6/puc1EoeHqng8dGNLFtIGgja ds7WV76i1HCgV0DlesPa1FM= X-Google-Smtp-Source: APXvYqy/dikwvIGaUO23gJsHU1O+AeXo5cYujoO+CYEscppR+SFtpHAV2d+PH70P14pvrGpZt4bS1A== X-Received: by 2002:a17:902:20c9:: with SMTP id v9mr64832773plg.239.1555464664351; Tue, 16 Apr 2019 18:31:04 -0700 (PDT) Received: from localhost ([2601:1c0:4501:a35a:719a:233b:28ab:5ad5]) by smtp.gmail.com with ESMTPSA id a12sm62200428pgq.21.2019.04.16.18.31.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 16 Apr 2019 18:31:03 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Rob Clark Subject: [PATCH 1/3] drm/msm/gpu: add per-process pagetables param Date: Tue, 16 Apr 2019 18:30:24 -0700 Message-Id: <20190417013031.555-2-robdclark@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190417013031.555-1-robdclark@gmail.com> References: <20190417013031.555-1-robdclark@gmail.com> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rob Clark For now it always returns '0' (false), but once the iommu work is in place to enable per-process pagetables we can update the value returned. Userspace needs to know this to make an informed decision about exposing KHR_robustness. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 3 +++ include/uapi/drm/msm_drm.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 2cfee1a4fe0b..fbdf6f1c247e 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -62,6 +62,9 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value) case MSM_PARAM_NR_RINGS: *value = gpu->nr_rings; return 0; + case MSM_PARAM_PP_PGTABLE: + *value = 0; + return 0; default: DBG("%s: invalid param: %u", gpu->name, param); return -EINVAL; diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h index 91a16b333c69..a9fdcf1689ce 100644 --- a/include/uapi/drm/msm_drm.h +++ b/include/uapi/drm/msm_drm.h @@ -74,6 +74,7 @@ struct drm_msm_timespec { #define MSM_PARAM_TIMESTAMP 0x05 #define MSM_PARAM_GMEM_BASE 0x06 #define MSM_PARAM_NR_RINGS 0x07 +#define MSM_PARAM_PP_PGTABLE 0x08 /* => 1 for per-process pagetables, else 0 */ struct drm_msm_param { __u32 pipe; /* in, MSM_PIPE_x */