Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2260185pxy; Tue, 3 Aug 2021 01:38:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwX7/qHr6auHzL1jPsLAPDvInJ6H3ARmHnxrvh53KqSqNnjWVO+AcEiUy3/LaKn/1BNzdec X-Received: by 2002:a05:6402:b82:: with SMTP id cf2mr5102482edb.71.1627979885259; Tue, 03 Aug 2021 01:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627979885; cv=none; d=google.com; s=arc-20160816; b=n2XVoSu/OYxB/GMmcWVeRFFQHZfe4C6jCmkgX9rzXbTpi6ALojh/37JTSBXjDUHw60 E1pD1VIA0okaxU7wolnkLzX4+tgzg7WytM3wNIJMcYuvuX6SerDauoEUcMsgk2TeHEED NBkdO/EpizuWcH2l5p73r1gA7B8pmmxK6nvXi2d/vJPPC5W4OmRauHTmVrJ5WbLIWQ7E j+7kBiKZk1Aq5mozmg+ioBpxbqVApRVU5Z3Eea+U4wDm5Ev6nHsTnLVb6tLVGyntmtZp MH27dpjovFLSZ8f+MFq147ftDKbUBB0HXVSySsIQZhpiRpXPv2DzdTgFxTTS+2w66c02 BGpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to; bh=3bLF5Mrm5l8WRLx9mQWrRPKQAK5n8tY5eRUYsAI3jI4=; b=nlwLy7UnL58WcWERQPPZAcIAVNLRcItSqho2SrWURFgnaXOw2mn8whhv9xHe3vnyz0 eF8PpYv+LfsmbD0iHIoeGaYo9bLGZKSxJkDNvqKE7yVV9pYb4Y4ZaYQDlSgpxf8E52/B 7zogrlqnKMR/38wEf6rZiWeiUfYrndzDWw4Chv14XC7CCb9oAA7f+hnS6KYNUKQDwIRY 3BXA3D4T05zPXbhvJWaaEU1WjrkdOqsTv0y5r1rjoikCU2HIoCJZ7jVYS1p9sEoZB9aD WGtjk4znFN/5MMKsHsUlPXB8nbYpxXe5IL4V0bjMQJMcSEWcPLm7mtG6tR/w5hJSYrZL vCQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l10si12670435edb.184.2021.08.03.01.37.41; Tue, 03 Aug 2021 01:38:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234573AbhHCIeU (ORCPT + 99 others); Tue, 3 Aug 2021 04:34:20 -0400 Received: from mail.netline.ch ([148.251.143.180]:52407 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234551AbhHCIeU (ORCPT ); Tue, 3 Aug 2021 04:34:20 -0400 Received: from localhost (localhost [127.0.0.1]) by netline-mail3.netline.ch (Postfix) with ESMTP id 15EA520201B; Tue, 3 Aug 2021 10:34:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at netline-mail3.netline.ch Received: from netline-mail3.netline.ch ([127.0.0.1]) by localhost (netline-mail3.netline.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fhzOsvkjXHwR; Tue, 3 Aug 2021 10:34:07 +0200 (CEST) Received: from thor (24.99.2.85.dynamic.wline.res.cust.swisscom.ch [85.2.99.24]) by netline-mail3.netline.ch (Postfix) with ESMTPA id 3757320201A; Tue, 3 Aug 2021 10:34:07 +0200 (CEST) Received: from localhost ([::1]) by thor with esmtp (Exim 4.94.2) (envelope-from ) id 1mApsE-000bJw-Dr; Tue, 03 Aug 2021 10:34:06 +0200 To: Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , Zhenneng Li , Alex Deucher , "Pan, Xinhui" , David Airlie , amd-gfx list , Maling list - DRI developers , LKML Cc: Daniel Vetter References: <20210802074310.1526526-1-lizhenneng@kylinos.cn> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Subject: Re: [PATCH] drm/radeon: Update pitch for page flip Message-ID: <6a34fcc3-0aa3-85ff-21c4-86b9b5a48fd5@daenzer.net> Date: Tue, 3 Aug 2021 10:34:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-08-02 4:51 p.m., Alex Deucher wrote: > On Mon, Aug 2, 2021 at 4:31 AM Daniel Vetter wrote: >> >> On Mon, Aug 02, 2021 at 10:12:47AM +0200, Christian König wrote: >>> Am 02.08.21 um 09:43 schrieb Zhenneng Li: >>>> When primary bo is updated, crtc's pitch may >>>> have not been updated, this will lead to show >>>> disorder content when user changes display mode, >>>> we update crtc's pitch in page flip to avoid >>>> this bug. >>>> This refers to amdgpu's pageflip. >>> >>> Alex is the expert to ask about that code, but I'm not sure if that is >>> really correct for the old hardware. >>> >>> As far as I know the crtc's pitch should not change during a page flip, but >>> only during a full mode set. >>> >>> So could you elaborate a bit more how you trigger this? >> >> legacy page_flip ioctl only verifies that the fb->format stays the same. >> It doesn't check anything else (afair never has), this is all up to >> drivers to verify. >> >> Personally I'd say add a check to reject this, since testing this and >> making sure it really works everywhere is probably a bit much on this old >> hw. > > If just the pitch changed, that probably wouldn't be much of a > problem, but if the pitch is changing, that probably implies other > stuff has changed as well and we'll just be chasing changes. I agree > it would be best to just reject anything other than updating the > scanout address. FWIW, that means page flipping cannot be used in some cases which work fine by changing the pitch, which can result in tearing: https://gitlab.freedesktop.org/xorg/xserver/-/issues/839 (which says the i915 driver handles this as well). -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and X developer