Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp2496885pxy; Tue, 3 Aug 2021 07:51:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOPyWQj5gzAL4uBf2TtN6vhfDHmlNFg13dR19pT9azVeND5oKuELZHMyUzh/OmnKnxhH5+ X-Received: by 2002:a92:b108:: with SMTP id t8mr244077ilh.6.1628002272840; Tue, 03 Aug 2021 07:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628002272; cv=none; d=google.com; s=arc-20160816; b=o1SIEtggwr61MXeysPxw6c9YQhALH5V9+GQXSRh3y1/E6C1z65yHMkuc1bRR7Hr/XL fjJgu4LDHi8dg1jWgOxkj/LIVNsJ320DA6vA/AIGJuCBt3I2OvxtnycakpPqJc0Oo5mw VWHjqOzFM5HITw+CNJLrFo2G4OL8JQyrYhnU8UB+pfqNi79GigWxJZcxLAdLBkh7cHo+ DvFvUoZB0YaZVS9Z0HASrwqFBebZCWC6FbvaB565823IvwhguojuBKfR6WrcYDx2InzU GFbIuH9xa0nRKy8VUdzJ1VCVOmOiafHb19/opQMMOYFje4gW/+1G0tk1x71ylDSAq5wl t3AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=ZH2nIiiSnakY3FpS+wMVMs/uCUmksAAV/3YZm7bqsOY=; b=LBkl08oL6if4Z8HPHCastArraG9CC8gy2o3MT2DwFP7pdoqyGXQyWcTb+ybz5T99/o uOsa2BRm7TJ03kjEQJY22Sf5YqRD/lEHugwpaDRESklv904iTDB+ioFq2lixvHyg9IFb EmUagnjKLSzhm2mxBMjM5sFfF9xI+jsUDq1G/EL796+aV++7jQdBXQb2SQ8dqKoi+4B0 QU/sqNzjtO7vLHRPaw0JLxtcs18+DNHzar13QRGvxzQg5KgsoMiWEuPTpxKajjEtL6+N R5PCX+mdCSUT4/EytRw48L+KpWdCFifbz4eMgwl8Tbl8VCX0SgZmgQfd1IkTB7GhJmJL V3Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rZ4Q93WK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n8si15004986ili.154.2021.08.03.07.50.59; Tue, 03 Aug 2021 07:51:12 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rZ4Q93WK; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236555AbhHCOuK (ORCPT + 99 others); Tue, 3 Aug 2021 10:50:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232748AbhHCOuD (ORCPT ); Tue, 3 Aug 2021 10:50:03 -0400 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AC79C061757 for ; Tue, 3 Aug 2021 07:49:51 -0700 (PDT) Received: by mail-ot1-x32e.google.com with SMTP id f20-20020a9d6c140000b02904bb9756274cso8991797otq.6 for ; Tue, 03 Aug 2021 07:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ZH2nIiiSnakY3FpS+wMVMs/uCUmksAAV/3YZm7bqsOY=; b=rZ4Q93WKcb8SdHFSMM/rNBR0ZsBlSoZE4udCGLC6cH7H8DBdCCAw/EJBUSXS58Dv7D k2tal+SHQdxQndFpVNoZkND/WGGp3xIbhQU+Ba5sZMtoXJcJ8w+G3RMWLFLPI4RRiY+t loWNOOElrWBd13mQHhk4Q0NjJTFzxtoITIZ7GW/EjdFs6J9xEiNuK32EkCZvpvtwbokt kVFReNqCSwTnUJwUJrMcik5OxG00bvzGMcJOSfOBcRz8Rznii6oMTCfg+Q6ZTfIDsjr1 UpCXCc593V5KBu/sg7ekFg0zp+4osuW1p63D14vcWIm0T13uVCo72qU0eW5Wk0Tas6qg txSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ZH2nIiiSnakY3FpS+wMVMs/uCUmksAAV/3YZm7bqsOY=; b=AoDDDP8KoHzA/PSYKv1j409HMHTDwMlseoDsZth9M3gvM6H2CrGMG6vQ+/C6hAE1u1 mjXJQ2mqUNg5V170WqA0FW97NmEwfzOLC/JkyPzVYWruf++0N1pzcxne9tvo9moWaHgt zPmoYWgbWFOOv/4O07sS5foodhAYJFY1AKTA085yHZ4apr2vlMrzPp0dTqxInkA142UD pyiJBXi+r0MCFlPAwzi63AZVynb9LMKv5dl3VKiR/7/FMYajJ7cc6rhCUC+zxOAiH6FT 8Xfnupp0XK5+kayNR8fjE6Y5xDBfIKg+9YkRbr0GOysEavHB+pe8rrHTXkgcSYzfloRr IWMw== X-Gm-Message-State: AOAM532F10Y60Pag2I7k+3Qk8+hWF9coqoFDGexJ6nSgfaEYMQoXftZ/ h4SWpICEGZzsAAE+Nslh1U2rb4p+LacKR1WjBCM= X-Received: by 2002:a9d:2072:: with SMTP id n105mr16305204ota.132.1628002190755; Tue, 03 Aug 2021 07:49:50 -0700 (PDT) MIME-Version: 1.0 References: <20210802074310.1526526-1-lizhenneng@kylinos.cn> <6a34fcc3-0aa3-85ff-21c4-86b9b5a48fd5@daenzer.net> In-Reply-To: <6a34fcc3-0aa3-85ff-21c4-86b9b5a48fd5@daenzer.net> From: Alex Deucher Date: Tue, 3 Aug 2021 10:49:39 -0400 Message-ID: Subject: Re: [PATCH] drm/radeon: Update pitch for page flip To: =?UTF-8?Q?Michel_D=C3=A4nzer?= Cc: =?UTF-8?Q?Christian_K=C3=B6nig?= , Zhenneng Li , Alex Deucher , "Pan, Xinhui" , David Airlie , amd-gfx list , Maling list - DRI developers , LKML , Daniel Vetter Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 3, 2021 at 4:34 AM Michel D=C3=A4nzer wrot= e: > > 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=C3=B6nig 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 i= s > >>> really correct for the old hardware. > >>> > >>> As far as I know the crtc's pitch should not change during a page fli= p, 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 sam= e. > >> 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 fi= ne by changing the pitch, which can result in tearing: https://gitlab.freed= esktop.org/xorg/xserver/-/issues/839 (which says the i915 driver handles th= is as well). > Ok. In that case, @Zhenneng can you update all of the pitch in all of the page_flip functions in radeon rather than just the evergreen one? Thanks, Alex > > -- > Earthling Michel D=C3=A4nzer | https://redhat= .com > Libre software enthusiast | Mesa and X developer