From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42698C43461 for ; Sat, 8 May 2021 19:53:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E9E6F6137D for ; Sat, 8 May 2021 19:52:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9E6F6137D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F136A6E055; Sat, 8 May 2021 19:52:58 +0000 (UTC) Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 25D196E055; Sat, 8 May 2021 19:52:58 +0000 (UTC) Received: by mail-pf1-x42c.google.com with SMTP id i13so10797904pfu.2; Sat, 08 May 2021 12:52:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=52/BODVej/sAPj1HAsVHhcFR3RxERy74g5pEGd5eMWs=; b=Lckz/cwvu9w/BaykBLqzfMjsL/UzQqsU+MmTCjOI6K9UxxSYmFuzeX2FoFWqqSHg+2 InT7fyulz7rhUb0jU3JAmCtfarUKA4v4x09Z1Ka70powvuTaJSSwjiO36xdDagFCSTxK 6moDnOuYz2a4wG6eP8UTr+7SDYQ6BmDSavDu/a1BxvZjD7DyMMVVrP5XU5ebIoIKab04 s6Efs7s2NKzeKkIK8mloBupy3sUVKI2dmWS92vY+h60yKMmM7J4hFoSeZQObY8twiX4u YfOXkgLjEjPe3WMYhn/0p31S9ihmVQXjBH42wAq7j7QoeR9vcBFQY+j99ayowT/2hv8q pLMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=52/BODVej/sAPj1HAsVHhcFR3RxERy74g5pEGd5eMWs=; b=AKutjqzCGBurmwD1YSssaK44oM3ALhu400jsutn8Vf3Ze4191MABj75LqDsAV3/uLh AAzOVrXVrM5/IIZwE0Xo6pzeO7FFiZu55/1kazDVemN8qDZ9DNvEijG9qN7LoazSgNzu BD5AQRsc6wKQRaxtBXmnwvxKI34qhSJvHiYqXLu+rHKBE6WBXibVORgAENl7sx36e7Lf WnXbQWiTJA/Ovxn+LZNQ6N3Hw/XNZcE6Z6v0K6BO7BEWjUWWjI1VhuBiGBjnrsgjmvKu sUzCXTX+umiSpYWzktQu11yMLpoPEYcMSfE/0pMxRuQADyXHDnt/WK7Qu4kj6MHYzmI7 Gzew== X-Gm-Message-State: AOAM530ypaKZGo7SfC6ijtSsNl+vMkeXqjCwFBTD29T3QsoU2X51I94B nLR3+yj8rl83og9fGKPkBFsuav/T643XMA== X-Google-Smtp-Source: ABdhPJzShZqZ9yJXLeSXzV96pkdUxCEhyW3PchhSSkpkvoHPAOi4i4qCubtWTJgzZb+0BE3AedNzcw== X-Received: by 2002:a62:8208:0:b029:289:112f:d43d with SMTP id w8-20020a6282080000b0290289112fd43dmr16583052pfd.61.1620503576956; Sat, 08 May 2021 12:52:56 -0700 (PDT) Received: from localhost (c-73-25-156-94.hsd1.or.comcast.net. [73.25.156.94]) by smtp.gmail.com with ESMTPSA id u1sm7543017pgh.80.2021.05.08.12.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 May 2021 12:52:55 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/2] drm: Fix atomic helper dirtyfb stalls Date: Sat, 8 May 2021 12:56:37 -0700 Message-Id: <20210508195641.397198-1-robdclark@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Bernard , "open list:DRM DRIVER FOR MSM ADRENO GPU" , Hongbo Yao , open list , Abhinav Kumar , Stephen Boyd , Qinglang Miao , Maxime Ripard , Kalyan Thota , "open list:DRM DRIVER FOR MSM ADRENO GPU" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Rob Clark Someone on IRC once asked an innocent enough sounding question: Why with xf86-video-modesetting is es2gears limited at 120fps. So I broke out the perfetto tracing mesa MR and took a look. It turns out the problem was drm_atomic_helper_dirtyfb(), which would end up waiting for vblank.. es2gears would rapidly push two frames to Xorg, which would blit them to screen and in idle hook (I assume) call the DIRTYFB ioctl. Which in turn would do an atomic update to flush the dirty rects, which would stall until the next vblank. And then the whole process would repeat. But this is a bit silly, we only need dirtyfb for command mode DSI panels. So lets just skip it otherwise. Rob Clark (2): drm: Fix dirtyfb stalls drm/msm/dpu: Wire up needs_dirtyfb drivers/gpu/drm/drm_damage_helper.c | 8 ++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 14 ++++++++++++++ include/drm/drm_modeset_helper_vtables.h | 14 ++++++++++++++ 3 files changed, 36 insertions(+) -- 2.30.2