From patchwork Fri Jun 9 10:21:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 9777915 Return-Path: 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 E86E16034B for ; Fri, 9 Jun 2017 10:21:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8C7E285DD for ; Fri, 9 Jun 2017 10:21:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDEF1285E7; Fri, 9 Jun 2017 10:21:48 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 8F252285DD for ; Fri, 9 Jun 2017 10:21:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D1976E5B1; Fri, 9 Jun 2017 10:21:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id A08756E5AC; Fri, 9 Jun 2017 10:21:43 +0000 (UTC) Received: by mail-wr0-x244.google.com with SMTP id v104so5922551wrb.0; Fri, 09 Jun 2017 03:21:43 -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; bh=lyMgnnugXkDux9WLLEqiuGpa0oLUpjSZmZvJAOEVwIs=; b=AcS7bwp77MQGpdjjaVTgi5GxK5R2NTWw2WtjRlFnp5eLSvK9aNH563oJvipAPKPIb1 2X8gzN5HBXlnMkw4En18WwvRdPg1DdHPqnk4wDQw83zVdl8knIyVe0H5EQMKtZs07LxJ UNNQvb6huapmSxDhuPZUwJRym6zv2e3pncncipM0de+zfuvAxpq8qxuRJOvS9+8UCsvq VSzzFyNNxJtjn/B2qp6Ib2a+9tlNaKV7+8JR9hMEIXgXeZBMxFf1Zq2llrO+V5TdJUxb QJ5I3eVkOefvD27ODI6kO1tDRc0+Ok61I8WoM8mkndzGJ/L8mi7ovejuUb89AX5CsoIO 2ZHg== 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; bh=lyMgnnugXkDux9WLLEqiuGpa0oLUpjSZmZvJAOEVwIs=; b=lanShmqECvMOdknXgnnUYsIeZbDPCz/WUSTfpTKU9eSdxgvPV2bzZ9i0ad+jqUy41C bGNCBKgGmYcoZbshacG64T2A4KRaK5eDl2pZJjnYSr14URbCB6yuIWTRcJ3IAhDWCjcO SxX9X8RSeOi0UHe9mBYHpGd0nv3aNnfL0I2ILUMjmgKoP5q3v7vd2LyrtL11Yi9YKxoR MksATuhXPwDJavruoNyyICph3NABsIWGPaogzRUETJqJzsXWKdQcCKKNzVOAyOlQ1naT 6nXFVIS+BLAfBpHxMbyjmvKx6ydAaXjFNdAc8gIjQDpIS316OoXnnsU78ZwWXDPWay1l vvZg== X-Gm-Message-State: AODbwcCxfGk4wM5oNWcpojH+jMDPtm43NBeLynqMVhrFCMdUKMmYp49y NxeVO3BxiZY/TnAn5us= X-Received: by 10.223.133.35 with SMTP id 32mr16597257wrh.9.1497003702000; Fri, 09 Jun 2017 03:21:42 -0700 (PDT) Received: from localhost.localdomain (213-147-162-44.nat.highway.bob.at. [213.147.162.44]) by smtp.gmail.com with ESMTPSA id w52sm806952wrc.33.2017.06.09.03.21.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Jun 2017 03:21:41 -0700 (PDT) From: Christian Gmeiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 03/21] drm/etnaviv: add internal representation of a perfmon request Date: Fri, 9 Jun 2017 12:21:17 +0200 Message-Id: <20170609102123.2417-4-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170609102123.2417-1-christian.gmeiner@gmail.com> References: <20170609102123.2417-1-christian.gmeiner@gmail.com> Cc: linux+etnaviv@armlinux.org.uk, etnaviv@lists.freedesktop.org, cphealy@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h | 4 ++++ drivers/gpu/drm/etnaviv/etnaviv_perfmon.h | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h b/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h index 80d7807..1b549f0 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_cmdbuf.h @@ -21,6 +21,7 @@ struct etnaviv_gpu; struct etnaviv_cmdbuf_suballoc; +struct etnaviv_perfmon_request; struct etnaviv_cmdbuf { /* suballocator this cmdbuf is allocated from */ @@ -38,6 +39,9 @@ struct etnaviv_cmdbuf { u32 exec_state; /* per GPU in-flight list */ struct list_head node; + /* perfmon requests */ + unsigned int nr_pmrs; + struct etnaviv_perfmon_request *pmrs; /* BOs attached to this command buffer */ unsigned int nr_bos; struct etnaviv_vram_mapping *bo_map[0]; diff --git a/drivers/gpu/drm/etnaviv/etnaviv_perfmon.h b/drivers/gpu/drm/etnaviv/etnaviv_perfmon.h index 4589cad..4b2b518 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_perfmon.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_perfmon.h @@ -22,6 +22,18 @@ struct etnaviv_gpu; struct drm_etnaviv_pm_domain; struct drm_etnaviv_pm_signal; +struct etnaviv_perfmon_request +{ + u32 flags; + u8 domain; + u8 signal; + u32 sequence; + + /* bo to store a value */ + u32 *bo_vma; + u32 offset; +}; + int etnaviv_pm_query_dom(struct etnaviv_gpu *gpu, struct drm_etnaviv_pm_domain *domain);