Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5190461yba; Wed, 8 May 2019 09:13:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqybLMr2uoh71Ei3fCuBPdS9oWLnhwXO3uo7Bei4i7OZExueWfvC3EUrFf8ckeXF3g3122/R X-Received: by 2002:a65:5cc8:: with SMTP id b8mr46129910pgt.36.1557331996965; Wed, 08 May 2019 09:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557331996; cv=none; d=google.com; s=arc-20160816; b=y5gk1iq20dOAbz/WdcJ5CkkEFDCy11uiGBjGmUdh2TNMSMqAubJLmGdGmEdCkdBIib /p+JsJGvymTaQY7pqGtfcThKMa3r+G7ur/uClnYh321olDOHuM2um7ObIOGfakmA/UAa +7Pz5+hc+tmnHyYyN9MDGcMY2R82Y/ucKLctgJS5hBZbGJAWVddETyEES2OkHN8OF/Mr m5K9K7XNj9CBnOuuVRiKirz1tOoVImhmGc5CD+rAgFqLvpZ2kkTxUIxYqsOLNasesJZ+ luAZ5c252GYcPIdLCF8FYBsVfA+xsEYJ11+V7XmjaGyb0CQAAB74FyBjMTUZzZ01Ve22 MFtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SSjzGScI7FWnThDcb7L6+9NbYWPOU1oEmSq7ubXMBrA=; b=GWhDDGB8a0exlYdNlkIbQivRNbRrhx+GPrMap/p5YJl3kW/K9KZuSniHz4iRgMOil/ VFevviOn0hU3oyJWwAL52g7yUW8TIMSXAuIA3c2WuqUf93BSPx7Pbq2s7RO1MyxJrmJ9 2HYxqmhwn7AlaQAV+EPbe7l1r8RDMhDx8P+8W12IFZ1n5xeB/YTMzZcNA0oyl0CKntZI 2ectaM7BibG7fhOuy9OUS/RIuyFQWJKWGbi6JV1rHudKva2D638/MF/PK2Yvn+/I9j3T Ee/qAp4YwhDAxf/ZVN3rQdpvIo+nYmMjH8uk5ArxF/p8eruZHjGmbpeelNhf8TDWW/BW /4zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@poorly.run header.s=google header.b="b/Mzvp9N"; 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 o184si21621363pgo.435.2019.05.08.09.13.00; Wed, 08 May 2019 09:13:16 -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; dkim=pass header.i=@poorly.run header.s=google header.b="b/Mzvp9N"; 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 S1728305AbfEHQKH (ORCPT + 99 others); Wed, 8 May 2019 12:10:07 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:35619 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727692AbfEHQJg (ORCPT ); Wed, 8 May 2019 12:09:36 -0400 Received: by mail-qt1-f195.google.com with SMTP id d20so6282017qto.2 for ; Wed, 08 May 2019 09:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SSjzGScI7FWnThDcb7L6+9NbYWPOU1oEmSq7ubXMBrA=; b=b/Mzvp9NPtpNHKqVRbANgyrQcwT3N1aJFNvie3Z04eQTbUk6Qao33USN2IESlcHCOO 4qnWQ0OSFA9kRNfw0U84tm6awagkWYPwG6lxiGHkQlacBIqYLmHbCoID7pE85RwJ6oWW fxCjWj0loJl7dr1aQl440frgop0Fsx3+xqDuR0iu3DGH+kYO/XBZ91bJw22MT3cefWmv 9y+gjvaQnQ096PQRKvgg8gbPFShyevAenHdukkPFwgfEZVmYe7qW4oVd48HxFgI6IQar Fn788RAuaJM5XZ7ORF6O6nrqX9mxUfX5QCSmGbyiJwTNTf6qDqASZNABfmLhhypMhWKJ h7ag== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=SSjzGScI7FWnThDcb7L6+9NbYWPOU1oEmSq7ubXMBrA=; b=EL7eOJckjytOkU6nMJUFt4FteqVbz7XvKGIKZ9nQ/2JFZbeWsgfmdC9T3gTvF3lyvt 9fyzu/N5LxaZPCfNeNK+TYWwxonjK0GDnBZ9/Q2lD2J0tE3j0NvZJ2z4k+dXhNi/KfZt sw03VAPaLUdnMWC7fAuVhLfoEkJGzLAbu9kbmOWmUAP7zLYMjKDzLAC7N8fPhApmObSh L8eLcPloxU4dAlwbjnkuDfdhtBjTHlfd3WU7Qi17v3qZLRMbarJLdED8eC5lzldKk8i6 bnWRP1dOANLu6yF+7Xf3IrAmQFdu3n6t8lNR8SSkZSqunc8HgD8I0Kgepc16hvmefBU3 S8PQ== X-Gm-Message-State: APjAAAVKLB63bKYwnZTFf1VFwuwflyvqTg7Yq7wykQwOXSY6pmkEC4oL lztb0pvnE7/XCSs20GVQVmPomA== X-Received: by 2002:ac8:2cc1:: with SMTP id 1mr32738783qtx.389.1557331775692; Wed, 08 May 2019 09:09:35 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:89c6:2139:5435:371d]) by smtp.gmail.com with ESMTPSA id s50sm10936877qts.39.2019.05.08.09.09.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 09:09:35 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Cc: Sean Paul , Daniel Vetter , Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , David Airlie , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 06/11] drm/rockchip: Use dirtyfb helper Date: Wed, 8 May 2019 12:09:11 -0400 Message-Id: <20190508160920.144739-7-sean@poorly.run> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a-goog In-Reply-To: <20190508160920.144739-1-sean@poorly.run> References: <20190508160920.144739-1-sean@poorly.run> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Paul Instead of flushing all vops every time we get a dirtyfb call, use the damage helper to kick off an atomic commit. Even though we don't use damage clips, the helper commit will force us through the normal psr_inhibit_get/put sequence. Changes in v3: - Added to the set Changes in v4: - None Link to v3: https://patchwork.freedesktop.org/patch/msgid/20190502194956.218441-7-sean@poorly.run Suggested-by: Daniel Vetter Signed-off-by: Sean Paul --- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c index 97438bbbe389..02e81ca2d933 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -25,20 +26,10 @@ #include "rockchip_drm_gem.h" #include "rockchip_drm_psr.h" -static int rockchip_drm_fb_dirty(struct drm_framebuffer *fb, - struct drm_file *file, - unsigned int flags, unsigned int color, - struct drm_clip_rect *clips, - unsigned int num_clips) -{ - rockchip_drm_psr_flush_all(fb->dev); - return 0; -} - static const struct drm_framebuffer_funcs rockchip_drm_fb_funcs = { .destroy = drm_gem_fb_destroy, .create_handle = drm_gem_fb_create_handle, - .dirty = rockchip_drm_fb_dirty, + .dirty = drm_atomic_helper_dirtyfb, }; static struct drm_framebuffer * -- Sean Paul, Software Engineer, Google / Chromium OS