Received: by 10.213.65.68 with SMTP id h4csp3046121imn; Mon, 9 Apr 2018 13:21:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+YqUg73NUjvTNcjIhyH0dQj77Y79CHCBuPaLCGfo+OL8EN0Cqv7L1NVIIcSbmEJ8yGzQkm X-Received: by 10.101.78.142 with SMTP id b14mr21636962pgs.406.1523305307216; Mon, 09 Apr 2018 13:21:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523305307; cv=none; d=google.com; s=arc-20160816; b=MSS0tClqNR++FXsJSi4VKlf9WLg2dMsWlxFsK3YJQW7uuBaHw0taYJHFYtNZNOB6Tl CYvyycbFrjDuf9FOgiI+QtGa7hGHvwZ2pD5Gvzfq2w839+hF3ivn2uJBCu4Ah5kdVCPh ld1NdDXa3GAYdeqXcSCebfUQK/VkPdP+lNjCqjurBuzSuEXNQ65WFcw40PMZx/223SDr Uj4l6qBrJsDi5UOOVS7Tz53XoWkrD+oKvjmirtqjpBXliyLR+uMgrXHcw+827ijkq2J1 Sk9MujR82Reh8OxN1swBdLKsAGrO1BVhgjq0yhwQuZgPb0FwS8Y37vO22G454g5GGvet dPEQ== 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 :arc-authentication-results; bh=tnrQYd/nUfk3BqyEoGeCpNDdhRWSSyNeT/TGh1BY33o=; b=UdoXMr4l2H6Z/x+/YXG89GRfNToPqizQ2YdSV4hh/JvLexevsR6yCCjzLfCwqE8Bg5 rT5lVkbKc7zxZVnFwuhtlgmZbtaSpz68czn0G7jC+HtBymn9W7/vOQU5D79C6maRtt/P 1jBJq0134JcGB3bOdsbtKogjBFXBNE+cgIZYmwofsGHX/d97mfv7A3F9a4Kz/l7CwjJA x+yzbH5+cGNFZaxb3yTq4a8W6HEj3loZG84dpXYt6w5APT0cJ1VnDHvUzVFIb+NCeV+e PrrjoGU9580XYrY3He8cMt6IYXMo1k35kfSO+F8BHxFUbzwI8r8knd/KIOGHnBDkaAKO 2zAw== 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 1si790190pfq.172.2018.04.09.13.21.09; Mon, 09 Apr 2018 13:21:47 -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 S1754691AbeDIURv (ORCPT + 99 others); Mon, 9 Apr 2018 16:17:51 -0400 Received: from anholt.net ([50.246.234.109]:53698 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369AbeDIURu (ORCPT ); Mon, 9 Apr 2018 16:17:50 -0400 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id E091010A1521; Mon, 9 Apr 2018 13:17:49 -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 n_ibI-P0z2hD; Mon, 9 Apr 2018 13:17:48 -0700 (PDT) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id AB23210A03D5; Mon, 9 Apr 2018 13:17:48 -0700 (PDT) Received: by eliezer.anholt.net (Postfix, from userid 1000) id 319EF2FE2D4F; Mon, 9 Apr 2018 13:17:48 -0700 (PDT) From: Eric Anholt To: Daniel J Blueman , dri-devel@lists.freedesktop.org Cc: Dave Airlie , Linux Kernel , boris.brezillon@bootlin.com Subject: Re: drm/vc4: false-positive negative cursor position warning In-Reply-To: References: User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/25.2.2 (x86_64-pc-linux-gnu) Date: Mon, 09 Apr 2018 13:17:47 -0700 Message-ID: <87efjow2vo.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 Daniel J Blueman writes: > Hi Eric et al, > > In a number of windowing environments (eg GNOME 3) on Raspberry Pi 3B > on 4.16.0 arm64, the mouse cursor top-left gets down to x,y -4,-4, > tripping WARN_ON_ONCE(plane->state->crtc_x < 0 || plane->state->crtc_y > < 0) [1], which therefore seems false-positive. > > Git history doesn't turn up any reason, eg it could cause undefined > hardware behaviour, which it doesn't appear to, so would it be better > to drop the warning, or adjust it to trip on x or y < -4 or so? If so, > I'll prepare a patch to adjust it. Ccing Boris, who's been doing work on the async update path. Take a look at vc4_plane_setup_clipping_and_scaling(state) -- that has the corrections necessary for negative x/y. We're calling that too late (through the avc4_plane_atomic_check() path) for this function's usage of the offsets[]. Since it affects the computed src_w/h, we'd have to update those as well in our async update. Our async update is racy in a way that makes me uncomfortable -- the HVS could process our display list at any point in our writel() sequence, which is not very atomic. Maybe we should be using a double-buffered HVS display list per element, and then have the main display list jump into each element's current display list and back out, so that we can do async flips to new plane state by just commiting a single writel() to the new HVS display element list. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlrLymsACgkQtdYpNtH8 nuj5fg//XBsczp78xkJVye15Ntq5VUgYlDQnk3p1gVgxWK6V3RnTO36VPZONwp4d khLQNqavaZq2dakrEdDeFevp+FxwqpNEcahv9iuQrUaouE1BMO9fyvs6yztnw3i6 efuSDRSGMWYhOPiH68vl2rrGWwjRuxGR0IXBtnhBEgqQr6lXYpxODaETrefhKZyS AUDfIIMrmzv/Q8H6FEuACFcmeVXmwPCnS0CfnJEaXTy4c6izh4PxqbN9aeZFm+ih 63bUQ8DXTPkSAVkEB2n4o2olW++SlEzDcj/xk1UJIPCJfEK8VKravUE5dVrP9GA7 UG5klqKCLcWc0oNh4O5V0UHPQLC+wQpgTufbhsfKbikhr19FP2xCpWCN8DINYYdN TFoTbFraNN2nxYe6fVpYDTlCqPPwsefAbCD9oC5QT2XDzyjYYBTxQrHOnh7FojBd XoPkX7g0SY0nn/+poQJA+hfWWgQqzytcSli6hqTo466C6JtQryJlkQVgN5rmnZFG c7llKvfmyK81m4iTbbDD2VLurIlPSTwKNZRAvG1FUa5T6B5cVj+3gY4C7O/BiSMU OCnRfuLMcHb/5AYr5F+QqiPXFaPwobnKJ1hfpmNFX8PNcMJNa+UOF67W4pHaK6yl vm1VHAKA0uXZFntGftYCcOoTIxXafhgGHBTem3VeGCjJXNZtHrw= =YPEv -----END PGP SIGNATURE----- --=-=-=--