From patchwork Fri Dec 9 11:21:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Gmeiner X-Patchwork-Id: 9467963 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 2CD1060586 for ; Fri, 9 Dec 2016 11:22:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20431285C8 for ; Fri, 9 Dec 2016 11:22:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14AB9285F7; Fri, 9 Dec 2016 11:22:31 +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 69FA2285C8 for ; Fri, 9 Dec 2016 11:22:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 525756E97C; Fri, 9 Dec 2016 11:22:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wj0-x241.google.com (mail-wj0-x241.google.com [IPv6:2a00:1450:400c:c01::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id F38BE6E97E for ; Fri, 9 Dec 2016 11:21:53 +0000 (UTC) Received: by mail-wj0-x241.google.com with SMTP id kp2so1989677wjc.0 for ; Fri, 09 Dec 2016 03:21:53 -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=66qMx8C/Fef06LVBeoEqrtjrg2KG+DNNG7kuxb5lv7c=; b=l9+Z0fTBPMj81623skJLoK8gDfc/EOuopG+Fk2ynAmGlnWeTT+275bTLf8BJqnv52A 01l8+C7NnWvVvQOKmZkX3RgLbmekbyLXnMXv1wYayFdRWj/n3Vb+mWghxFxWoUj255ZF 6/Hwux8QzLe95gmqy5MukZMfNcmQ2/co2zXt7S0c6bNJvqAuxhKRyOEMJhRZUZzD7aZj iJDlwoLY9/3x3n66GDRJ2pxr58Z7GG/ZsKhsv6vA2x4fU+sjyZB4cWOiWDvcdyfk2Zo7 /7/cYyYHcvFWxclxNRPnBtnbyTdFhXV0rqDgrpbCi7VDwH+xCAkAQCJ1p5tLm75VW5Ay 9Tnw== 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=66qMx8C/Fef06LVBeoEqrtjrg2KG+DNNG7kuxb5lv7c=; b=NPN/NAS9asqkn1YI6LhoK0gfxmClVTCuDhCSJ/sC/edxqVcC4U9DPIMfipDA6bhYA+ JsRHdCK/zrkduMz4QSesfxfk+eddLZY1Add5DWJGR7eafQGvSGObabQoKeH4KSEX3CNs zXC/fa2Fzm5zAh2PWRNl2506DR76fDbMcNFoS/dKxNED5Q36MrXI84XsearLlZXO8jqe MUQBm1VUarxJTEoUk6Cz8JBFI4p+wdKdBOy3s63mpSOnnOwaQ8tklDGGBNZpRTjIqH5Y YD2Kku978e+2RLTbeTxKyuEN7k8uZ7npCDayU07JteJWRL7oBUn72TmlLMmoe4DlxPzZ hs4A== X-Gm-Message-State: AKaTC038LNwkxvlbW9XxPdJYrthQIJFkB7AhxMZtua28LCulCCve7cJN1i7uOwztgdcGjQ== X-Received: by 10.194.15.37 with SMTP id u5mr66932548wjc.117.1481282512262; Fri, 09 Dec 2016 03:21:52 -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.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2016 03:21:51 -0800 (PST) From: Christian Gmeiner To: dri-devel@lists.freedesktop.org Subject: [PATCH 06/10] drm/etnaviv: store readback data in struct etnaviv_event Date: Fri, 9 Dec 2016 12:21:27 +0100 Message-Id: <20161209112131.3924-7-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 In the interrupt handler struct etnaviv_event is the only information source to process readbacks. Signed-off-by: Christian Gmeiner --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 3 +++ drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index 2668723..1fb5e37 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1321,7 +1321,10 @@ int etnaviv_gpu_submit(struct etnaviv_gpu *gpu, mutex_lock(&gpu->lock); + gpu->event[event].nr_readbacks = cmdbuf->nr_readbacks; + gpu->event[event].readbacks = cmdbuf->readbacks; gpu->event[event].fence = fence; + submit->fence = fence->seqno; gpu->active_fence = submit->fence; diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h index 61b36af..21a4314 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h @@ -95,6 +95,8 @@ struct etnaviv_readback { struct etnaviv_event { bool used; + unsigned int nr_readbacks; + struct etnaviv_readback *readbacks; struct fence *fence; };