From patchwork Fri Dec 9 11:21:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 9467947 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 E95FF60586 for ; Fri, 9 Dec 2016 11:21:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC3EC285DC for ; Fri, 9 Dec 2016 11:21:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D161B285F7; Fri, 9 Dec 2016 11:21:55 +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 A1D92285DC for ; Fri, 9 Dec 2016 11:21:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AF1A06E979; Fri, 9 Dec 2016 11:21:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 106196E979 for ; Fri, 9 Dec 2016 11:21:49 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id a20so3382123wme.2 for ; Fri, 09 Dec 2016 03:21:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9gzLYBKWO1zAUIh5fC9x84KfvQmlthz+Z6Jq5aJD5RU=; b=p8/MDoWRlDuTTLqgfp5os959zM9oeFVHe+itF+eIVW2IjEea7efjq/qDy6/ux/4UPu RgGCiF+/scDLYoT0VpM/cmwB95SYwjLRXnOEO+68yf56xDrLU5KnNXCsZ5qeUjwJ+YZz pwgiuptxAovpWwVX0osrNd1vigjS6rkgNv9Egx54O9RaePAXEBDndG/a0tuLKIwsQM0t LInLKXWtYC5EcVrRReQsGlzAS2wM7uu1g2wHZc+iRk5Z3f+2jmUUlL9nKGMFVMCRIuGR 7l/ghxxHJn7dJu/Lha2b84VyJG7lC8qqPuZV9SODgkqBEigE8xroJ22wlj45wYrRpxfX EOAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9gzLYBKWO1zAUIh5fC9x84KfvQmlthz+Z6Jq5aJD5RU=; b=HStDv8Oq8HSdAKf9IrnKBZ2pz1jn8mQrtas1W2Fd8UoONGv7/ueZ2sAiwp/CQ1i7+h cODkM1yTF6dL+WSLWRlonotBeYwrcTsXRgKdAnhf/W5QtOmkZZKql16Za092d6EOct2b A4GMbKOosH1+su926RGfnaOlPi0Z1LPCAczQ/yUPKc4KwVpyIFDpGwMBwx9fuCv7xn6u i4042glsrtCeKckYmIAoTFM/m/tYRxGOvCSFQj+YbLsVVyPQ+UJNhyqbMrXCKS4bRDFo mUViyqRBjYtU512+EV0l2YoxE4vcwFHKAejnKjJzRBQJ3jtO768tjJA6pTXv6V9syX4q LyNw== X-Gm-Message-State: AKaTC01LPsHjY5BF4Ida7ex6lPR4jK5I0QgBOMXST+9EjbI424NiEq//Eap3irv9cPsv6Q== X-Received: by 10.28.25.134 with SMTP id 128mr6151022wmz.37.1481282507367; Fri, 09 Dec 2016 03:21:47 -0800 (PST) Received: from linux.fritz.box.fritz.box (178-190-139-123.adsl.highway.telekom.at. [178.190.139.123]) by smtp.gmail.com with ESMTPSA id v2sm41824518wja.41.2016.12.09.03.21.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2016 03:21:46 -0800 (PST) From: Christian Gmeiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 02/10] drm/etnaviv: add internal representation of readback Date: Fri, 9 Dec 2016 12:21:23 +0100 Message-Id: <20161209112131.3924-3-christian.gmeiner@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20161209112131.3924-1-christian.gmeiner@gmail.com> References: <20161209112131.3924-1-christian.gmeiner@gmail.com> Cc: linux+etnaviv@armlinux.org.uk, 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_gpu.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h index 73c278d..6527ceb 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h @@ -87,6 +87,12 @@ struct etnaviv_chip_identity { u8 varyings_count; }; +struct etnaviv_readback { + u32 *bo_vma; + u32 offset; + u32 reg; +}; + struct etnaviv_event { bool used; struct fence *fence; @@ -168,6 +174,9 @@ struct etnaviv_cmdbuf { u32 exec_state; /* per GPU in-flight list */ struct list_head node; + /* readback's attached to this command buffer */ + unsigned int nr_readbacks; + struct etnaviv_readback *readbacks; /* BOs attached to this command buffer */ unsigned int nr_bos; struct etnaviv_vram_mapping *bo_map[0];