Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4243597yba; Tue, 9 Apr 2019 14:27:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3B7JRNnf5HZ+HzjIqwOlh9ZWS1d7qRRQ5YYRSWbCNrfYnDwX32qc7LVawa8DeIQA1SpWj X-Received: by 2002:a17:902:8609:: with SMTP id f9mr39816655plo.32.1554845229869; Tue, 09 Apr 2019 14:27:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554845229; cv=none; d=google.com; s=arc-20160816; b=xC7IwzM7EezQfTTWwpJNgVKUM0M8Qw6sQsCqJ/xqjbALXgVFvChwloC4R1ahQLAeJg 8hukler84CtmfVW0Q4zGVZaqUgBdCzYZv1Yr104wgWY1JAMuwc+/2771BMy57nHx+StC hZbA98rZTvDLEQlzb7OyxjTr+LcXNyGKSHns5WIQGQ7l+YRBAcGkxxo8s4IfaR+gcA4F 5Z2Y827mtnAJsyMWPxRBIYf5TEdcgqiZg/4KDc+hyVjnjloRofLwMq80PuiamgsH6Iaf K+LVt6lIJzViAa9jkQjLFJY+5khF9VZ2E7SFTQxzEz/+9JXQX1GWTcG4blBJrK8BMvT0 oXXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from; bh=l57DcGyfb67db3FiIHnpVpFxXyCRgu1GO+Wv3t37HF0=; b=cG7tfPz4hLc74kvTHoQjfMGks4DSiViuUu4dzVHktO/1VomrTwNyNGeIA4mzojL7jQ x6KqG5z4X8Z91TqEwiUHIALG4jf9DbOThn6q3idO8Zpp2xPBGN1n1RdsZHYRRJb3bdRV /Kslr/EN2pjmxFAtXEiECWI3slwTTEATvzHbBvTVVKiQOfmSSCjXUQ7HxZHyVq6TlqUn vGOSxptO2LwBUqQZYuXxX/EQx12Yofu4wyjalD5wsi3PdyklO+I9BRnI8bGkvS+VmKsX JYA9NdH0AkmU9TQOhkQ5CT5dEFgjtWahaNKYpqkRpZ/iyGpDA8nhIXNp0VBieRTReKS+ F8Pg== ARC-Authentication-Results: i=1; mx.google.com; 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 r184si28940009pgr.24.2019.04.09.14.26.53; Tue, 09 Apr 2019 14:27:09 -0700 (PDT) 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; 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 S1726850AbfDIV0E (ORCPT + 99 others); Tue, 9 Apr 2019 17:26:04 -0400 Received: from anholt.net ([50.246.234.109]:39430 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbfDIVZ4 (ORCPT ); Tue, 9 Apr 2019 17:25:56 -0400 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id B21C210A32F0; Tue, 9 Apr 2019 14:25:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uF7mVp9bDYhL; Tue, 9 Apr 2019 14:25:54 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 3479E10A053F; Tue, 9 Apr 2019 14:25:54 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id 9AE172FE36FA; Tue, 9 Apr 2019 14:25:53 -0700 (PDT) From: Eric Anholt To: Rob Herring , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Daniel Vetter , Lyude Paul , "Marty E . Plummer" , Tomeu Vizoso , Neil Armstrong , Alyssa Rosenzweig Subject: Re: [PATCH v3 3/3] drm/panfrost: Add initial panfrost driver In-Reply-To: <20190409205427.6943-4-robh@kernel.org> References: <20190409205427.6943-1-robh@kernel.org> <20190409205427.6943-4-robh@kernel.org> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu) Date: Tue, 09 Apr 2019 14:25:53 -0700 Message-ID: <87v9zmdg66.fsf@anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Rob Herring writes: > This adds the initial driver for panfrost which supports Arm Mali > Midgard and Bifrost family of GPUs. Currently, only the T860 and > T760 Midgard GPUs have been tested. > +static int panfrost_ioctl_get_bo_offset(struct drm_device *dev, void *data, > + struct drm_file *file_priv) > +{ > + struct drm_panfrost_get_bo_offset *args = data; > + struct drm_gem_object *gem_obj; > + struct panfrost_gem_object *bo; > + Missing check for pad == 0. With that fixed, Reviewed-by: Eric Anholt > + gem_obj = drm_gem_object_lookup(file_priv, args->handle); > + if (!gem_obj) { > + DRM_DEBUG("Failed to look up GEM BO %d\n", args->handle); > + return -ENOENT; > + } > + bo = to_panfrost_bo(gem_obj); > + > + args->offset = bo->node.start << PAGE_SHIFT; > + > + drm_gem_object_put_unlocked(gem_obj); > + return 0; > +} > +static void panfrost_job_timedout(struct drm_sched_job *sched_job) > +{ > + struct panfrost_job *job = to_panfrost_job(sched_job); > + struct panfrost_device *pfdev = job->pfdev; > + int js = panfrost_job_get_slot(job); > + int i; > + > + /* > + * If the GPU managed to complete this jobs fence, the timeout is > + * spurious. Bail out. > + */ > + if (dma_fence_is_signaled(job->done_fence)) > + return; Note: The scheduler calls cancel_delayed_work_sync() in s_job->finish_work, so this is just reducing the race for the job successfully completing near the timeout but finish_work being in the workqueue across the timeout boundary. I dropped it from v3d. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlytDeEACgkQtdYpNtH8 nuh3JRAAtq3pl35Q1d7+I6lbFCjyLdVHXmNShOpudBRqlPvTkKycYdhWyeUHIyRj GVDmnaFUdQURCYWr64mqcsqu6U/N/pIAyttRVqxb4qp67Z403BZOC+BlJ1EAJgNv vzJHUZfSZtyRrF4pez1uyY44pKbAY9ERxvYORhN4QnHfnG9h973fsHaeAD0Yjcv7 nm8yGthWiH3Tn7rqIwRmMVWJf0nhs24QLpjHZSTe7Tsbpb6jcN/nnzkPEgd5XxAm aP75lVGfMnzISrvC1fJV4hwalMlJaXQFEP2cknDdB7mLcwh7ImrDwxCaMQwh/eB3 dpMBpbr73CM5lvgbacG30PLrr3SNlVkS5XerqqmSxWbFnvQnBbeWiLUaCPzRHerw SMAMZq2ML2nfn2eGpipQ7EIRmhZHM6lTJsViEPHIiGrdKUUeR4L+guKMlqGjaJ0F n3Vsw+neyW62lIbD82L5vblZB0KMB50In7Mje0wrF9qncCT6qnYNvGa7NPeJcOJ9 fhLsa2rbX9EoeGK4tLHQrdzcfNVz/FzmNhhGom1ifw+fa4llhdLAxUstn2mpP6sl PSCwgdmahlQAa1PciacTQHrVWw2lQDnPzcvn9+MApG2mbIqPZF9khCrbbRgmIXI5 8dnMFLTWue7UBLXMEVerxahEVe5Srnj3I34lk5eSa9M0ohcccvA= =7SIf -----END PGP SIGNATURE----- --=-=-=--