Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4086716ybl; Mon, 13 Jan 2020 07:38:03 -0800 (PST) X-Google-Smtp-Source: APXvYqxcolMt0HTXAYLkg4ab1f9b0cBPQ5V5DPC6JpOi/8ltlLJFjqWE/51CV9UwxVyu+keLhW7D X-Received: by 2002:aca:c0c5:: with SMTP id q188mr12327210oif.169.1578929883575; Mon, 13 Jan 2020 07:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578929883; cv=none; d=google.com; s=arc-20160816; b=M2Piln5BEnCxLNSoBJD1hbEwmHUNYAQlp7tOS0r2DQ96GgbNC6D1XJKFW13P5O9BC+ lXofOZaRAXOJqywRgpleR3rlHEPajoE/Ki7BzJ8dqeDTBiTLwQduL9zgTyKF5hX23+6g UNmffyWhoOQwaXq+efWnK/LVy9dWDAq2XxLQKx4f9JnyUbHagCKOnn/v9oa0BXhs6f83 lHfeAatTjGt6RulYEav5vVG4+bQ0sQ0AUb7GhBBjU51j8mQYRVxqUE/agExwdyr6dSSM ojeFnQ08YjBMmT1gSeUY8MEDH1PhiarwPc768w1vIcbpL95rIO7BcTtP3zPEosUAC7VQ bgTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XJFdDikfbN+KalEJTdnTdl6gsZ3fW2Tc7ZjkvYTvyD0=; b=vTPHXz7Ne9cqD2Gj1NbcapBLkbjdHusopg0EeYdA26Uf0JyoJzzooc3x6eoIeqkQQw +K/USrL8R9qa68Ze/rpWxgnANoB4PgJr3YD2X7SeYJrWiBm+SabP0Ozhp7t/Vt66gAYX NxQOTU1sCsbcdQ7ZcYeOrglQj4Zrw71CnHrNrBbvXRb8aQIZnZjBIPJ4THzk3TvQmoPj WbGh1Q3aYItFk0CSvd7oxtBE7YzQQh8y3LczzOcEfenfkMwpF9RjD65urlMbgbWMbaCz 8fw1UnRDacQZzhB5TbVGM+y4RPiwmHGHgQGypbXU6mZ9sLB1JmfYLt64N2OtYG0tdrXW XkbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brkho-com.20150623.gappssmtp.com header.s=20150623 header.b=Ra1HwBng; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g14si6860542otl.258.2020.01.13.07.37.51; Mon, 13 Jan 2020 07:38:03 -0800 (PST) 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=@brkho-com.20150623.gappssmtp.com header.s=20150623 header.b=Ra1HwBng; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728738AbgAMPgu (ORCPT + 99 others); Mon, 13 Jan 2020 10:36:50 -0500 Received: from mail-yw1-f99.google.com ([209.85.161.99]:40397 "EHLO mail-yw1-f99.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728688AbgAMPgt (ORCPT ); Mon, 13 Jan 2020 10:36:49 -0500 Received: by mail-yw1-f99.google.com with SMTP id i126so6325661ywe.7 for ; Mon, 13 Jan 2020 07:36:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brkho-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XJFdDikfbN+KalEJTdnTdl6gsZ3fW2Tc7ZjkvYTvyD0=; b=Ra1HwBngnQsFsdibS3erX1ro72SPNFOPBuna6fAXIQWG17KVuwQqD9gMrdmCX7ki+B EfZnaFMA5gKVT3d2qJucInxK1XRuJFIQjhpLG292NZcU6B2kEOsnvEAtLvx58jiTXMJk R3JhbyxnKu264DFtvTI48xgHQS4fvpOzUpteR3OrVr78AnbU2zIkVDSvrN5ZD8cvjeee JFM3IRmFzWideOV8V9KEow0sfm4l9HLJVDVYnrOiZTg2y3gnmUrcDev8aU5KY5uD5KlR ZI8urhn7LhvdDYHsVAv38s1cdzYy0VpHd73CuBsHJdDdJIh3/5QdZn3CfaseC0z8UOlv K8pw== 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:mime-version :content-transfer-encoding; bh=XJFdDikfbN+KalEJTdnTdl6gsZ3fW2Tc7ZjkvYTvyD0=; b=EgvnxI5ZfMtG2P+jzdEfJWULz2fBui3Gb5JJP2ZAFCr/EpEOam40Aj70/sOUu0TdIE EDjJu/Kgen0O/M/CyfKWnhhutNvZ84c5esRn3Yjf8GfpqCEA/O7FOoPo1/sygACrQH7K 7Nobtx+p/PLiuO42D3x6O938kmk4R8H7Dhety+exhsSmADsVFKnHE8Fd9I6pL4gaQIE7 HwbCbs7v4nPv2I2EyyvT0P4jKFxHbZ8HUelIG+Pu8F5DYhejISEdOzbyhqh9kS6hnFqI 5iKEtrMRb6aoO63DQeQEo8fo3rGslNW7qulq225E2g2x1xwvD/Jc+bvc2TR8Zd67jaJW 679Q== X-Gm-Message-State: APjAAAXtkfial8m6FzD2M5Dd/NH+FDSNILFvWDqZai7G/nRDrg/sIExU 2NJ+cMjdV4B7+Xw1Aa7LBYvagIoDctObeB1hxKVQ4kV/wBN/HQ== X-Received: by 2002:a25:2c9:: with SMTP id 192mr12441529ybc.48.1578929808492; Mon, 13 Jan 2020 07:36:48 -0800 (PST) Received: from hob1.nyc.corp.google.com ([100.118.32.120]) by smtp-relay.gmail.com with ESMTPS id m193sm1672393ywd.0.2020.01.13.07.36.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2020 07:36:48 -0800 (PST) X-Relaying-Domain: brkho.com From: Brian Ho To: freedreno@lists.freedesktop.org Cc: hoegsberg@chromium.org, robdclark@chromium.org, Brian Ho , dri-devel@lists.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO GPU), linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM ADRENO GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 0/2] drm/msm: Add the MSM_WAIT_IOVA ioctl Date: Mon, 13 Jan 2020 10:36:03 -0500 Message-Id: <20200113153605.52350-1-brian@brkho.com> X-Mailer: git-send-email 2.25.0.rc1.283.g88dfdc4193-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set implements the MSM_WAIT_IOVA ioctl which lets userspace sleep until the value at a given iova reaches a certain condition. This is needed in turnip to implement the VK_QUERY_RESULT_WAIT_BIT flag for vkGetQueryPoolResults. First, we add a GPU-wide wait queue that is signaled on all IRQs. We can then wait on this wait queue inside MSM_WAIT_IOVA until the condition is met. The corresponding merge request in mesa can be found at: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3279 Brian Ho (2): drm/msm: Add a GPU-wide wait queue drm/msm: Add MSM_WAIT_IOVA ioctl drivers/gpu/drm/msm/msm_drv.c | 63 +++++++++++++++++++++++++++++++++-- drivers/gpu/drm/msm/msm_gpu.c | 4 +++ drivers/gpu/drm/msm/msm_gpu.h | 3 ++ include/uapi/drm/msm_drm.h | 13 ++++++++ 4 files changed, 81 insertions(+), 2 deletions(-) -- 2.25.0.rc1.283.g88dfdc4193-goog